Skip to content

Commit d339f51

Browse files
authored
Merge pull request #112 from SocketDev/automated/open-api
Sync with OpenAPI definition
2 parents 0037356 + 9d09029 commit d339f51

File tree

2 files changed

+106
-28
lines changed

2 files changed

+106
-28
lines changed

openapi.json

Lines changed: 80 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,20 @@
25542554
"props": {
25552555
"type": "object",
25562556
"additionalProperties": false,
2557-
"properties": {}
2557+
"properties": {
2558+
"key": {
2559+
"type": "string",
2560+
"default": ""
2561+
},
2562+
"description": {
2563+
"type": "string",
2564+
"default": ""
2565+
}
2566+
},
2567+
"required": [
2568+
"description",
2569+
"key"
2570+
]
25582571
},
25592572
"usage": {
25602573
"$ref": "#/components/schemas/SocketUsageRef"
@@ -4495,6 +4508,21 @@
44954508
"$ref": "#/components/schemas/SocketRefPyPI"
44964509
}
44974510
}
4511+
},
4512+
{
4513+
"type": "object",
4514+
"additionalProperties": false,
4515+
"properties": {
4516+
"type": {
4517+
"type": "string",
4518+
"enum": [
4519+
"go"
4520+
]
4521+
},
4522+
"value": {
4523+
"$ref": "#/components/schemas/SocketRefGo"
4524+
}
4525+
}
44984526
}
44994527
]
45004528
},
@@ -4627,6 +4655,26 @@
46274655
"required": [
46284656
"package"
46294657
]
4658+
},
4659+
"SocketRefGo": {
4660+
"type": "object",
4661+
"additionalProperties": false,
4662+
"properties": {
4663+
"package": {
4664+
"type": "string",
4665+
"default": ""
4666+
},
4667+
"version": {
4668+
"type": "string",
4669+
"default": ""
4670+
},
4671+
"file": {
4672+
"$ref": "#/components/schemas/SocketRefFile"
4673+
}
4674+
},
4675+
"required": [
4676+
"package"
4677+
]
46304678
}
46314679
},
46324680
"securitySchemes": {
@@ -5300,28 +5348,40 @@
53005348
},
53015349
"settings": {
53025350
"type": "object",
5303-
"properties": {
5304-
"deferTo": {
5305-
"type": "string",
5306-
"nullable": true
5307-
},
5308-
"issueRules": {
5309-
"type": "object",
5310-
"additionalProperties": {
5351+
"additionalProperties": {
5352+
"type": "object",
5353+
"properties": {
5354+
"deferTo": {
5355+
"type": "string",
5356+
"nullable": true
5357+
},
5358+
"issueRules": {
53115359
"type": "object",
5312-
"properties": {
5313-
"action": {
5314-
"type": "string",
5315-
"enum": [
5316-
"defer",
5317-
"error",
5318-
"ignore",
5319-
"warn"
5320-
]
5321-
}
5360+
"nullable": false,
5361+
"additionalProperties": {
5362+
"type": "object",
5363+
"nullable": false,
5364+
"properties": {
5365+
"action": {
5366+
"type": "string",
5367+
"enum": [
5368+
"defer",
5369+
"error",
5370+
"ignore",
5371+
"warn"
5372+
]
5373+
}
5374+
},
5375+
"required": [
5376+
"action"
5377+
]
53225378
}
53235379
}
5324-
}
5380+
},
5381+
"required": [
5382+
"deferTo",
5383+
"issueRules"
5384+
]
53255385
}
53265386
}
53275387
},

types/api.d.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,12 @@ export interface components {
717717
value?: components["schemas"]["SocketIssueBasics"] & {
718718
/** @default */
719719
description: string;
720-
props: Record<string, never>;
720+
props: {
721+
/** @default */
722+
key: string;
723+
/** @default */
724+
description: string;
725+
};
721726
usage?: components["schemas"]["SocketUsageRef"];
722727
};
723728
}) | ({
@@ -1214,6 +1219,10 @@ export interface components {
12141219
/** @enum {string} */
12151220
type?: "pypi";
12161221
value?: components["schemas"]["SocketRefPyPI"];
1222+
} | {
1223+
/** @enum {string} */
1224+
type?: "go";
1225+
value?: components["schemas"]["SocketRefGo"];
12171226
};
12181227
SocketRefTextRange: {
12191228
/** @default 0 */
@@ -1261,6 +1270,13 @@ export interface components {
12611270
artifact?: string;
12621271
file?: components["schemas"]["SocketRefFile"];
12631272
};
1273+
SocketRefGo: {
1274+
/** @default */
1275+
package: string;
1276+
/** @default */
1277+
version?: string;
1278+
file?: components["schemas"]["SocketRefFile"];
1279+
};
12641280
};
12651281
responses: {
12661282
/** @description Bad request */
@@ -1645,13 +1661,15 @@ export interface operations {
16451661
/** @default */
16461662
start: string | null;
16471663
settings: {
1648-
deferTo?: string | null;
1649-
issueRules?: {
1650-
[key: string]: ({
1651-
/** @enum {string} */
1652-
action?: "defer" | "error" | "ignore" | "warn";
1653-
}) | undefined;
1654-
};
1664+
[key: string]: ({
1665+
deferTo: string | null;
1666+
issueRules: {
1667+
[key: string]: ({
1668+
/** @enum {string} */
1669+
action: "defer" | "error" | "ignore" | "warn";
1670+
}) | undefined;
1671+
};
1672+
}) | undefined;
16551673
};
16561674
})[];
16571675
};

0 commit comments

Comments
 (0)