feat(HMS-4200): remove blueprint endpoints /experimental

This commit is contained in:
Amir 2024-06-10 13:43:24 +03:00 committed by Klara Simickova
parent 55d56a3198
commit 54d09d636e
6 changed files with 472 additions and 234 deletions

View file

@ -97,6 +97,256 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
/blueprints:
get:
summary: get a collection of blueprints
description: "get a collection of blueprints, returns just the latest version of each blueprint"
operationId: getBlueprints
tags:
- blueprint
parameters:
- in: query
name: name
required: false
schema:
type: string
description: fetch blueprint with specific name
- in: query
name: search
required: false
schema:
type: string
description: search for blueprints by name or description
- in: query
name: limit
schema:
type: integer
default: 100
minimum: 1
maximum: 100
description: max amount of blueprints, default 100
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
description: blueprint page offset, default 0
responses:
'200':
description: a list of blueprints
content:
application/json:
schema:
$ref: '#/components/schemas/BlueprintsResponse'
post:
summary: create blueprint
description: "create blueprint"
operationId: createBlueprint
tags:
- blueprint
requestBody:
required: true
description: details of blueprint
content:
application/json:
schema:
$ref: "#/components/schemas/CreateBlueprintRequest"
responses:
'201':
description: blueprint was saved
content:
application/json:
schema:
$ref: '#/components/schemas/CreateBlueprintResponse'
'422':
description: blueprint is malformed
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
'403':
description: user is not allowed to create blueprints
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
/blueprints/{id}:
parameters:
- in: path
name: id
schema:
type: string
format: uuid
example: '123e4567-e89b-12d3-a456-426655440000'
required: true
description: UUID of a blueprint
put:
summary: update blueprint
description: "update blueprint"
operationId: updateBlueprint
tags:
- blueprint
requestBody:
required: true
description: details of blueprint
content:
application/json:
schema:
$ref: "#/components/schemas/CreateBlueprintRequest"
responses:
'200':
description: blueprint was updated
content:
application/json:
schema:
$ref: '#/components/schemas/CreateBlueprintResponse'
'404':
description: blueprint was not found
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
get:
summary: get detail of a blueprint
description: "get a blueprint detail"
operationId: getBlueprint
tags:
- blueprint
responses:
'200':
description: detail of a blueprint
content:
application/json:
schema:
$ref: '#/components/schemas/BlueprintResponse'
'404':
description: blueprint was not found
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
delete:
summary: delete a blueprint
description: |
Deletes all versions of Blueprint, the compose will still count towards quota.
operationId: deleteBlueprint
tags:
- blueprint
responses:
'204':
description: Successfully deleted
'404':
description: Blueprint to delete was not found
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
/blueprints/{id}/compose:
post:
parameters:
- in: path
name: id
schema:
type: string
format: uuid
example: '123e4567-e89b-12d3-a456-426655440000'
required: true
description: UUID of a blueprint
summary: create new compose from blueprint
description: "create new compose from blueprint, optionally specifying the target image types to build"
operationId: composeBlueprint
tags:
- blueprint
requestBody:
required: false
description: "list of target image types that the user wants to build for this compose"
content:
application/json:
schema:
type: object
properties:
image_types:
type: array
items:
$ref: "#/components/schemas/ImageTypes"
example: ["azure", "aws"]
responses:
'201':
description: compose was created
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ComposeResponse'
'403':
description: user is not allowed to compose from blueprints
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
/blueprints/{id}/composes:
get:
summary: get composes associated with a blueprint
description: "get a collection of composes associated to a blueprint, allows for filtering by version"
operationId: getBlueprintComposes
tags:
- blueprint
parameters:
- in: path
name: id
schema:
type: string
format: uuid
example: '123e4567-e89b-12d3-a456-426655440000'
required: true
description: UUID of a blueprint
- in: query
name: blueprint_version
schema:
type: integer
description: |
Filter by a specific version of the Blueprint we want to fetch composes for.
Pass special value -1 to fetch composes for latest version of the Blueprint.
- in: query
name: limit
schema:
type: integer
default: 100
minimum: 1
maximum: 100
description: max amount of composes, default 100
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
description: composes page offset, default 0
- in: query
name: ignoreImageTypes
required: false
schema:
type: array
items:
$ref: '#/components/schemas/ImageTypes'
example: ['rhel-edge-installer', 'rhel-edge-commit', ...]
description: |
Filter the composes on image type. The filter is optional and can be specified multiple times.
responses:
'200':
description: a list of composes
content:
application/json:
schema:
$ref: '#/components/schemas/ComposesResponse'
'404':
description: blueprint was not found
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPErrorList'
/composes:
get:
summary: get a collection of previous compose requests for the logged in user
@ -419,7 +669,7 @@ paths:
get:
summary: get a collection of blueprints
description: "get a collection of blueprints, returns just the latest version of each blueprint"
operationId: getBlueprints
operationId: getBlueprintsExperimental
tags:
- blueprint
parameters:
@ -460,7 +710,7 @@ paths:
post:
summary: create blueprint
description: "create blueprint"
operationId: createBlueprint
operationId: createBlueprintExperimental
tags:
- blueprint
requestBody:
@ -502,7 +752,7 @@ paths:
put:
summary: update blueprint
description: "update blueprint"
operationId: updateBlueprint
operationId: updateBlueprintExperimental
tags:
- blueprint
requestBody:
@ -528,7 +778,7 @@ paths:
get:
summary: get detail of a blueprint
description: "get a blueprint detail"
operationId: getBlueprint
operationId: getBlueprintExperimental
tags:
- blueprint
responses:
@ -548,7 +798,7 @@ paths:
summary: delete a blueprint
description: |
Deletes all versions of Blueprint, the compose will still count towards quota.
operationId: deleteBlueprint
operationId: deleteBlueprintExperimental
tags:
- blueprint
responses:
@ -573,7 +823,7 @@ paths:
description: UUID of a blueprint
summary: create new compose from blueprint
description: "create new compose from blueprint, optionally specifying the target image types to build"
operationId: composeBlueprint
operationId: composeBlueprintExperimental
tags:
- blueprint
requestBody:
@ -608,7 +858,7 @@ paths:
get:
summary: get composes associated with a blueprint
description: "get a collection of composes associated to a blueprint, allows for filtering by version"
operationId: getBlueprintComposes
operationId: getBlueprintComposesExperimental
tags:
- blueprint
parameters:
@ -1038,6 +1288,7 @@ components:
- rhel-94
- centos-8
- centos-9
- centos-10
- fedora-37
- fedora-38
- fedora-39