store: split apis into sub directories
Since we will need to add other api endpoints, e.g. `contentSourcesApi` for the on-prem frontend, this PR restructures the store directory to make future changes more manageable.
This commit is contained in:
parent
ed1b4c4b97
commit
9c3581f21c
33 changed files with 3261 additions and 164 deletions
|
|
@ -72,12 +72,22 @@
|
|||
},
|
||||
"api.CreateUploadRequest": {
|
||||
"properties": {
|
||||
"chunk_size": {
|
||||
"description": "Size of the chunk",
|
||||
"type": "integer"
|
||||
},
|
||||
"sha256": {
|
||||
"description": "SHA-256 checksum of the file",
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"description": "Size of the upload in bytes",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"chunk_size",
|
||||
"sha256",
|
||||
"size"
|
||||
],
|
||||
"type": "object"
|
||||
|
|
@ -1029,6 +1039,61 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"api.SearchModuleStreams": {
|
||||
"properties": {
|
||||
"module_name": {
|
||||
"description": "Module name",
|
||||
"type": "string"
|
||||
},
|
||||
"streams": {
|
||||
"description": "A list of stream related information for the module",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/api.Stream"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"api.SearchModuleStreamsRequest": {
|
||||
"properties": {
|
||||
"rpm_names": {
|
||||
"description": "List of rpm names to search",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"search": {
|
||||
"description": "Search string to search rpm names",
|
||||
"type": "string"
|
||||
},
|
||||
"sort_by": {
|
||||
"description": "SortBy sets the sort order of the result",
|
||||
"type": "string"
|
||||
},
|
||||
"urls": {
|
||||
"description": "List of repository URLs to search",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"uuids": {
|
||||
"description": "List of repository UUIDs to search",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"rpm_names",
|
||||
"urls",
|
||||
"uuids"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"api.SearchPackageGroupResponse": {
|
||||
"properties": {
|
||||
"description": {
|
||||
|
|
@ -1066,6 +1131,37 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"api.SearchSnapshotModuleStreamsRequest": {
|
||||
"properties": {
|
||||
"rpm_names": {
|
||||
"description": "List of rpm names to restrict returned modules",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"search": {
|
||||
"description": "Search string to search module names",
|
||||
"type": "string"
|
||||
},
|
||||
"sort_by": {
|
||||
"description": "SortBy sets the sort order of the result",
|
||||
"type": "string"
|
||||
},
|
||||
"uuids": {
|
||||
"description": "List of snapshot UUIDs to search",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"rpm_names",
|
||||
"uuids"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"api.SnapshotCollectionResponse": {
|
||||
"properties": {
|
||||
"data": {
|
||||
|
|
@ -1285,6 +1381,45 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"api.Stream": {
|
||||
"properties": {
|
||||
"arch": {
|
||||
"description": "The Architecture of the rpm",
|
||||
"type": "string"
|
||||
},
|
||||
"context": {
|
||||
"description": "Context of the module",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Module description",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the module",
|
||||
"type": "string"
|
||||
},
|
||||
"profiles": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"description": "Module profile data",
|
||||
"type": "object"
|
||||
},
|
||||
"stream": {
|
||||
"description": "Module stream version",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"description": "The version of the rpm",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"api.TaskInfoCollectionResponse": {
|
||||
"properties": {
|
||||
"data": {
|
||||
|
|
@ -1483,6 +1618,22 @@
|
|||
"description": "Environment ID used by subscription-manager and candlepin",
|
||||
"type": "string"
|
||||
},
|
||||
"snapshots": {
|
||||
"description": "The list of snapshots in use by the template",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/api.SnapshotResponse"
|
||||
},
|
||||
"readOnly": true,
|
||||
"type": "array"
|
||||
},
|
||||
"to_be_deleted_snapshots": {
|
||||
"description": "List of snapshots used by this template which are going to be deleted soon",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/api.SnapshotResponse"
|
||||
},
|
||||
"readOnly": true,
|
||||
"type": "array"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "Datetime template was last updated",
|
||||
"type": "string"
|
||||
|
|
@ -1563,10 +1714,21 @@
|
|||
},
|
||||
"api.UploadResponse": {
|
||||
"properties": {
|
||||
"artifact_href": {
|
||||
"description": "Artifact href if one exists (on create only)",
|
||||
"type": "string"
|
||||
},
|
||||
"completed": {
|
||||
"description": "Timestamp when upload is committed",
|
||||
"type": "string"
|
||||
},
|
||||
"completed_checksums": {
|
||||
"description": "A list of already completed checksums",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"created": {
|
||||
"description": "Timestamp of creation",
|
||||
"type": "string"
|
||||
|
|
@ -1799,6 +1961,83 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/module_streams/search": {
|
||||
"post": {
|
||||
"description": "List modules and their streams for repositories",
|
||||
"operationId": "searchRepositoryModuleStreams",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/api.SearchModuleStreamsRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "request body",
|
||||
"required": true,
|
||||
"x-originalParamName": "body"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/api.SearchModuleStreams"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Bad Request"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Not Found"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Internal Server Error"
|
||||
}
|
||||
},
|
||||
"summary": "List modules and their streams for repositories",
|
||||
"tags": [
|
||||
"module_streams"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/package_groups/names": {
|
||||
"post": {
|
||||
"description": "This enables users to search for package groups in a given list of repositories.",
|
||||
|
|
@ -3938,6 +4177,30 @@
|
|||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Sort the response data based on specific repository parameters. Sort criteria can include `created_at`.",
|
||||
"in": "query",
|
||||
"name": "sort_by",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Starting point for retrieving a subset of results. Determines how many items to skip from the beginning of the result set. Default value:`0`.",
|
||||
"in": "query",
|
||||
"name": "offset",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Number of items to include in response. Use it to control the number of items, particularly when dealing with large datasets. Default value: `100`.",
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -4630,6 +4893,83 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/snapshots/module_streams/search": {
|
||||
"post": {
|
||||
"description": "List modules and their streams for snapshots",
|
||||
"operationId": "searchSnapshotModuleStreams",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/api.SearchSnapshotModuleStreamsRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "request body",
|
||||
"required": true,
|
||||
"x-originalParamName": "body"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/api.SearchModuleStreams"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Bad Request"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Not Found"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Internal Server Error"
|
||||
}
|
||||
},
|
||||
"summary": "List modules and their streams for snapshots",
|
||||
"tags": [
|
||||
"module_streams"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/snapshots/package_groups/names": {
|
||||
"post": {
|
||||
"description": "This enables users to search for package groups in a given list of snapshots.",
|
||||
|
|
@ -5505,6 +5845,78 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/templates/{template_uuid}/config.repo": {
|
||||
"get": {
|
||||
"operationId": "getTemplateRepoConfigurationFile",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Identifier of the template",
|
||||
"in": "path",
|
||||
"name": "template_uuid",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Bad Request"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Not Found"
|
||||
},
|
||||
"500": {
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/errors.ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Internal Server Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get configuration file for all repositories in a template",
|
||||
"tags": [
|
||||
"templates"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/templates/{uuid}": {
|
||||
"delete": {
|
||||
"description": "This enables deleting a specific template.",
|
||||
|
|
|
|||
|
|
@ -2073,6 +2073,11 @@ components:
|
|||
required:
|
||||
- rhsm
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: |
|
||||
An ID referring to a repository defined in content sources can be used instead of
|
||||
'baseurl', 'mirrorlist' or 'metalink'.
|
||||
rhsm:
|
||||
type: boolean
|
||||
baseurl:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue