mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
1a5749ca08
* Refactor: move openapi utils into /util directory * Refactor: move utils test into `util` directory * Refactor: don't expose standard responses tied to status codes * Feat: update empty response description + make it const * Chore: update snapshot with new response descriptions
17 lines
383 B
TypeScript
17 lines
383 B
TypeScript
import { OpenAPIV3 } from 'openapi-types';
|
|
|
|
export const createResponseSchema = (
|
|
schemaName: string,
|
|
): OpenAPIV3.ResponseObject => {
|
|
return {
|
|
description: schemaName,
|
|
content: {
|
|
'application/json': {
|
|
schema: {
|
|
$ref: `#/components/schemas/${schemaName}`,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|