Prerequisites
Description
The OpenAPI specification for cve-services is technically not spec-compliant with the new registry endpoints included, as the registry endpoints share identical operationIds with their non-registry counterparts.
I encountered this while trying to use progenitor, a Rust library, to generate a consumer for the CVE Services API based on the OpenAPI spec. Progenitor recognizes the error and bails out.
The solution would be to assign different operationIds for the registry endpoints from their legacy counterparts.
Steps to Reproduce
Attempt to compile a Rust crate using progenitor as a dependency and with the following call in the Rust source:
progenitor::generate_api!("api/cve-services-api.json");
Replacing the "api/cve-services-api.json" path with the appropriate path to a local copy of the CVE Services OpenAPI specification.
Expected behavior:
Progenitor should be able to generate a valid consumer for the CVE Services API based on the API specification.
Actual behavior:
Progenitor fails with the following error, indicating the existence of duplicate operationIds:
error: generation error for api/cve-services-api.json: unexpected or unhandled format in the OpenAPI document duplicate operation ID: orgUpdateSingle
--> src/main.rs:1:27
|
1 | progenitor::generate_api!("api/cve-services-api.json");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Reproduces how often:
Reproduces every time compilation is attempted with progenitor on the latest version of the CVE Services OpenAPI specification.
Versions
Latest development version.
Additional Information
None
Prerequisites
Description
The OpenAPI specification for cve-services is technically not spec-compliant with the new registry endpoints included, as the registry endpoints share identical
operationIds with their non-registry counterparts.I encountered this while trying to use
progenitor, a Rust library, to generate a consumer for the CVE Services API based on the OpenAPI spec. Progenitor recognizes the error and bails out.The solution would be to assign different
operationIds for the registry endpoints from their legacy counterparts.Steps to Reproduce
Attempt to compile a Rust crate using
progenitoras a dependency and with the following call in the Rust source:Replacing the
"api/cve-services-api.json"path with the appropriate path to a local copy of the CVE Services OpenAPI specification.Expected behavior:
Progenitor should be able to generate a valid consumer for the CVE Services API based on the API specification.
Actual behavior:
Progenitor fails with the following error, indicating the existence of duplicate
operationIds:Reproduces how often:
Reproduces every time compilation is attempted with
progenitoron the latest version of the CVE Services OpenAPI specification.Versions
Latest development version.
Additional Information
None