Skip to content

Commit

Permalink
Some slight renaming of fields in the scanner adapter metadata respon…
Browse files Browse the repository at this point in the history
…se spec and move the properties up from the capabilities entry to the top level response (#2)

Signed-off-by: Zach Hill <zach@anchore.com>
  • Loading branch information
zhill authored and danielpacak committed Sep 23, 2019
1 parent 733b0bd commit 788c7ae
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ components:
type: array
items:
$ref: '#/components/schemas/ScannerCapability'
properties:
$ref: "#/components/schemas/ScannerProperties"
description: |
Represents metadata of a Scanner Adapter which allow Harbor to lookup a scanner capable
of scanning a given Artifact stored in its registry and making sure that it
Expand All @@ -203,34 +205,34 @@ components:
Capability consists of the set of recognized artifact MIME types and the set of scanner report MIME types.
For example, a scanner capable of analyzing Docker images and producing a vulnerabilities report recognizable
by Harbor web console might be represented with the following capability:
- artifact MIME types:
- consumes MIME types:
- `application/vnd.oci.image.manifest.v1+json`
- `application/vnd.docker.distribution.manifest.v2+json`
- report MIME types:
- produces MIME types:
- `application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0`
required:
- artifact_mime_types
- report_mime_types
type: object
properties:
artifact_mime_types:
consumes_mime_types:
type: array
items:
type: string
description: The set of MIME types of the artifacts supported by the scanner.
description: |
The set of MIME types of the artifacts supported by the scanner to produce the reports specified in the "produces_mime_types". A given
mime type should only be present in one capability item.
example:
- "application/vnd.oci.image.manifest.v1+json"
- "application/vnd.docker.distribution.manifest.v2+json"
report_mime_types:
produces_mime_types:
type: array
items:
type: string
description: |
The set of MIME types of reports generated by the scanner.
The set of MIME types of reports generated by the scanner for the consumes_mime_types of the same capability record.
example:
- "application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0"
properties:
$ref: '#/components/schemas/ScannerProperties'
ScanRequest:
required:
- id
Expand Down

0 comments on commit 788c7ae

Please sign in to comment.