Skip to content

Commit 2f2e99a

Browse files
fix(openapi): sync with openapi definition (#229)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9999f40 commit 2f2e99a

File tree

2 files changed

+62
-40
lines changed

2 files changed

+62
-40
lines changed

openapi.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,53 +1191,59 @@
11911191
"additionalProperties": false,
11921192
"description": "",
11931193
"properties": {
1194-
"requiredApprovalSources": {
1194+
"allowedApprovalSources": {
11951195
"type": "array",
11961196
"items": {
11971197
"type": "string",
11981198
"description": "",
11991199
"default": ""
12001200
}
12011201
},
1202-
"allowedApprovalSources": {
1202+
"allowedFamilies": {
12031203
"type": "array",
12041204
"items": {
12051205
"type": "string",
12061206
"description": "",
12071207
"default": ""
12081208
}
12091209
},
1210-
"allowedFamilies": {
1210+
"allowedTiers": {
12111211
"type": "array",
12121212
"items": {
12131213
"type": "string",
12141214
"description": "",
12151215
"default": ""
12161216
}
12171217
},
1218-
"allowedTiers": {
1218+
"allowedStrings": {
12191219
"type": "array",
12201220
"items": {
12211221
"type": "string",
12221222
"description": "",
12231223
"default": ""
12241224
}
12251225
},
1226-
"allowedSpdxAtoms": {
1226+
"allowedPURLs": {
12271227
"type": "array",
12281228
"items": {
12291229
"type": "string",
12301230
"description": "",
12311231
"default": ""
12321232
}
1233+
},
1234+
"focusAlertsHere": {
1235+
"type": "boolean",
1236+
"default": false,
1237+
"description": ""
12331238
}
12341239
},
12351240
"required": [
12361241
"allowedApprovalSources",
12371242
"allowedFamilies",
1238-
"allowedSpdxAtoms",
1243+
"allowedPURLs",
1244+
"allowedStrings",
12391245
"allowedTiers",
1240-
"requiredApprovalSources"
1246+
"focusAlertsHere"
12411247
]
12421248
},
12431249
"CDXComponentSchema": {
@@ -7459,7 +7465,7 @@
74597465
]
74607466
}
74617467
],
7462-
"description": "Diff the license information from a list of packages (as PURL strings) with a configurable license allow list.\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\n\n## Allow List Schema\n\n```json\n{\n requiredApprovalSources?: Array<\"fsf\" | \"osi\">,\n allowedApprovalSources?: Array<\"fsf\" | \"osi\">,\n allowedFamilies?: Array<\"copyleft\" | \"permissive\">,\n allowedTiers?: Array<PermissiveTier | CopyleftTier>,\n allowedSpdxAtoms?: Array<string>\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## Return value\n\nThe returned values are objects containing information about license data from the requested\nPURLs which violates the allow list. The returned objects contain an spdx disjunction describing the\nlicense data for the violation, the provenance of that information, and a filepath to the source\nof the violation (if one is available; there may not be an available path for things like license information\ntaken from registry metdata). Returned objects have the following shape:\n```json\n{\n spdxDisj: string,\n provenance: string,\n filepath?: string,\n}\n```\n\n### Example request bodies:\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/[email protected]?artifact_id=tar-gz\"\n },\n {\n \"purl\": \"pkg:npm/[email protected]\"\n }\n ],\n \"license_allow_list\": {\n \"allowedFamilies\": [\"permissive\"],\n \"allowedSpdxAtoms\": [\"GPL-1.0-only WITH Autoconf-exception-3.0\"]\n }\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list",
7468+
"description": "Compare the license data found for a list of packages (as PURL strings) with a configurable license allow list,\nreturning information about license data which does not comply with the license allow list.\n\n## Allow List Schema\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## Return value\n\nFor each requested PURL, an array is returned. Each array contains a list of license policy violations \ndetected for the requested PURL.\n\nViolations are accompanied by a string identifying the offending license data as `spdxAtomOrExtraData`,\na message describing why the license data is believed to be incompatible with the license policy, and a list\nof locations (by filepath or other provenance information) where the offending license data may be found.\n\n```json\nArray<\n Array<{\n purl: string,\n spdxAtomOrExtraData: string,\n violationExplanation: string,\n filepathOrProvenance: Array<string>\n }>\n>\n```\n\n### Example request bodies:\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/[email protected]?artifact_id=tar-gz\"\n },\n {\n \"purl\": \"pkg:npm/[email protected]\"\n }\n ],\n \"license_allow_list\": {\n \"allowedApprovalSources: [\"fsf\", \"osi\"],\n \"allowedFamilies\": [\"permissive\"],\n \"allowedStrings\": [\"License :: OSI Approved :: BSD License\", \"UniqueLicense-2.0\"]\n }\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list",
74637469
"responses": {
74647470
"200": {
74657471
"content": {

types/api.d.ts

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,19 @@ export interface paths {
8888
"/license-policy": {
8989
/**
9090
* License Policy (Beta)
91-
* @description Diff the license information from a list of packages (as PURL strings) with a configurable license allow list.
92-
* Package URLs (PURLs) are an ecosystem agnostic way to identify packages.
91+
* @description Compare the license data found for a list of packages (as PURL strings) with a configurable license allow list,
92+
* returning information about license data which does not comply with the license allow list.
9393
*
9494
* ## Allow List Schema
9595
*
9696
* ```json
9797
* {
98-
* requiredApprovalSources?: Array<"fsf" | "osi">,
9998
* allowedApprovalSources?: Array<"fsf" | "osi">,
10099
* allowedFamilies?: Array<"copyleft" | "permissive">,
101100
* allowedTiers?: Array<PermissiveTier | CopyleftTier>,
102-
* allowedSpdxAtoms?: Array<string>
101+
* allowedStrings?: Array<string>
102+
* allowedPURLs?: Array<string>
103+
* focusAlertsHere?: boolean
103104
* }
104105
* ```
105106
*
@@ -112,17 +113,22 @@ export interface paths {
112113
*
113114
* ## Return value
114115
*
115-
* The returned values are objects containing information about license data from the requested
116-
* PURLs which violates the allow list. The returned objects contain an spdx disjunction describing the
117-
* license data for the violation, the provenance of that information, and a filepath to the source
118-
* of the violation (if one is available; there may not be an available path for things like license information
119-
* taken from registry metdata). Returned objects have the following shape:
116+
* For each requested PURL, an array is returned. Each array contains a list of license policy violations
117+
* detected for the requested PURL.
118+
*
119+
* Violations are accompanied by a string identifying the offending license data as `spdxAtomOrExtraData`,
120+
* a message describing why the license data is believed to be incompatible with the license policy, and a list
121+
* of locations (by filepath or other provenance information) where the offending license data may be found.
122+
*
120123
* ```json
121-
* {
122-
* spdxDisj: string,
123-
* provenance: string,
124-
* filepath?: string,
125-
* }
124+
* Array<
125+
* Array<{
126+
* purl: string,
127+
* spdxAtomOrExtraData: string,
128+
* violationExplanation: string,
129+
* filepathOrProvenance: Array<string>
130+
* }>
131+
* >
126132
* ```
127133
*
128134
* ### Example request bodies:
@@ -137,8 +143,9 @@ export interface paths {
137143
* }
138144
* ],
139145
* "license_allow_list": {
146+
* "allowedApprovalSources: ["fsf", "osi"],
140147
* "allowedFamilies": ["permissive"],
141-
* "allowedSpdxAtoms": ["GPL-1.0-only WITH Autoconf-exception-3.0"]
148+
* "allowedStrings": ["License :: OSI Approved :: BSD License", "UniqueLicense-2.0"]
142149
* }
143150
* }
144151
* ```
@@ -834,11 +841,13 @@ export interface components {
834841
purl: string;
835842
};
836843
LicenseAllowList: {
837-
requiredApprovalSources: string[];
838844
allowedApprovalSources: string[];
839845
allowedFamilies: string[];
840846
allowedTiers: string[];
841-
allowedSpdxAtoms: string[];
847+
allowedStrings: string[];
848+
allowedPURLs: string[];
849+
/** @default false */
850+
focusAlertsHere: boolean;
842851
};
843852
CDXComponentSchema: {
844853
/** @default */
@@ -2527,18 +2536,19 @@ export interface operations {
25272536
};
25282537
/**
25292538
* License Policy (Beta)
2530-
* @description Diff the license information from a list of packages (as PURL strings) with a configurable license allow list.
2531-
* Package URLs (PURLs) are an ecosystem agnostic way to identify packages.
2539+
* @description Compare the license data found for a list of packages (as PURL strings) with a configurable license allow list,
2540+
* returning information about license data which does not comply with the license allow list.
25322541
*
25332542
* ## Allow List Schema
25342543
*
25352544
* ```json
25362545
* {
2537-
* requiredApprovalSources?: Array<"fsf" | "osi">,
25382546
* allowedApprovalSources?: Array<"fsf" | "osi">,
25392547
* allowedFamilies?: Array<"copyleft" | "permissive">,
25402548
* allowedTiers?: Array<PermissiveTier | CopyleftTier>,
2541-
* allowedSpdxAtoms?: Array<string>
2549+
* allowedStrings?: Array<string>
2550+
* allowedPURLs?: Array<string>
2551+
* focusAlertsHere?: boolean
25422552
* }
25432553
* ```
25442554
*
@@ -2551,17 +2561,22 @@ export interface operations {
25512561
*
25522562
* ## Return value
25532563
*
2554-
* The returned values are objects containing information about license data from the requested
2555-
* PURLs which violates the allow list. The returned objects contain an spdx disjunction describing the
2556-
* license data for the violation, the provenance of that information, and a filepath to the source
2557-
* of the violation (if one is available; there may not be an available path for things like license information
2558-
* taken from registry metdata). Returned objects have the following shape:
2564+
* For each requested PURL, an array is returned. Each array contains a list of license policy violations
2565+
* detected for the requested PURL.
2566+
*
2567+
* Violations are accompanied by a string identifying the offending license data as `spdxAtomOrExtraData`,
2568+
* a message describing why the license data is believed to be incompatible with the license policy, and a list
2569+
* of locations (by filepath or other provenance information) where the offending license data may be found.
2570+
*
25592571
* ```json
2560-
* {
2561-
* spdxDisj: string,
2562-
* provenance: string,
2563-
* filepath?: string,
2564-
* }
2572+
* Array<
2573+
* Array<{
2574+
* purl: string,
2575+
* spdxAtomOrExtraData: string,
2576+
* violationExplanation: string,
2577+
* filepathOrProvenance: Array<string>
2578+
* }>
2579+
* >
25652580
* ```
25662581
*
25672582
* ### Example request bodies:
@@ -2576,8 +2591,9 @@ export interface operations {
25762591
* }
25772592
* ],
25782593
* "license_allow_list": {
2594+
* "allowedApprovalSources: ["fsf", "osi"],
25792595
* "allowedFamilies": ["permissive"],
2580-
* "allowedSpdxAtoms": ["GPL-1.0-only WITH Autoconf-exception-3.0"]
2596+
* "allowedStrings": ["License :: OSI Approved :: BSD License", "UniqueLicense-2.0"]
25812597
* }
25822598
* }
25832599
* ```

0 commit comments

Comments
 (0)