1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/addons-schema.ts
andreas-unleash 66452e2860
open-api addon controller (#1721)
* open-api addon controller

* bug fixes

* bug fixes

* resolve merge conflict

* bug fix

* bug fix

* bug fix

* PR comments

* PR comments

* Resolve merge conflics

* Resolve merge conflics

* bug and tests
2022-06-22 13:49:18 +03:00

36 lines
976 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
import { addonSchema } from './addon-schema';
import { addonTypeSchema } from './addon-type-schema';
import { addonParameterSchema } from './addon-parameter-schema';
import { tagTypeSchema } from './tag-type-schema';
export const addonsSchema = {
$id: '#/components/schemas/addonsSchema',
type: 'object',
required: ['addons', 'providers'],
properties: {
addons: {
type: 'array',
items: {
$ref: '#/components/schemas/addonSchema',
},
},
providers: {
type: 'array',
items: {
$ref: '#/components/schemas/addonTypeSchema',
},
},
},
components: {
schemas: {
addonSchema,
addonTypeSchema,
tagTypeSchema,
addonParameterSchema,
},
},
} as const;
export type AddonsSchema = FromSchema<typeof addonsSchema>;