diff options
Diffstat (limited to 'packages/sra-spec/src/responses.ts')
-rw-r--r-- | packages/sra-spec/src/responses.ts | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/packages/sra-spec/src/responses.ts b/packages/sra-spec/src/responses.ts deleted file mode 100644 index cd7352058..000000000 --- a/packages/sra-spec/src/responses.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ResponsesObject } from '@loopback/openapi-v3-types'; - -import { errorResponses } from './errors'; -import { headers } from './headers'; - -export const generateResponses = (schemaName?: string, example?: any, description: string = 'OK'): ResponsesObject => { - const responses = { - '200': { - headers, - description, - content: {}, - }, - ...errorResponses, - }; - if (schemaName) { - responses['200'].content = { - 'application/json': { - schema: { $ref: `#/components/schemas/${schemaName}` }, - example, - }, - }; - } - return responses; -}; |