CVEProject/cve-services

incorrect use of create-cve-record-rejection-response.json

ElectricNroff opened this issue · 0 comments

oneOf: [
{ $ref: '../schemas/cve/get-cve-record-response.json' },
{ $ref: '../schemas/cve/create-cve-record-rejection-response.json' }

oneOf: [
{ $ref: '../schemas/cve/list-cve-records-response.json' },
{ $ref: '../schemas/cve/create-cve-record-rejection-response.json' }

oneOf: [
{ $ref: '../schemas/cve/cursor-cve-records-response.json' },
{ $ref: '../schemas/cve/create-cve-record-rejection-response.json' }

use create-cve-record-rejection-response.json incorrectly. For example, router.get('/cve/:id' does not sometimes return response data with the message and created properties.

If someone goes to https://cveawg-test.mitre.org/api-docs/#/CVE%20Record/cveGetSingle and scrolls down to "200 The requested CVE Record" and clicks on Schema, and then chooses the second possibility for the oneOf, they are told that the top-level properties are message and created even though this cannot actually ever occur.