Skip to content

Commit 19b457f

Browse files
committed
docs: improve openapi spec
1 parent 0fa07a1 commit 19b457f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

modules/fundamental/src/advisory/endpoints/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub async fn upload(
240240
tag = "advisory",
241241
operation_id = "downloadAdvisory",
242242
params(
243-
("key" = Id, Path),
243+
("key" = Id, Path, description = "Identifier of the advisory, either `urn:uuid:<uuid>` or a digest e.g. `sha256:<hex>`"),
244244
),
245245
responses(
246246
(status = 200, description = "Download a an advisory", body = inline(BinaryData)),

modules/fundamental/src/purl/endpoints/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use trustify_common::{
2121
operation_id = "getBasePurl",
2222
tag = "purl",
2323
params(
24-
("key" = String, Path, description = "opaque identifier for a base PURL, or a URL-encoded pURL itself")
24+
("key" = String, Path, description = "opaque identifier for a base PURL, or a URL-encoded full pURL starting with `pkg:` (e.g. `pkg:golang/k8s.io%2Fapiserver`)")
2525
),
2626
responses(
2727
(status = 200, description = "Details for the versionless base PURL", body = BasePurlDetails),

modules/fundamental/src/sbom/endpoints/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ pub async fn upload(
610610
tag = "sbom",
611611
operation_id = "downloadSbom",
612612
params(
613-
("key" = Id, Path),
613+
("key" = Id, Path, description = "Identifier of the SBOM, either `urn:uuid:<uuid>` or a digest e.g. `sha256:<hex>`"),
614614
),
615615
responses(
616616
(status = 200, description = "Download a an SBOM", body = inline(BinaryData)),

openapi.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ paths:
291291
parameters:
292292
- name: key
293293
in: path
294+
description: Identifier of the advisory, either `urn:uuid:<uuid>` or a digest e.g. `sha256:<hex>`
294295
required: true
295296
schema:
296297
$ref: '#/components/schemas/Id'
@@ -2256,7 +2257,7 @@ paths:
22562257
parameters:
22572258
- name: key
22582259
in: path
2259-
description: opaque identifier for a base PURL, or a URL-encoded pURL itself
2260+
description: opaque identifier for a base PURL, or a URL-encoded full pURL starting with `pkg:` (e.g. `pkg:golang/k8s.io%2Fapiserver`)
22602261
required: true
22612262
schema:
22622263
type: string
@@ -3132,6 +3133,7 @@ paths:
31323133
parameters:
31333134
- name: key
31343135
in: path
3136+
description: Identifier of the SBOM, either `urn:uuid:<uuid>` or a digest e.g. `sha256:<hex>`
31353137
required: true
31363138
schema:
31373139
$ref: '#/components/schemas/Id'

0 commit comments

Comments
 (0)