mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
adface17c7
* refactor: normalize controller file names * refactor: throw invalid responses in dev mode * refactor: add OpenAPI schema to environments controller * refactor: improve JSON schema prop removal code * refactor: fix empty response specs
29 lines
649 B
TypeScript
29 lines
649 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const environmentSchema = {
|
|
$id: '#/components/schemas/environmentSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['name', 'type', 'enabled'],
|
|
properties: {
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
type: {
|
|
type: 'string',
|
|
},
|
|
enabled: {
|
|
type: 'boolean',
|
|
},
|
|
protected: {
|
|
type: 'boolean',
|
|
},
|
|
sortOrder: {
|
|
type: 'number',
|
|
},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type EnvironmentSchema = FromSchema<typeof environmentSchema>;
|