Skip to content

Commit 097910a

Browse files
fix(openapi): sync with openapi definition
1 parent 2f2e99a commit 097910a

File tree

2 files changed

+307
-69
lines changed

2 files changed

+307
-69
lines changed

openapi.json

Lines changed: 118 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,66 @@
343343
"license_allow_list"
344344
]
345345
},
346+
"LicenseAllowList": {
347+
"type": "object",
348+
"additionalProperties": false,
349+
"description": "",
350+
"properties": {
351+
"allowedApprovalSources": {
352+
"type": "array",
353+
"items": {
354+
"type": "string",
355+
"description": "",
356+
"default": ""
357+
}
358+
},
359+
"allowedFamilies": {
360+
"type": "array",
361+
"items": {
362+
"type": "string",
363+
"description": "",
364+
"default": ""
365+
}
366+
},
367+
"allowedTiers": {
368+
"type": "array",
369+
"items": {
370+
"type": "string",
371+
"description": "",
372+
"default": ""
373+
}
374+
},
375+
"allowedStrings": {
376+
"type": "array",
377+
"items": {
378+
"type": "string",
379+
"description": "",
380+
"default": ""
381+
}
382+
},
383+
"allowedPURLs": {
384+
"type": "array",
385+
"items": {
386+
"type": "string",
387+
"description": "",
388+
"default": ""
389+
}
390+
},
391+
"focusAlertsHere": {
392+
"type": "boolean",
393+
"default": false,
394+
"description": ""
395+
}
396+
},
397+
"required": [
398+
"allowedApprovalSources",
399+
"allowedFamilies",
400+
"allowedPURLs",
401+
"allowedStrings",
402+
"allowedTiers",
403+
"focusAlertsHere"
404+
]
405+
},
346406
"CDXManifestSchema": {
347407
"type": "object",
348408
"additionalProperties": false,
@@ -1186,66 +1246,6 @@
11861246
"purl"
11871247
]
11881248
},
1189-
"LicenseAllowList": {
1190-
"type": "object",
1191-
"additionalProperties": false,
1192-
"description": "",
1193-
"properties": {
1194-
"allowedApprovalSources": {
1195-
"type": "array",
1196-
"items": {
1197-
"type": "string",
1198-
"description": "",
1199-
"default": ""
1200-
}
1201-
},
1202-
"allowedFamilies": {
1203-
"type": "array",
1204-
"items": {
1205-
"type": "string",
1206-
"description": "",
1207-
"default": ""
1208-
}
1209-
},
1210-
"allowedTiers": {
1211-
"type": "array",
1212-
"items": {
1213-
"type": "string",
1214-
"description": "",
1215-
"default": ""
1216-
}
1217-
},
1218-
"allowedStrings": {
1219-
"type": "array",
1220-
"items": {
1221-
"type": "string",
1222-
"description": "",
1223-
"default": ""
1224-
}
1225-
},
1226-
"allowedPURLs": {
1227-
"type": "array",
1228-
"items": {
1229-
"type": "string",
1230-
"description": "",
1231-
"default": ""
1232-
}
1233-
},
1234-
"focusAlertsHere": {
1235-
"type": "boolean",
1236-
"default": false,
1237-
"description": ""
1238-
}
1239-
},
1240-
"required": [
1241-
"allowedApprovalSources",
1242-
"allowedFamilies",
1243-
"allowedPURLs",
1244-
"allowedStrings",
1245-
"allowedTiers",
1246-
"focusAlertsHere"
1247-
]
1248-
},
12491249
"CDXComponentSchema": {
12501250
"type": "object",
12511251
"additionalProperties": false,
@@ -7535,6 +7535,64 @@
75357535
"x-readme": {}
75367536
}
75377537
},
7538+
"/saturate-license-policy": {
7539+
"post": {
7540+
"tags": [
7541+
"Packages"
7542+
],
7543+
"summary": "Saturate License Policy (Beta)",
7544+
"operationId": "saturateLicensePolicy",
7545+
"requestBody": {
7546+
"content": {
7547+
"application/json": {
7548+
"schema": {
7549+
"$ref": "#/components/schemas/LicenseAllowList"
7550+
}
7551+
}
7552+
},
7553+
"required": false
7554+
},
7555+
"security": [
7556+
{
7557+
"basicAuth": [
7558+
"packages:list"
7559+
]
7560+
}
7561+
],
7562+
"description": "Get the \"saturated\" version of a license policy's allow list, filling in the entire set of allowed\nlicense data. For example, the saturated form of a license allow list which only specifies that\nlicenses in the tier \"maximal copyleft\" are allowed is shown below (note the expanded `allowedStrings` property):\n\n```json\n{\n \"allowedApprovalSources\": [],\n \"allowedFamilies\": [],\n \"allowedTiers\": [\n \"maximal copyleft\"\n ],\n \"allowedStrings\": [\n \"Parity-6.0.0\",\n \"QPL-1.0-INRIA-2004\",\n \"QPL-1.0\",\n \"RPL-1.1\",\n \"RPL-1.5\"\n ],\n \"allowedPURLs\": [],\n \"focusAlertsHere\": false\n}\n``` \n\nThis may be helpful for users who want to compose more complex sets of allowed license data via \nthe \"allowedStrings\" property, or for users who want to know more about the contents of a particular\nlicense group (family, tier, or approval source).\n\n## Allow List Schema\n\n```json\n```\n\nwhere\n\nPermissiveTier ::= \"model permissive\" | \"gold\" | \"silver\" | \"bronze\" | \"lead\"\nCopyleftTier ::= \"maximal copyleft\" | \"network copyleft\" | \"strong copyleft\" | \"weak copyleft\"\n\n## Return Value\n\nThe returned value has the same shape as a license allow list:\n\n```json\n{\n allowedApprovalSources?: Array<\"fsf\" | \"osi\">,\n allowedFamilies?: Array<\"copyleft\" | \"permissive\">,\n allowedTiers?: Array<PermissiveTier | CopyleftTier>,\n allowedStrings?: Array<string>\n allowedPURLs?: Array<string>\n focusAlertsHere?: boolean\n}\n```\n\nwhere\n\nPermissiveTier ::= \"model permissive\" | \"gold\" | \"silver\" | \"bronze\" | \"lead\"\nCopyleftTier ::= \"maximal copyleft\" | \"network copyleft\" | \"strong copyleft\" | \"weak copyleft\"\n\nreaders can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources.\n\n### Example request bodies:\n```json\n{\n \"allowedApprovalSources\": [\"fsf\"],\n \"allowedPURLs\": [],\n \"allowedFamilies\": [\"copyleft\"],\n \"allowedTiers\": [\"model permissive\"],\n \"allowedStrings\": [\"License :: OSI Approved :: BSD License\"],\n \"focusAlertsHere\": false\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list",
7563+
"responses": {
7564+
"200": {
7565+
"content": {
7566+
"application/json": {
7567+
"schema": {
7568+
"$ref": "#/components/schemas/LicenseAllowList"
7569+
}
7570+
}
7571+
},
7572+
"description": "Saturated License Allow List"
7573+
},
7574+
"400": {
7575+
"$ref": "#/components/responses/SocketBadRequest"
7576+
},
7577+
"401": {
7578+
"$ref": "#/components/responses/SocketUnauthorized"
7579+
},
7580+
"403": {
7581+
"$ref": "#/components/responses/SocketForbidden"
7582+
},
7583+
"404": {
7584+
"$ref": "#/components/responses/SocketNotFoundResponse"
7585+
},
7586+
"429": {
7587+
"$ref": "#/components/responses/SocketTooManyRequestsResponse"
7588+
},
7589+
"500": {
7590+
"$ref": "#/components/responses/SocketInternalServerError"
7591+
}
7592+
},
7593+
"x-readme": {}
7594+
}
7595+
},
75387596
"/orgs/{org_slug}/audit-log": {
75397597
"get": {
75407598
"tags": [

0 commit comments

Comments
 (0)