api: Update image-builder API
This updates image-builder API by running `npm run api`.
This commit is contained in:
parent
e993027f92
commit
434c90a6b8
2 changed files with 69 additions and 254 deletions
|
|
@ -242,6 +242,35 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPErrorList'
|
||||
/blueprints/{id}/export:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: '123e4567-e89b-12d3-a456-426655440000'
|
||||
required: true
|
||||
description: UUID of a blueprint
|
||||
get:
|
||||
summary: export a blueprint
|
||||
description: "export a blueprint"
|
||||
operationId: exportBlueprint
|
||||
tags:
|
||||
- blueprint
|
||||
responses:
|
||||
'200':
|
||||
description: detail of a blueprint
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BlueprintExportResponse'
|
||||
'404':
|
||||
description: blueprint was not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPErrorList'
|
||||
/blueprints/{id}/compose:
|
||||
post:
|
||||
parameters:
|
||||
|
|
@ -665,256 +694,6 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Customizations'
|
||||
/experimental/blueprints:
|
||||
get:
|
||||
summary: get a collection of blueprints
|
||||
description: "get a collection of blueprints, returns just the latest version of each blueprint"
|
||||
operationId: getBlueprintsExperimental
|
||||
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: createBlueprintExperimental
|
||||
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'
|
||||
/experimental/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: updateBlueprintExperimental
|
||||
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: getBlueprintExperimental
|
||||
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: deleteBlueprintExperimental
|
||||
tags:
|
||||
- blueprint
|
||||
responses:
|
||||
'204':
|
||||
description: Successfully deleted
|
||||
'404':
|
||||
description: Blueprint to delete was not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPErrorList'
|
||||
/experimental/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: composeBlueprintExperimental
|
||||
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'
|
||||
/experimental/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: getBlueprintComposesExperimental
|
||||
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'
|
||||
/experimental/recommendations:
|
||||
post:
|
||||
summary: List recommended packages.
|
||||
|
|
@ -1194,6 +973,8 @@ components:
|
|||
Array of image requests. Having more image requests in a single blueprint is currently not supported.
|
||||
customizations:
|
||||
$ref: '#/components/schemas/Customizations'
|
||||
metadata:
|
||||
$ref: '#/components/schemas/BlueprintMetadata'
|
||||
CreateBlueprintResponse:
|
||||
required:
|
||||
- id
|
||||
|
|
@ -1262,6 +1043,35 @@ components:
|
|||
Array of image requests. Having more image requests in a single blueprint is currently not supported.
|
||||
customizations:
|
||||
$ref: '#/components/schemas/Customizations'
|
||||
BlueprintExportResponse:
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
- distribution
|
||||
- customizations
|
||||
- metadata
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
distribution:
|
||||
$ref: '#/components/schemas/Distributions'
|
||||
customizations:
|
||||
$ref: '#/components/schemas/Customizations'
|
||||
metadata:
|
||||
$ref: '#/components/schemas/BlueprintMetadata'
|
||||
BlueprintMetadata:
|
||||
required:
|
||||
- parent_id
|
||||
- exported_at
|
||||
properties:
|
||||
parent_id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
exported_at:
|
||||
type: string
|
||||
Distributions:
|
||||
type: string
|
||||
description: |
|
||||
|
|
@ -1286,7 +1096,7 @@ components:
|
|||
- rhel-92
|
||||
- rhel-93
|
||||
- rhel-94
|
||||
- centos-8
|
||||
- rhel-10-nightly
|
||||
- centos-9
|
||||
- centos-10
|
||||
- fedora-37
|
||||
|
|
@ -2156,7 +1966,7 @@ components:
|
|||
mirrorlist:
|
||||
type: string
|
||||
format: uri
|
||||
example: 'http://mirrorlist.centos.org/?release=8-stream&arch=aarch64&repo=BaseOS'
|
||||
example: 'http://mirrorlist.centos.org/?release=9-stream&arch=aarch64&repo=BaseOS'
|
||||
metalink:
|
||||
type: string
|
||||
format: uri
|
||||
|
|
@ -2193,7 +2003,7 @@ components:
|
|||
mirrorlist:
|
||||
type: string
|
||||
format: uri
|
||||
example: 'http://mirrorlist.centos.org/?release=8-stream&arch=aarch64&repo=BaseOS'
|
||||
example: 'http://mirrorlist.centos.org/?release=9-stream&arch=aarch64&repo=BaseOS'
|
||||
metalink:
|
||||
type: string
|
||||
format: uri
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue