1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: backport changes from 4.20 (#3021)

## About the changes
Changes included in 4.20 release, mainly improving OpenAPI tags
This commit is contained in:
Gastón Fournier 2023-01-30 16:02:42 +01:00 committed by GitHub
parent 751b714642
commit 9c214858c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 9 deletions

View File

@ -13,6 +13,11 @@ const OPENAPI_TAGS = [
description:
'Create, update, and delete [Unleash API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys).',
},
{
name: 'Personal access tokens',
description:
'Create, update, and delete [Personal access tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens).',
},
{
name: 'Archive',
description:
@ -96,10 +101,20 @@ const OPENAPI_TAGS = [
'Experimental endpoints that may change or disappear at any time.',
},
{ name: 'Edge', description: 'Endpoints related to Unleash on the Edge.' },
{
name: 'Frontend API',
description:
'API for connecting client-side (frontend) applications to Unleash.',
},
{
name: 'Maintenance',
description: 'Enable/disable the maintenance mode of Unleash.',
},
{
name: 'Change Requests',
description:
'API for managing [change requests](https://docs.getunleash.io/reference/change-requests).',
},
] as const;
// make the export mutable, so it can be used in a schema

View File

@ -39,7 +39,7 @@ export default class PatController extends Controller {
permission: NONE,
middleware: [
openApiService.validPath({
tags: ['API tokens'],
tags: ['Personal access tokens'],
operationId: 'getPats',
responses: { 200: createResponseSchema('patsSchema') },
}),
@ -52,7 +52,7 @@ export default class PatController extends Controller {
permission: NONE,
middleware: [
openApiService.validPath({
tags: ['API tokens'],
tags: ['Personal access tokens'],
operationId: 'createPat',
requestBody: createRequestSchema('patSchema'),
responses: { 200: createResponseSchema('patSchema') },
@ -68,7 +68,7 @@ export default class PatController extends Controller {
permission: NONE,
middleware: [
openApiService.validPath({
tags: ['API tokens'],
tags: ['Personal access tokens'],
operationId: 'deletePat',
responses: { 200: emptyResponse },
}),

View File

@ -63,7 +63,7 @@ export default class ProxyController extends Controller {
permission: NONE,
middleware: [
this.services.openApiService.validPath({
tags: ['Unstable'],
tags: ['Frontend API'],
operationId: 'getFrontendFeatures',
responses: {
200: createResponseSchema('proxyFeaturesSchema'),
@ -93,7 +93,7 @@ export default class ProxyController extends Controller {
permission: NONE,
middleware: [
this.services.openApiService.validPath({
tags: ['Unstable'],
tags: ['Frontend API'],
operationId: 'registerFrontendMetrics',
requestBody: createRequestSchema('proxyMetricsSchema'),
responses: { 200: emptyResponse },
@ -108,7 +108,7 @@ export default class ProxyController extends Controller {
permission: NONE,
middleware: [
this.services.openApiService.validPath({
tags: ['Unstable'],
tags: ['Frontend API'],
operationId: 'registerFrontendClient',
requestBody: createRequestSchema('proxyClientSchema'),
responses: { 200: emptyResponse },

View File

@ -7915,7 +7915,7 @@ If the provided project does not exist, the list of events will be empty.",
},
},
"tags": [
"API tokens",
"Personal access tokens",
],
},
"post": {
@ -7944,7 +7944,7 @@ If the provided project does not exist, the list of events will be empty.",
},
},
"tags": [
"API tokens",
"Personal access tokens",
],
},
},
@ -7967,7 +7967,7 @@ If the provided project does not exist, the list of events will be empty.",
},
},
"tags": [
"API tokens",
"Personal access tokens",
],
},
},
@ -8364,6 +8364,10 @@ If the provided project does not exist, the list of events will be empty.",
"description": "Manage logins, passwords, etc.",
"name": "Auth",
},
{
"description": "API for managing [change requests](https://docs.getunleash.io/reference/change-requests).",
"name": "Change Requests",
},
{
"description": "Endpoints for [Unleash server-side clients](https://docs.getunleash.io/reference/sdks).",
"name": "Client",
@ -8388,6 +8392,10 @@ If the provided project does not exist, the list of events will be empty.",
"description": "Create, update, and delete [features toggles](https://docs.getunleash.io/reference/feature-toggles).",
"name": "Features",
},
{
"description": "API for connecting client-side (frontend) applications to Unleash.",
"name": "Frontend API",
},
{
"description": "[Import and export](https://docs.getunleash.io/deploy/import_export) the state of your Unleash instance.",
"name": "Import/Export",
@ -8408,6 +8416,10 @@ If the provided project does not exist, the list of events will be empty.",
"description": "Endpoints related to the operational status of this Unleash instance.",
"name": "Operational",
},
{
"description": "Create, update, and delete [Personal access tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens).",
"name": "Personal access tokens",
},
{
"description": "Evaluate an Unleash context against your feature toggles.",
"name": "Playground",