Skip to content

Commit

Permalink
CASMCMS-8798: Update BOS API spec to reflect internal change to all v…
Browse files Browse the repository at this point in the history
…2-compatible session templates
  • Loading branch information
mharding-hpe committed Sep 12, 2023
1 parent b514f8d commit 12d4067
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 34 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Removed non-v2 fields from v1 session template template
- Provide more useful example values in v1 and v2 session template templates
- Update API spec to reflect that no v1-format session template will exist inside BOS, because the
v1 session template creation endpoint will strip v1-specific fields and create a v2-format session template,
and even the v1 session template template endpoint will return a v2-compatible example template.

## [2.6.3] - 08-22-2023
### Changed
Expand Down
51 changes: 17 additions & 34 deletions api/openapi.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,11 @@ components:
$ref: '#/components/schemas/BootSetRootfsProviderPassthrough'
additionalProperties: false
required: [path, type]
V2SessionTemplateArray:
description: An array of Session Templates.
type: array
items:
$ref: '#/components/schemas/V2SessionTemplate'
V2Session:
description: |
A Session object
Expand Down Expand Up @@ -1595,14 +1600,7 @@ components:
minimum: 0
maximum: 1048576
additionalProperties: true
# Schemas that combine objects of different versions
SessionTemplateArray:
description: An array of Session Templates.
type: array
items:
anyOf:
- $ref: '#/components/schemas/V1SessionTemplate'
- $ref: '#/components/schemas/V2SessionTemplate'

requestBodies:
V2sessionCreateRequest:
description: The information to create a Session
Expand Down Expand Up @@ -1703,19 +1701,19 @@ components:
application/json:
schema:
$ref: '#/components/schemas/V1SessionStatus'
V1SessionTemplateDetails:
description: Session Template details
content:
application/json:
schema:
$ref: '#/components/schemas/V1SessionTemplate'
# V2
V2SessionTemplateDetails:
description: Session Template details
content:
application/json:
schema:
$ref: '#/components/schemas/V2SessionTemplate'
V2SessionTemplateDetailsArray:
description: Session Template details array
content:
application/json:
schema:
$ref: '#/components/schemas/V2SessionTemplateArray'
V2SessionTemplateValidation:
description: Session Template validity details
content:
Expand Down Expand Up @@ -1764,21 +1762,6 @@ components:
application/json:
schema:
$ref: '#/components/schemas/V2Options'
# Responses that may contain V1 or V2 objects
SessionTemplateDetails:
description: Session Template details
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/V1SessionTemplate'
- $ref: '#/components/schemas/V2SessionTemplate'
SessionTemplateDetailsArray:
description: Session Template details array
content:
application/json:
schema:
$ref: '#/components/schemas/SessionTemplateArray'
# Errors
AlreadyExists:
description: The resource to be created already exists
Expand Down Expand Up @@ -2005,7 +1988,7 @@ paths:
operationId: get_v1_sessiontemplates
responses:
200:
$ref: '#/components/responses/SessionTemplateDetailsArray'
$ref: '#/components/responses/V2SessionTemplateDetailsArray'
400:
$ref: '#/components/responses/MultiTenancyNotSupported'
/v1/sessiontemplate/{session_template_id}:
Expand All @@ -2024,7 +2007,7 @@ paths:
operationId: get_v1_sessiontemplate
responses:
200:
$ref: '#/components/responses/SessionTemplateDetails'
$ref: '#/components/responses/V2SessionTemplateDetails'
400:
$ref: '#/components/responses/MultiTenancyNotSupported'
404:
Expand Down Expand Up @@ -2056,7 +2039,7 @@ paths:
operationId: get_v1_sessiontemplatetemplate
responses:
200:
$ref: '#/components/responses/V1SessionTemplateDetails'
$ref: '#/components/responses/V2SessionTemplateDetails'
/v1/session:
parameters:
- $ref: '#/components/parameters/V1TenantHeaderParam'
Expand Down Expand Up @@ -2411,7 +2394,7 @@ paths:
operationId: get_v2_sessiontemplates
responses:
200:
$ref: '#/components/responses/SessionTemplateDetailsArray'
$ref: '#/components/responses/V2SessionTemplateDetailsArray'
/v2/sessiontemplatesvalid/{session_template_id}:
parameters:
- $ref: '#/components/parameters/TemplateIdPathParam'
Expand Down Expand Up @@ -2449,7 +2432,7 @@ paths:
operationId: get_v2_sessiontemplate
responses:
200:
$ref: '#/components/responses/SessionTemplateDetails'
$ref: '#/components/responses/V2SessionTemplateDetails'
404:
$ref: '#/components/responses/ResourceNotFound'
put:
Expand Down

0 comments on commit 12d4067

Please sign in to comment.