Skip to content

Commit

Permalink
fix(openapi): sync with openapi definition (#154)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Feb 28, 2024
1 parent 6924b08 commit 3ab7e59
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 2 deletions.
69 changes: 69 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4479,11 +4479,21 @@
"severity": {
"type": "number",
"default": 0
},
"risk": {
"type": "string",
"enum": [
"low",
"medium",
"high"
],
"default": "medium"
}
},
"required": [
"confidence",
"notes",
"risk",
"severity"
]
},
Expand Down Expand Up @@ -4558,6 +4568,65 @@
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"potentialVulnerability"
]
},
"value": {
"allOf": [
{
"$ref": "#/components/schemas/SocketIssueBasics"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string",
"default": ""
},
"props": {
"type": "object",
"additionalProperties": false,
"properties": {
"note": {
"type": "string",
"default": ""
},
"risk": {
"type": "string",
"enum": [
"low",
"medium",
"high"
],
"default": "medium"
}
},
"required": [
"note",
"risk"
]
},
"usage": {
"$ref": "#/components/schemas/SocketUsageRef"
}
},
"required": [
"description",
"props"
]
}
]
}
}
}
]
},
Expand Down
26 changes: 24 additions & 2 deletions types/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ export interface components {
}) | ({
/** @enum {string} */
type?: "gptAnomaly";
value?: components["schemas"]["SocketIssueBasics"] & {
value?: components["schemas"]["SocketIssueBasics"] & ({
/** @default */
description: string;
props: {
Expand All @@ -1231,9 +1231,14 @@ export interface components {
confidence: number;
/** @default 0 */
severity: number;
/**
* @default medium
* @enum {string}
*/
risk: "low" | "medium" | "high";
};
usage?: components["schemas"]["SocketUsageRef"];
};
});
}) | ({
/** @enum {string} */
type?: "gptMalware";
Expand All @@ -1250,6 +1255,23 @@ export interface components {
};
usage?: components["schemas"]["SocketUsageRef"];
};
}) | ({
/** @enum {string} */
type?: "potentialVulnerability";
value?: components["schemas"]["SocketIssueBasics"] & ({
/** @default */
description: string;
props: {
/** @default */
note: string;
/**
* @default medium
* @enum {string}
*/
risk: "low" | "medium" | "high";
};
usage?: components["schemas"]["SocketUsageRef"];
});
});
SocketMetricSchema: {
/** @default 0 */
Expand Down

0 comments on commit 3ab7e59

Please sign in to comment.