Skip to content

Commit 748275b

Browse files
fix(openapi): sync with openapi definition
1 parent be140b3 commit 748275b

File tree

2 files changed

+91
-5
lines changed

2 files changed

+91
-5
lines changed

openapi.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4759,7 +4759,7 @@
47594759
]
47604760
}
47614761
],
4762-
"description": "Upload a lockfile to get your project analyzed by Socket.\nYou can upload multiple lockfiles in the same request, but each filename must be unique.\n\nThe name of the file must be in the supported list.\n\nThe supported lockfiles (and filenames) are: `package.json` and `package-lock.json`.\n\nFor example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.\n\nThis endpoint consumes 100 units of your quota.",
4762+
"description": "Upload a lockfile to get your project analyzed by Socket.\nYou can upload multiple lockfiles in the same request, but each filename must be unique.\n\nThe name of the file must be in the supported list.\n\nFor example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.\n\nThis endpoint consumes 100 units of your quota.",
47634763
"responses": {
47644764
"200": {
47654765
"content": {
@@ -4857,6 +4857,56 @@
48574857
"x-readme": {}
48584858
}
48594859
},
4860+
"/report/supported": {
4861+
"get": {
4862+
"tags": [
4863+
"Project report"
4864+
],
4865+
"summary": "Get supported files for report",
4866+
"operationId": "getReportSupportedFiles",
4867+
"security": [
4868+
{}
4869+
],
4870+
"description": "Get a list of supported files for project report generation.\nFiles are categorized first by environment (e.g. NPM or PyPI), then by name.\n\nFiles whose names match the patterns returned by this endpoint can be uploaded for report generation.\nExamples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.\n\nThis endpoint consumes 0 units of your quota.",
4871+
"responses": {
4872+
"200": {
4873+
"content": {
4874+
"application/json": {
4875+
"schema": {
4876+
"type": "object",
4877+
"additionalProperties": {
4878+
"type": "object",
4879+
"additionalProperties": {
4880+
"type": "object",
4881+
"additionalProperties": false,
4882+
"properties": {
4883+
"pattern": {
4884+
"type": "string",
4885+
"default": ""
4886+
}
4887+
},
4888+
"required": [
4889+
"pattern"
4890+
]
4891+
},
4892+
"properties": {}
4893+
},
4894+
"properties": {}
4895+
}
4896+
}
4897+
},
4898+
"description": "Glob patterns used to match supported files"
4899+
},
4900+
"400": {
4901+
"$ref": "#/components/responses/SocketBadRequest"
4902+
},
4903+
"429": {
4904+
"$ref": "#/components/responses/SocketTooManyRequestsResponse"
4905+
}
4906+
},
4907+
"x-readme": {}
4908+
}
4909+
},
48604910
"/openapi": {
48614911
"get": {
48624912
"tags": [

types/api.d.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export interface paths {
4646
*
4747
* The name of the file must be in the supported list.
4848
*
49-
* The supported lockfiles (and filenames) are: `package.json` and `package-lock.json`.
50-
*
5149
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.
5250
*
5351
* This endpoint consumes 100 units of your quota.
@@ -62,6 +60,18 @@ export interface paths {
6260
*/
6361
get: operations["getReport"];
6462
};
63+
"/report/supported": {
64+
/**
65+
* Get a list of supported files for project report generation.
66+
* Files are categorized first by environment (e.g. NPM or PyPI), then by name.
67+
*
68+
* Files whose names match the patterns returned by this endpoint can be uploaded for report generation.
69+
* Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.
70+
*
71+
* This endpoint consumes 0 units of your quota.
72+
*/
73+
get: operations["getReportSupportedFiles"];
74+
};
6575
"/openapi": {
6676
/**
6777
* Retrieve the API specification in an Openapi JSON format.
@@ -1443,8 +1453,6 @@ export interface operations {
14431453
*
14441454
* The name of the file must be in the supported list.
14451455
*
1446-
* The supported lockfiles (and filenames) are: `package.json` and `package-lock.json`.
1447-
*
14481456
* For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`.
14491457
*
14501458
* This endpoint consumes 100 units of your quota.
@@ -1500,6 +1508,34 @@ export interface operations {
15001508
429: components["responses"]["SocketTooManyRequestsResponse"];
15011509
};
15021510
};
1511+
/**
1512+
* Get a list of supported files for project report generation.
1513+
* Files are categorized first by environment (e.g. NPM or PyPI), then by name.
1514+
*
1515+
* Files whose names match the patterns returned by this endpoint can be uploaded for report generation.
1516+
* Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.
1517+
*
1518+
* This endpoint consumes 0 units of your quota.
1519+
*/
1520+
getReportSupportedFiles: {
1521+
responses: {
1522+
/** Glob patterns used to match supported files */
1523+
200: {
1524+
content: {
1525+
"application/json": {
1526+
[key: string]: {
1527+
[key: string]: {
1528+
/** @default */
1529+
pattern: string;
1530+
};
1531+
};
1532+
};
1533+
};
1534+
};
1535+
400: components["responses"]["SocketBadRequest"];
1536+
429: components["responses"]["SocketTooManyRequestsResponse"];
1537+
};
1538+
};
15031539
/**
15041540
* Retrieve the API specification in an Openapi JSON format.
15051541
*

0 commit comments

Comments
 (0)