mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
18 lines
409 B
TypeScript
18 lines
409 B
TypeScript
|
import { OpenAPIV3 } from 'openapi-types';
|
||
|
|
||
|
export const createRequestSchema = (
|
||
|
schemaName: string,
|
||
|
): OpenAPIV3.RequestBodyObject => {
|
||
|
return {
|
||
|
description: schemaName,
|
||
|
required: true,
|
||
|
content: {
|
||
|
'application/json': {
|
||
|
schema: {
|
||
|
$ref: `#/components/schemas/${schemaName}`,
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
};
|