Skip to content
Snippets Groups Projects

feat: Add id path endpoint + tests

Files
8
+ 73
3
@@ -13,9 +13,79 @@ paths:
/cve:
get:
tags:
- CVEs
summary: CVE hello
- CVEs
summary: CVE List
description: Returns a 200 when called. Pop goes the weasel!
responses:
200:
description: Success
\ No newline at end of file
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/cves'
500:
description: Error while retrieving data
/cve/{id}:
parameters:
name: id
in: path
description: The id of the CVE to retrieve
required: true
schema:
type: string
get:
summary: CVE
description: Returns a CVE entry that has a matching id
responses:
200:
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/cve'
404:
description: CVE not found
500:
description: Error while retrieving data
components:
schemas:
cves:
type: array
items:
$ref: '#/components/schemas/cve'
cve:
type: object
properties:
id:
type: string
description: CVE id containing year
date:
type: string
description: The date of the report
project:
type: string
description: The project where the vulerability exists
link:
type: string
description: Link to the report
request_link:
type: string
description: Link to the request where the vulnerability was tracked
cve_pull_request:
type:
- string
- 'null'
description: Link to pull request that includes the vulnerability
live_link:
type: string
description: Link to the cve.mitre.org page for the vulnerability
status:
type: string
description: The current status of the vulerability (eg, Complete, Assigned, Reported)
year:
type: integer
description: The year the vulnerability was found
top_level_project:
type: string
description: The top level project where the vulnerability was found
Loading