Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: document endpoint tagged Unstable #4118

Merged
merged 23 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6c4033a
chore: document endpoint tagged Unstable
andreas-unleash Jun 29, 2023
ae66b36
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
ac75b78
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
7b40438
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
6d580cd
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
a9119c3
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
fa131f4
Update src/lib/openapi/endpoint-descriptions.ts
andreas-unleash Jun 29, 2023
f24d930
chore: document schemas
andreas-unleash Jun 29, 2023
bbc1285
Merge remote-tracking branch 'origin/chore/open_api_unstable' into ch…
andreas-unleash Jun 29, 2023
7bd2950
chore: document schemas tagged Unstable
andreas-unleash Jun 30, 2023
e82f165
Merge branch 'main' into chore/open_api_unstable
andreas-unleash Jun 30, 2023
cd140c4
Update src/lib/openapi/spec/import-toggles-validate-schema.ts
andreas-unleash Jun 30, 2023
807593a
Update src/lib/openapi/spec/export-result-schema.ts
andreas-unleash Jun 30, 2023
d593337
Update src/lib/openapi/spec/import-toggles-schema.ts
andreas-unleash Jun 30, 2023
68ff640
Merge branch 'main' into chore/open_api_unstable
andreas-unleash Jun 30, 2023
eb136c0
chore: document schemas tagged Unstable
andreas-unleash Jun 30, 2023
2a33dc5
openapi: make meta schema tests happy
thomasheartman Jul 4, 2023
3dbdedd
chore: update snapshot
thomasheartman Jul 4, 2023
923b82c
openapi: fix example value
thomasheartman Jul 4, 2023
fefdc26
chore: add missing example
thomasheartman Jul 4, 2023
e0f046e
chore: remove dev statement
thomasheartman Jul 4, 2023
66e131e
chore: remove log
thomasheartman Jul 4, 2023
5c5bd99
chore: update snapshot
thomasheartman Jul 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { IAuthRequest } from '../../routes/unleash-types';
import { extractUsername } from '../../util';
import { BadDataError, InvalidOperationError } from '../../error';
import ApiUser from '../../types/api-user';
import { endpointDescriptions } from '../../openapi/endpoint-descriptions';

class ExportImportController extends Controller {
private logger: Logger;
Expand Down Expand Up @@ -71,6 +72,7 @@ class ExportImportController extends Controller {
responses: {
200: createResponseSchema('exportResultSchema'),
},
...endpointDescriptions.admin.export,
}),
],
});
Expand All @@ -81,9 +83,6 @@ class ExportImportController extends Controller {
handler: this.validateImport,
middleware: [
openApiService.validPath({
summary:
'Validate import of feature toggles for an environment in the project',
description: `Unleash toggles exported from a different instance can be imported into a new project and environment`,
tags: ['Unstable'],
operationId: 'validateImport',
requestBody: createRequestSchema('importTogglesSchema'),
Expand All @@ -92,6 +91,7 @@ class ExportImportController extends Controller {
'importTogglesValidateSchema',
),
},
...endpointDescriptions.admin.validateImport,
}),
],
});
Expand All @@ -102,15 +102,13 @@ class ExportImportController extends Controller {
handler: this.importData,
middleware: [
openApiService.validPath({
summary:
'Import feature toggles for an environment in the project',
description: `Unleash toggles exported from a different instance can be imported into a new project and environment`,
tags: ['Unstable'],
operationId: 'importToggles',
requestBody: createRequestSchema('importTogglesSchema'),
responses: {
200: emptyResponse,
},
...endpointDescriptions.admin.import,
}),
],
});
Expand Down
15 changes: 15 additions & 0 deletions src/lib/openapi/endpoint-descriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,20 @@ export const endpointDescriptions = {
summary:
'Batch evaluate an Unleash context against a set of environments and projects.',
},
export: {
description:
'Specify the `environment` you would liket to export and use the optional `downloadFile` flag to get the file',
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
summary:
'Export all feature toggle definitions from an environment',
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
},
validateImport: {
summary:
'Validate import of feature toggles for an environment in the project',
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
description: `Unleash toggles exported from a different instance can be imported into a new project and environment`,
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
},
import: {
summary: 'Import feature toggles for an environment in the project',
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
description: `Unleash toggles exported from a different instance can be imported into a new project and environment`,
andreas-unleash marked this conversation as resolved.
Show resolved Hide resolved
},
},
} as const;