Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Open API] New version of backend api spec #2511

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 208 additions & 58 deletions save-backend/backend-api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@
"/api/v1/contests/sample/get": {
"get": {
"description": "Get contest sample by id.",
"operationId": "getById",
"operationId": "getById_1",
"parameters": [
{
"in": "query",
Expand Down Expand Up @@ -2145,6 +2145,204 @@
]
}
},
"/api/v1/cosv/batch-upload": {
"post": {
"operationId": "batchUpload",
"parameters": [
{
"in": "query",
"name": "sourceId",
"required": false,
"schema": {
"type": "string",
"default": "default"
}
},
{
"example": 123,
"in": "header",
"name": "X-Authorization-Id",
"required": true
},
{
"example": "user",
"in": "header",
"name": "X-Authorization-Name",
"required": true
},
{
"example": "VIEWER",
"in": "header",
"name": "X-Authorization-Roles",
"required": true
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
}
},
"required": [
"file"
]
}
}
}
},
"responses": {
"401": {
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"description": "Unauthorized"
}
},
"security": [
{
"basic": []
}
],
"tags": [
"cosv-controller"
]
}
},
"/api/v1/cosv/get-by-id/{id}": {
"get": {
"operationId": "getById",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
},
{
"example": 123,
"in": "header",
"name": "X-Authorization-Id",
"required": true
},
{
"example": "user",
"in": "header",
"name": "X-Authorization-Name",
"required": true
},
{
"example": "VIEWER",
"in": "header",
"name": "X-Authorization-Roles",
"required": true
}
],
"responses": {
"401": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"description": "Unauthorized"
}
},
"security": [
{
"basic": []
}
],
"tags": [
"cosv-controller"
]
}
},
"/api/v1/cosv/upload": {
"post": {
"operationId": "upload_1",
"parameters": [
{
"in": "query",
"name": "sourceId",
"required": false,
"schema": {
"type": "string",
"default": "default"
}
},
{
"example": 123,
"in": "header",
"name": "X-Authorization-Id",
"required": true
},
{
"example": "user",
"in": "header",
"name": "X-Authorization-Name",
"required": true
},
{
"example": "VIEWER",
"in": "header",
"name": "X-Authorization-Roles",
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"required": true
},
"responses": {
"401": {
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"description": "Unauthorized"
}
},
"security": [
{
"basic": []
}
],
"tags": [
"cosv-controller"
]
}
},
"/api/v1/demo/{organizationName}/{projectName}/delete": {
"post": {
"description": "Delete demo by saveourtool organization and project names.",
Expand Down Expand Up @@ -10716,59 +10914,6 @@
]
}
},
"/api/v1/vulnerabilities/get-all-public": {
"post": {
"description": "Get all public vulnerabilities with author UserInfo.",
"operationId": "getAllPublicVulnerabilities",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VulnerabilityFilter"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VulnerabilityDto"
}
}
}
},
"description": "Successfully fetched all public vulnerabilities with author UserInfo."
},
"401": {
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VulnerabilityDto"
}
}
}
},
"description": "Unauthorized"
}
},
"security": [
{
"basic": []
}
],
"summary": "Get all public vulnerabilities with author info.",
"tags": [
"vulnerabilities"
]
}
},
"/api/v1/vulnerabilities/reject": {
"post": {
"description": "Reject vulnerability.",
Expand Down Expand Up @@ -12895,6 +13040,10 @@
"language": {
"type": "string"
},
"latestFetchedVersion": {
"type": "boolean",
"writeOnly": true
},
"name": {
"type": "string"
},
Expand Down Expand Up @@ -13218,12 +13367,13 @@
"type": {
"type": "string",
"enum": [
"CVE created",
"CVE updated",
"Discovered",
"Disclosed",
"Fixed",
"Found",
"Introduced",
"Released"
"Modified",
"Published",
"Withdrawn"
]
},
"vulnerabilityName": {
Expand Down
Loading