Skip to content

Commit 279917d

Browse files
authored
Merge pull request #29 from sonatype-nexus-community/feat/iq-193
feat: Updated spec for IQ 193
2 parents 07c73ad + 3dd9a19 commit 279917d

File tree

2 files changed

+111
-26
lines changed

2 files changed

+111
-26
lines changed

spec/openapi.yaml

Lines changed: 104 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ components:
580580
$ref: '#/components/schemas/ApiCompositeValueDTOBoolean'
581581
id:
582582
type: string
583+
innerSourceAutomatedUpdatesEnabled:
584+
$ref: '#/components/schemas/ApiCompositeValueDTOBoolean'
583585
manualPullRequestsEnabled:
584586
$ref: '#/components/schemas/ApiCompositeValueDTOBoolean'
585587
ownerId:
@@ -728,9 +730,7 @@ components:
728730
applicationName:
729731
type: string
730732
applicationPassword:
731-
items:
732-
type: string
733-
type: array
733+
type: string
734734
serverUrl:
735735
type: string
736736
type: object
@@ -2447,6 +2447,8 @@ components:
24472447
type: boolean
24482448
id:
24492449
type: string
2450+
innerSourceAutomatedUpdatesEnabled:
2451+
type: boolean
24502452
manualPullRequestsEnabled:
24512453
type: boolean
24522454
ownerId:
@@ -2623,6 +2625,8 @@ components:
26232625
- next-non-failing
26242626
- next-no-violations-with-dependencies
26252627
- next-non-failing-with-dependencies
2628+
- inner-source-latest-non-breaking
2629+
- inner-source-latest
26262630
- recommended-non-breaking
26272631
- recommended-non-breaking-with-dependencies
26282632
type: string
@@ -2740,6 +2744,8 @@ components:
27402744
- next-non-failing
27412745
- next-no-violations-with-dependencies
27422746
- next-non-failing-with-dependencies
2747+
- inner-source-latest-non-breaking
2748+
- inner-source-latest
27432749
- recommended-non-breaking
27442750
- recommended-non-breaking-with-dependencies
27452751
type: string
@@ -3048,6 +3054,26 @@ components:
30483054
operatorName:
30493055
type: string
30503056
type: object
3057+
CpeMatchingConfigurationDTO:
3058+
properties:
3059+
allowOverride:
3060+
type: boolean
3061+
enabled:
3062+
type: boolean
3063+
enabledInParent:
3064+
type: boolean
3065+
inheritedFromOrganizationAllowOverride:
3066+
type: boolean
3067+
inheritedFromOrganizationName:
3068+
type: string
3069+
type: object
3070+
CpeMatchingConfigurationRequest:
3071+
properties:
3072+
allowOverride:
3073+
type: boolean
3074+
enabled:
3075+
type: boolean
3076+
type: object
30513077
CweIdDTO:
30523078
properties:
30533079
id:
@@ -3058,6 +3084,8 @@ components:
30583084
type: object
30593085
DevelopmentPrioritizationResults:
30603086
properties:
3087+
hasAutoWaiversConfigured:
3088+
type: boolean
30613089
priorities:
30623090
$ref: '#/components/schemas/ApiPageResultPrioritizedComponent'
30633091
scanIdFromLatestBuildStageEvaluation:
@@ -3145,6 +3173,11 @@ components:
31453173
type: object
31463174
JsonNode:
31473175
type: object
3176+
KevData:
3177+
properties:
3178+
isKev:
3179+
type: boolean
3180+
type: object
31483181
LabelsByOwner:
31493182
properties:
31503183
labels:
@@ -3411,6 +3444,8 @@ components:
34113444
- next-non-failing
34123445
- next-no-violations-with-dependencies
34133446
- next-non-failing-with-dependencies
3447+
- inner-source-latest-non-breaking
3448+
- inner-source-latest
34143449
- recommended-non-breaking
34153450
- recommended-non-breaking-with-dependencies
34163451
type: string
@@ -3693,6 +3728,8 @@ components:
36933728
type: string
36943729
isAdvancedVulnerabilityDetection:
36953730
type: boolean
3731+
kevData:
3732+
$ref: '#/components/schemas/KevData'
36963733
mainSeverity:
36973734
$ref: '#/components/schemas/SecurityVulnerabilitySeverityDTO'
36983735
recommendationMarkdown:
@@ -3975,7 +4012,7 @@ components:
39754012
type: http
39764013
info:
39774014
title: Sonatype Lifecycle Public REST API
3978-
version: 1.192.0-01
4015+
version: 1.193.0-01
39794016
openapi: 3.0.1
39804017
paths:
39814018
/api/v2/applicationCategories/application:
@@ -11694,24 +11731,6 @@ paths:
1169411731
description: The requested SBOM(s).
1169511732
tags:
1169611733
- SPDX
11697-
/api/v2/telemetry:
11698-
post:
11699-
operationId: postExternalTelemetry
11700-
requestBody:
11701-
content:
11702-
application/json:
11703-
schema:
11704-
additionalProperties:
11705-
type: object
11706-
type: object
11707-
responses:
11708-
'200': &id012
11709-
content:
11710-
'*/*': {}
11711-
description: default response
11712-
default: *id012
11713-
tags:
11714-
- Telemetry
1171511734
/api/v2/userTokens:
1171611735
get:
1171711736
description: 'Use this method to retrieve user tokens created within a date
@@ -12011,9 +12030,9 @@ paths:
1201112030
name: componentIdentifier
1201212031
schema:
1201312032
$ref: '#/components/schemas/ComponentIdentifier'
12014-
- description: Enter the name of the identification source (third-party) for
12015-
this vulnerability. The response will retrieve vulnerability data from this
12016-
third-party data source.
12033+
- description: Enter the name of the component identification source (third-party)
12034+
for this vulnerability. The response will retrieve vulnerability data from
12035+
this third-party data source.
1201712036
in: query
1201812037
name: identificationSource
1201912038
schema:
@@ -12092,6 +12111,63 @@ paths:
1209212111
</ul></li></ul>
1209312112
tags:
1209412113
- Vulnerability Details
12114+
/api/v2/{ownerType}/{internalOwnerId}/configuration/publicSource/cpe:
12115+
get:
12116+
description: 'This method allows to retrieve the applicable cpe matching configuration
12117+
of a given organization or application.<p>Permissions Required: View IQ Elements'
12118+
operationId: getCpeMatchingConfiguration
12119+
parameters:
12120+
- in: path
12121+
name: ownerType
12122+
required: true
12123+
schema:
12124+
enum:
12125+
- application
12126+
- organization
12127+
pattern: application|organization
12128+
type: string
12129+
- in: path
12130+
name: internalOwnerId
12131+
required: true
12132+
schema:
12133+
type: string
12134+
responses:
12135+
'200':
12136+
description: Applicable cpe matching configuration for given ownerId
12137+
tags:
12138+
- CPE Matching Configuration
12139+
put:
12140+
description: 'Use this method to apply a given cpe matching configuration to
12141+
an organization or application.<p>Permissions Required: Edit IQ Elements'
12142+
operationId: updateCpeMatchingConfiguration
12143+
parameters:
12144+
- in: path
12145+
name: ownerType
12146+
required: true
12147+
schema:
12148+
enum:
12149+
- application
12150+
- organization
12151+
pattern: application|organization
12152+
type: string
12153+
- in: path
12154+
name: internalOwnerId
12155+
required: true
12156+
schema:
12157+
type: string
12158+
requestBody:
12159+
content:
12160+
application/json:
12161+
schema:
12162+
$ref: '#/components/schemas/CpeMatchingConfigurationRequest'
12163+
responses:
12164+
'200':
12165+
content:
12166+
application/json: {}
12167+
description: An object containing the cpe configuration applied to the given
12168+
ownerId
12169+
tags:
12170+
- CPE Matching Configuration
1209512171
security:
1209612172
- BasicAuth: []
1209712173
tags:
@@ -12188,6 +12264,9 @@ tags:
1218812264
- description: Use this REST API to manage the configuration of Firewall for JFrog
1218912265
Artifactory.
1219012266
name: Configure Artifactory Connection
12267+
- description: Use the CPE Matching Configuration REST API to add/set/remove cpe matching
12268+
configuration to organizations and applications
12269+
name: CPE Matching Configuration
1219112270
- description: Use the CycloneDX REST API to generate CycloneDX SBOMs in XML or JSON
1219212271
formats, containing coordinates and licenses for components found in a scan report.
1219312272
name: CycloneDX
@@ -12279,7 +12358,6 @@ tags:
1227912358
name: Source Control Metrics
1228012359
- description: Use this REST API to generate SPDX SBOMs in XML or JSON formats.
1228112360
name: SPDX
12282-
- name: Telemetry
1228312361
- description: Use this REST API to scan SBOMs for your applications.
1228412362
name: Third-Party Analysis
1228512363
- description: Use this REST API to manage user tokens.

update-spec.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,5 +375,12 @@
375375
'description': 'The response contains the assigned organization id and all other organization details specified.'
376376
}
377377

378+
# v193 Updates
379+
# ------------------------------------------------------------------------
380+
print('Correct schema ApiCrowdConfigurationDTO...')
381+
json_spec['components']['schemas']['ApiCrowdConfigurationDTO']['properties']['applicationPassword'] = {
382+
'type': 'string'
383+
}
384+
378385
with open('./spec/openapi.yaml', 'w') as output_yaml_specfile:
379386
output_yaml_specfile.write(yaml_dump(json_spec))

0 commit comments

Comments
 (0)