diff --git a/openapi.yaml b/openapi.yaml index ac5cc60c..048ecac2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -459,6 +459,25 @@ paths: description: The tool request was invalid '404': description: The tool was not found + /api/v2/analysis/component/{key}: + get: + tags: + - analysis + operationId: getComponent + parameters: + - name: key + in: path + description: provide component name, URL-encoded pURL, or CPE itself + required: true + schema: + type: string + responses: + '200': + description: Retrieve component(s) root components by name, pURL, or CPE. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResults_BaseSummary' /api/v2/analysis/dep: get: tags: @@ -503,7 +522,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DepSummary' + $ref: '#/components/schemas/PaginatedResults_DepSummary' /api/v2/analysis/dep/{key}: get: tags: @@ -522,7 +541,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DepSummary' + $ref: '#/components/schemas/PaginatedResults_DepSummary' /api/v2/analysis/root-component: get: tags: @@ -567,7 +586,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AncestorSummary' + $ref: '#/components/schemas/PaginatedResults_AncestorSummary' /api/v2/analysis/root-component/{key}: get: tags: @@ -576,17 +595,17 @@ paths: parameters: - name: key in: path - description: provide component name or URL-encoded pURL itself + description: provide component name, URL-encoded pURL, or CPE itself required: true schema: type: string responses: '200': - description: Retrieve component(s) root components by name or pURL. + description: Retrieve component(s) root components by name, pURL, or CPE. content: application/json: schema: - $ref: '#/components/schemas/AncestorSummary' + $ref: '#/components/schemas/PaginatedResults_AncestorSummary' /api/v2/analysis/status: get: tags: @@ -2413,6 +2432,44 @@ components: version: type: string AncestorSummary: + allOf: + - $ref: '#/components/schemas/BaseSummary' + - type: object + required: + - ancestors + properties: + ancestors: + type: array + items: + $ref: '#/components/schemas/AncNode' + BasePurlDetails: + allOf: + - $ref: '#/components/schemas/BasePurlHead' + - type: object + required: + - versions + properties: + versions: + type: array + items: + $ref: '#/components/schemas/VersionedPurlSummary' + BasePurlHead: + type: object + required: + - uuid + - purl + properties: + purl: + $ref: '#/components/schemas/Purl' + description: The actual base PURL + uuid: + type: string + format: uuid + description: The ID of the base PURL + BasePurlSummary: + allOf: + - $ref: '#/components/schemas/BasePurlHead' + BaseSummary: type: object required: - sbom_id @@ -2425,12 +2482,7 @@ components: - document_id - product_name - product_version - - ancestors properties: - ancestors: - type: array - items: - $ref: '#/components/schemas/AncNode' cpe: type: array items: @@ -2455,33 +2507,6 @@ components: type: string version: type: string - BasePurlDetails: - allOf: - - $ref: '#/components/schemas/BasePurlHead' - - type: object - required: - - versions - properties: - versions: - type: array - items: - $ref: '#/components/schemas/VersionedPurlSummary' - BasePurlHead: - type: object - required: - - uuid - - purl - properties: - purl: - $ref: '#/components/schemas/Purl' - description: The actual base PURL - uuid: - type: string - format: uuid - description: The ID of the base PURL - BasePurlSummary: - allOf: - - $ref: '#/components/schemas/BasePurlHead' BinaryByteSize: type: string ChatMessage: @@ -2691,48 +2716,16 @@ components: version: type: string DepSummary: - type: object - required: - - sbom_id - - node_id - - purl - - cpe - - name - - version - - published - - document_id - - product_name - - product_version - - deps - properties: - cpe: - type: array - items: - $ref: '#/components/schemas/Cpe' - deps: - type: array - items: - $ref: '#/components/schemas/DepNode' - document_id: - type: string - name: - type: string - node_id: - type: string - product_name: - type: string - product_version: - type: string - published: - type: string - purl: - type: array - items: - $ref: '#/components/schemas/Purl' - sbom_id: - type: string - version: - type: string + allOf: + - $ref: '#/components/schemas/BaseSummary' + - type: object + required: + - deps + properties: + deps: + type: array + items: + $ref: '#/components/schemas/DepNode' ExternalReferenceQuery: type: object properties: @@ -3052,6 +3045,29 @@ components: type: integer format: int64 minimum: 0 + PaginatedResults_AncestorSummary: + type: object + required: + - items + - total + properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/BaseSummary' + - type: object + required: + - ancestors + properties: + ancestors: + type: array + items: + $ref: '#/components/schemas/AncNode' + total: + type: integer + format: int64 + minimum: 0 PaginatedResults_BasePurlSummary: type: object required: @@ -3067,6 +3083,56 @@ components: type: integer format: int64 minimum: 0 + PaginatedResults_BaseSummary: + type: object + required: + - items + - total + properties: + items: + type: array + items: + type: object + required: + - sbom_id + - node_id + - purl + - cpe + - name + - version + - published + - document_id + - product_name + - product_version + properties: + cpe: + type: array + items: + $ref: '#/components/schemas/Cpe' + document_id: + type: string + name: + type: string + node_id: + type: string + product_name: + type: string + product_version: + type: string + published: + type: string + purl: + type: array + items: + $ref: '#/components/schemas/Purl' + sbom_id: + type: string + version: + type: string + total: + type: integer + format: int64 + minimum: 0 PaginatedResults_ConversationSummary: type: object required: @@ -3094,6 +3160,29 @@ components: type: integer format: int64 minimum: 0 + PaginatedResults_DepSummary: + type: object + required: + - items + - total + properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/BaseSummary' + - type: object + required: + - deps + properties: + deps: + type: array + items: + $ref: '#/components/schemas/DepNode' + total: + type: integer + format: int64 + minimum: 0 PaginatedResults_ImporterReport: type: object required: