2022-04-25 14:17:59 +02:00
|
|
|
import { OpenAPIV3 } from 'openapi-types';
|
2022-11-17 12:02:40 +01:00
|
|
|
import {
|
|
|
|
addonParameterSchema,
|
|
|
|
addonSchema,
|
|
|
|
addonsSchema,
|
|
|
|
addonTypeSchema,
|
|
|
|
apiTokenSchema,
|
|
|
|
apiTokensSchema,
|
|
|
|
applicationSchema,
|
|
|
|
applicationsSchema,
|
|
|
|
changePasswordSchema,
|
|
|
|
clientApplicationSchema,
|
|
|
|
clientFeatureSchema,
|
|
|
|
clientFeaturesQuerySchema,
|
|
|
|
clientFeaturesSchema,
|
|
|
|
clientMetricsSchema,
|
|
|
|
cloneFeatureSchema,
|
|
|
|
constraintSchema,
|
|
|
|
contextFieldSchema,
|
|
|
|
contextFieldsSchema,
|
|
|
|
createApiTokenSchema,
|
|
|
|
createFeatureSchema,
|
|
|
|
createFeatureStrategySchema,
|
|
|
|
createInvitedUserSchema,
|
|
|
|
createUserSchema,
|
|
|
|
dateSchema,
|
|
|
|
edgeTokenSchema,
|
|
|
|
emailSchema,
|
|
|
|
environmentProjectSchema,
|
|
|
|
environmentSchema,
|
|
|
|
environmentsProjectSchema,
|
|
|
|
environmentsSchema,
|
|
|
|
eventSchema,
|
|
|
|
eventsSchema,
|
|
|
|
featureEnvironmentMetricsSchema,
|
|
|
|
featureEnvironmentSchema,
|
|
|
|
featureEventsSchema,
|
|
|
|
featureMetricsSchema,
|
|
|
|
featureSchema,
|
|
|
|
featuresSchema,
|
|
|
|
featureStrategySchema,
|
|
|
|
featureStrategySegmentSchema,
|
|
|
|
featureTagSchema,
|
|
|
|
featureTypeSchema,
|
|
|
|
featureTypesSchema,
|
|
|
|
featureUsageSchema,
|
|
|
|
featureVariantsSchema,
|
|
|
|
feedbackSchema,
|
|
|
|
groupSchema,
|
|
|
|
groupsSchema,
|
|
|
|
groupUserModelSchema,
|
|
|
|
healthCheckSchema,
|
|
|
|
healthOverviewSchema,
|
|
|
|
healthReportSchema,
|
|
|
|
idSchema,
|
|
|
|
instanceAdminStatsSchema,
|
|
|
|
legalValueSchema,
|
|
|
|
loginSchema,
|
|
|
|
meSchema,
|
|
|
|
nameSchema,
|
|
|
|
overrideSchema,
|
|
|
|
parametersSchema,
|
|
|
|
passwordSchema,
|
|
|
|
patchesSchema,
|
|
|
|
patchSchema,
|
|
|
|
patSchema,
|
|
|
|
patsSchema,
|
|
|
|
permissionSchema,
|
|
|
|
playgroundConstraintSchema,
|
|
|
|
playgroundFeatureSchema,
|
|
|
|
playgroundRequestSchema,
|
|
|
|
playgroundResponseSchema,
|
|
|
|
playgroundSegmentSchema,
|
|
|
|
playgroundStrategySchema,
|
|
|
|
profileSchema,
|
|
|
|
projectEnvironmentSchema,
|
|
|
|
projectSchema,
|
|
|
|
projectsSchema,
|
|
|
|
proxyClientSchema,
|
|
|
|
proxyFeatureSchema,
|
|
|
|
proxyFeaturesSchema,
|
|
|
|
proxyMetricsSchema,
|
|
|
|
publicSignupTokenCreateSchema,
|
|
|
|
publicSignupTokenSchema,
|
|
|
|
publicSignupTokensSchema,
|
|
|
|
publicSignupTokenUpdateSchema,
|
|
|
|
resetPasswordSchema,
|
2022-12-12 14:05:56 +01:00
|
|
|
requestsPerSecondSchema,
|
|
|
|
requestsPerSecondSegmentedSchema,
|
2022-11-17 12:02:40 +01:00
|
|
|
roleSchema,
|
|
|
|
sdkContextSchema,
|
|
|
|
searchEventsSchema,
|
|
|
|
segmentSchema,
|
|
|
|
setStrategySortOrderSchema,
|
|
|
|
setUiConfigSchema,
|
|
|
|
sortOrderSchema,
|
|
|
|
splashSchema,
|
|
|
|
stateSchema,
|
|
|
|
strategiesSchema,
|
|
|
|
strategySchema,
|
|
|
|
tagSchema,
|
|
|
|
tagsSchema,
|
|
|
|
tagTypeSchema,
|
|
|
|
tagTypesSchema,
|
|
|
|
tagWithVersionSchema,
|
|
|
|
tokenUserSchema,
|
|
|
|
uiConfigSchema,
|
|
|
|
updateApiTokenSchema,
|
|
|
|
updateFeatureSchema,
|
|
|
|
updateFeatureStrategySchema,
|
|
|
|
updateTagTypeSchema,
|
|
|
|
updateUserSchema,
|
|
|
|
upsertContextFieldSchema,
|
|
|
|
upsertStrategySchema,
|
|
|
|
userSchema,
|
|
|
|
usersGroupsBaseSchema,
|
|
|
|
usersSchema,
|
|
|
|
usersSearchSchema,
|
|
|
|
validateEdgeTokensSchema,
|
|
|
|
validatePasswordSchema,
|
|
|
|
validateTagTypeSchema,
|
|
|
|
variantSchema,
|
|
|
|
variantsSchema,
|
|
|
|
versionSchema,
|
|
|
|
} from './spec';
|
2022-09-30 13:01:32 +02:00
|
|
|
import { IServerOption } from '../types';
|
2022-11-17 12:02:40 +01:00
|
|
|
import { mapValues, omitKeys } from '../util';
|
|
|
|
import { openApiTags } from './util';
|
2022-09-30 13:01:32 +02:00
|
|
|
import { URL } from 'url';
|
Fix(#1391): Expose API version even when not running via npm/yarn (#2062)
* Fix(#1391): Expose API version even when not running via npm/yarn
## What
Expose the current Unleash version in the generated OpenAPI docs, even
when running via docker or other processes.
## Why
An OpenAPI spec without a version isn't valid. This causes some of our
generation tools (such as the one for documentation) to fail.
## How
By changing how we fetch the current version:
Previously, we used `process.env.npm_package_version!`. However, when
you're not running with yarn or npm, this is `undefined`. That causes
the version number to not be included when running tests and when
running using the official docker image.
Instead, we now use `version` from `lib/util/version`. This is the
same version as the one used by the UI config endpoint, so it should
be the same one as what the front end displays. To the best of my
knowledge, this _is_ the version of the API.
## Discussion
It _may_ be that I have misunderstood what the version represents, but
from what I can tell, it just exports what's listed as the version in
package.json.
The source code of the `lib/util/version` file is:
```ts
// export module version
require('pkginfo')(module, 'version');
const { version } = module.exports;
export default version;
module.exports = version;
```
* Refactor(#1391): rename imported variable for clarity
2022-09-15 12:22:21 +02:00
|
|
|
import apiVersion from '../util/version';
|
2022-06-08 08:01:14 +02:00
|
|
|
|
2022-06-13 11:23:36 +02:00
|
|
|
// All schemas in `openapi/spec` should be listed here.
|
2022-06-08 08:01:14 +02:00
|
|
|
export const schemas = {
|
2022-06-30 14:21:40 +02:00
|
|
|
addonParameterSchema,
|
2022-06-22 12:49:18 +02:00
|
|
|
addonSchema,
|
|
|
|
addonsSchema,
|
|
|
|
addonTypeSchema,
|
2022-06-17 21:35:26 +02:00
|
|
|
apiTokenSchema,
|
|
|
|
apiTokensSchema,
|
2022-06-21 09:12:40 +02:00
|
|
|
applicationSchema,
|
|
|
|
applicationsSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
changePasswordSchema,
|
2022-06-24 15:29:27 +02:00
|
|
|
clientApplicationSchema,
|
2022-06-30 11:54:14 +02:00
|
|
|
clientFeatureSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
clientFeaturesQuerySchema,
|
2022-06-30 11:54:14 +02:00
|
|
|
clientFeaturesSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
clientMetricsSchema,
|
|
|
|
cloneFeatureSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
constraintSchema,
|
2022-06-17 11:11:55 +02:00
|
|
|
contextFieldSchema,
|
|
|
|
contextFieldsSchema,
|
2022-06-17 21:35:26 +02:00
|
|
|
createApiTokenSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
createFeatureSchema,
|
2022-06-23 08:10:20 +02:00
|
|
|
createFeatureStrategySchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
createInvitedUserSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
createUserSchema,
|
2022-06-30 12:27:12 +02:00
|
|
|
dateSchema,
|
2022-09-14 14:29:12 +02:00
|
|
|
edgeTokenSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
emailSchema,
|
2022-06-08 15:31:34 +02:00
|
|
|
environmentSchema,
|
2022-11-11 11:24:56 +01:00
|
|
|
environmentProjectSchema,
|
2022-06-10 10:04:56 +02:00
|
|
|
environmentsSchema,
|
2022-11-11 11:24:56 +01:00
|
|
|
environmentsProjectSchema,
|
2022-06-30 10:12:34 +02:00
|
|
|
eventSchema,
|
|
|
|
eventsSchema,
|
2022-06-27 10:17:44 +02:00
|
|
|
featureEnvironmentMetricsSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
featureEnvironmentSchema,
|
2022-06-30 10:12:34 +02:00
|
|
|
featureEventsSchema,
|
2022-06-27 10:17:44 +02:00
|
|
|
featureMetricsSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
featureSchema,
|
|
|
|
featuresSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
featureStrategySchema,
|
2022-06-22 09:09:49 +02:00
|
|
|
featureStrategySegmentSchema,
|
|
|
|
featureTagSchema,
|
2022-06-09 13:17:13 +02:00
|
|
|
featureTypeSchema,
|
|
|
|
featureTypesSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
featureUsageSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
featureVariantsSchema,
|
2022-06-17 08:15:56 +02:00
|
|
|
feedbackSchema,
|
2022-07-21 16:23:56 +02:00
|
|
|
groupSchema,
|
|
|
|
groupsSchema,
|
|
|
|
groupUserModelSchema,
|
2022-06-20 12:22:41 +02:00
|
|
|
healthCheckSchema,
|
2022-06-08 15:31:34 +02:00
|
|
|
healthOverviewSchema,
|
|
|
|
healthReportSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
idSchema,
|
2022-10-25 13:10:27 +02:00
|
|
|
instanceAdminStatsSchema,
|
2022-06-17 11:11:55 +02:00
|
|
|
legalValueSchema,
|
2022-06-23 09:40:25 +02:00
|
|
|
loginSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
meSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
nameSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
overrideSchema,
|
|
|
|
parametersSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
passwordSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
patchesSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
patchSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
patSchema,
|
|
|
|
patsSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
permissionSchema,
|
feat(#1873/playground): Return detailed information on feature toggle evaluation (#1839)
* Feat: return reasons why a feature evaluated to true or false
Note: this is very rough and just straight ripped from the nodejs
client. It will need a lot of work, but is a good place to start
* Feat: add suggested shape for new payload
* Chore: minor cleanup
* Wip: make server compile again
* Remove unused schema ref
* Export new schemas
* Chore: fix some tests to use sub property
* Fix: fix some tests
* Refactor: rename some variables, uncomment some stuff
* Add segments type to bootstrap options
* Add segments capability to offline feature evaluator
* Fix function calls after turning params into an option abject
* Feat: test strategy order, etc
* Feat: add test to check that all strats are returned correctly
* Feat: allow you to include strategy ids in clients
* Wip: hook up segments in the offline client.
Note: compared to regular clients, they still fail
* Feat: add segments validation
* Fix: fix test case invariant.
* Chore: revert to returning only `boolean` from strategies.
This _should_ make it work with custom strategies too 🤞
* Feat: make more properties of the returned feature required
* Wip: add some comments and unfinished tests for edge cases
* Feat: add `isEnabledInCurrentEnvironment` prop
* Feat: consider more strategy failure cases
* Feat: test that isenabledinenvironment matches expectations
* Feat: add unknown strategies
* Fix: fix property access typo
* Feat: add unknown strategy for fallback purposes
* Feat: test edge case: all unknown strategies
* Feat: add custom strategy to arbitrary
* Feat: test that features can be true, even if not enabled in env
* Chore: add some comments
* Wip: fix sdk tests
* Remove comments, improve test logging
* Feat: add descriptions and examples to playground feature schema
* Switch `examples` for `example`
* Update schemas with descriptions and examples
* Fix: update snapshot
* Fix: openapi example
* Fix: merge issues
* Fix: fix issue where feature evaluation state was wrong
* Chore: update openapi spec
* Fix: fix broken offline client tests
* Refactor: move schemas into separate files
* Refactor: remove "reason" for incomplete evaluation.
The only instances where evaluation is incomplete is when we don't
know what the strategy is.
* Refactor: move unleash node client into test and dev dependencies
* Wip: further removal of stuff
* Chore: remove a bunch of code that we don't use
* Chore: remove comment
* Chore: remove unused code
* Fix: fix some prettier errors
* Type parameters in strategies to avoid `any`
* Fix: remove commented out code
* Feat: make `id` required on playground strategies
* Chore: remove redundant type
* Fix: remove redundant if and fix fallback evaluation
* Refactor: reduce nesting and remove duplication
* Fix: remove unused helper function
* Refactor: type `parameters` as `unknown`
* Chore: remove redundant comment
* Refactor: move constraint code into a separate file
* Refactor: rename `unleash` -> `feature-evaluator`
* Rename class `Unleash` -> `FeatureEvaluator`
* Refactor: remove this.ready and sync logic from feature evaluator
* Refactor: remove unused code, rename config type
* Refactor: remove event emission from the Unleash client
* Remove unlistened-for events in feature evaluator
* Refactor: make offline client synchronous; remove code
* Fix: update openapi snapshot after adding required strategy ids
* Feat: change `strategies` format.
This commit changes the format of a playground feature's `strategies`
properties from a list of strategies to an object with properties
`result` and `data`. It looks a bit like this:
```ts
type Strategies = {
result: boolean | "unknown",
data: Strategy[]
}
```
The reason is that this allows us to avoid the breaking change that
was previously suggested in the PR:
`feature.isEnabled` used to be a straight boolean. Then, when we found
out we couldn't necessarily evaluate all strategies (custom strats are
hard!) we changed it to `boolean | 'unevaluated'`. However, this is
confusing on a few levels as the playground results are no longer the
same as the SDK would be, nor are they strictly boolean anymore.
This change reverts the `isEnabled` functionality to what it was
before (so it's always a mirror of what the SDK would show).
The equivalent of `feature.isEnabled === 'unevaluated'` now becomes
`feature.isEnabled && strategy.result === 'unknown'`.
* Fix: Fold long string descriptions over multiple lines.
* Fix: update snapshot after adding line breaks to descriptions
2022-08-04 15:41:52 +02:00
|
|
|
playgroundConstraintSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
playgroundFeatureSchema,
|
2022-07-12 13:01:10 +02:00
|
|
|
playgroundRequestSchema,
|
2022-07-26 14:16:30 +02:00
|
|
|
playgroundResponseSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
playgroundSegmentSchema,
|
|
|
|
playgroundStrategySchema,
|
2022-09-29 15:27:54 +02:00
|
|
|
profileSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
projectEnvironmentSchema,
|
|
|
|
projectSchema,
|
|
|
|
projectsSchema,
|
2022-09-14 14:29:12 +02:00
|
|
|
proxyClientSchema,
|
|
|
|
proxyFeatureSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
proxyFeaturesSchema,
|
2022-09-14 14:29:12 +02:00
|
|
|
proxyMetricsSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
publicSignupTokenCreateSchema,
|
|
|
|
publicSignupTokenSchema,
|
|
|
|
publicSignupTokensSchema,
|
|
|
|
publicSignupTokenUpdateSchema,
|
2022-06-22 13:31:41 +02:00
|
|
|
resetPasswordSchema,
|
2022-12-12 14:05:56 +01:00
|
|
|
requestsPerSecondSchema,
|
|
|
|
requestsPerSecondSegmentedSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
roleSchema,
|
2022-07-12 13:01:10 +02:00
|
|
|
sdkContextSchema,
|
2022-08-09 16:14:50 +02:00
|
|
|
searchEventsSchema,
|
2022-06-22 09:09:49 +02:00
|
|
|
segmentSchema,
|
2022-07-26 14:16:30 +02:00
|
|
|
setStrategySortOrderSchema,
|
2022-08-26 09:09:48 +02:00
|
|
|
setUiConfigSchema,
|
2022-06-10 10:04:56 +02:00
|
|
|
sortOrderSchema,
|
2022-06-10 15:11:07 +02:00
|
|
|
splashSchema,
|
2022-06-22 09:09:49 +02:00
|
|
|
stateSchema,
|
2022-06-23 08:10:20 +02:00
|
|
|
strategiesSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
strategySchema,
|
|
|
|
tagSchema,
|
|
|
|
tagsSchema,
|
2022-06-14 09:06:41 +02:00
|
|
|
tagTypeSchema,
|
|
|
|
tagTypesSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
tagWithVersionSchema,
|
2022-06-22 13:31:41 +02:00
|
|
|
tokenUserSchema,
|
2022-06-08 14:57:39 +02:00
|
|
|
uiConfigSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
updateApiTokenSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
updateFeatureSchema,
|
2022-06-23 08:10:20 +02:00
|
|
|
updateFeatureStrategySchema,
|
2022-06-14 09:06:41 +02:00
|
|
|
updateTagTypeSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
updateUserSchema,
|
2022-06-17 11:11:55 +02:00
|
|
|
upsertContextFieldSchema,
|
2022-06-23 08:10:20 +02:00
|
|
|
upsertStrategySchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
userSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
usersGroupsBaseSchema,
|
2022-06-22 14:55:43 +02:00
|
|
|
usersSchema,
|
|
|
|
usersSearchSchema,
|
2022-09-30 13:01:32 +02:00
|
|
|
validateEdgeTokensSchema,
|
2022-06-30 14:21:40 +02:00
|
|
|
validatePasswordSchema,
|
|
|
|
validateTagTypeSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
variantSchema,
|
|
|
|
variantsSchema,
|
2022-06-08 14:57:39 +02:00
|
|
|
versionSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
};
|
|
|
|
|
2022-06-13 11:23:36 +02:00
|
|
|
// Schemas must have an $id property on the form "#/components/schemas/mySchema".
|
|
|
|
export type SchemaId = typeof schemas[keyof typeof schemas]['$id'];
|
|
|
|
|
|
|
|
// Schemas must list all their $refs in `components`, including nested schemas.
|
|
|
|
export type SchemaRef = typeof schemas[keyof typeof schemas]['components'];
|
|
|
|
|
|
|
|
// JSON schema properties that should not be included in the OpenAPI spec.
|
|
|
|
export interface JsonSchemaProps {
|
|
|
|
$id: string;
|
|
|
|
components: object;
|
|
|
|
}
|
|
|
|
|
2022-06-10 10:04:56 +02:00
|
|
|
// Remove JSONSchema keys that would result in an invalid OpenAPI spec.
|
|
|
|
export const removeJsonSchemaProps = <T extends JsonSchemaProps>(
|
|
|
|
schema: T,
|
|
|
|
): OpenAPIV3.SchemaObject => {
|
|
|
|
return omitKeys(schema, '$id', 'components');
|
|
|
|
};
|
|
|
|
|
2022-06-27 15:39:08 +02:00
|
|
|
const findRootUrl: (unleashUrl: string, baseUriPath: string) => string = (
|
|
|
|
unleashUrl: string,
|
|
|
|
baseUriPath?: string,
|
|
|
|
) => {
|
|
|
|
if (!baseUriPath) {
|
|
|
|
return unleashUrl;
|
|
|
|
}
|
|
|
|
const baseUrl = new URL(unleashUrl);
|
|
|
|
if (baseUrl.pathname.indexOf(baseUriPath) >= 0) {
|
|
|
|
return `${baseUrl.protocol}//${baseUrl.host}`;
|
|
|
|
}
|
|
|
|
return baseUrl.toString();
|
|
|
|
};
|
|
|
|
|
|
|
|
export const createOpenApiSchema = ({
|
|
|
|
unleashUrl,
|
|
|
|
baseUriPath,
|
|
|
|
}: Pick<IServerOption, 'unleashUrl' | 'baseUriPath'>): Omit<
|
|
|
|
OpenAPIV3.Document,
|
|
|
|
'paths'
|
|
|
|
> => {
|
|
|
|
const url = findRootUrl(unleashUrl, baseUriPath);
|
2022-04-25 14:17:59 +02:00
|
|
|
return {
|
|
|
|
openapi: '3.0.3',
|
2022-06-27 15:39:08 +02:00
|
|
|
servers: url ? [{ url }] : [],
|
2022-04-25 14:17:59 +02:00
|
|
|
info: {
|
|
|
|
title: 'Unleash API',
|
Fix(#1391): Expose API version even when not running via npm/yarn (#2062)
* Fix(#1391): Expose API version even when not running via npm/yarn
## What
Expose the current Unleash version in the generated OpenAPI docs, even
when running via docker or other processes.
## Why
An OpenAPI spec without a version isn't valid. This causes some of our
generation tools (such as the one for documentation) to fail.
## How
By changing how we fetch the current version:
Previously, we used `process.env.npm_package_version!`. However, when
you're not running with yarn or npm, this is `undefined`. That causes
the version number to not be included when running tests and when
running using the official docker image.
Instead, we now use `version` from `lib/util/version`. This is the
same version as the one used by the UI config endpoint, so it should
be the same one as what the front end displays. To the best of my
knowledge, this _is_ the version of the API.
## Discussion
It _may_ be that I have misunderstood what the version represents, but
from what I can tell, it just exports what's listed as the version in
package.json.
The source code of the `lib/util/version` file is:
```ts
// export module version
require('pkginfo')(module, 'version');
const { version } = module.exports;
export default version;
module.exports = version;
```
* Refactor(#1391): rename imported variable for clarity
2022-09-15 12:22:21 +02:00
|
|
|
version: apiVersion,
|
2022-04-25 14:17:59 +02:00
|
|
|
},
|
2022-06-08 08:01:14 +02:00
|
|
|
security: [{ apiKey: [] }],
|
2022-04-25 14:17:59 +02:00
|
|
|
components: {
|
|
|
|
securitySchemes: {
|
|
|
|
apiKey: {
|
|
|
|
type: 'apiKey',
|
|
|
|
in: 'header',
|
|
|
|
name: 'Authorization',
|
|
|
|
},
|
|
|
|
},
|
2022-06-10 10:04:56 +02:00
|
|
|
schemas: mapValues(schemas, removeJsonSchemaProps),
|
2022-04-25 14:17:59 +02:00
|
|
|
},
|
2022-08-12 11:37:57 +02:00
|
|
|
tags: openApiTags,
|
2022-04-25 14:17:59 +02:00
|
|
|
};
|
|
|
|
};
|
2022-11-17 12:02:40 +01:00
|
|
|
|
|
|
|
export * from './util';
|
|
|
|
export * from './spec';
|