blob: 59c679b9c709f4f0c1bd495cc2cab76d88c22917 (
plain) (
tree)
|
|
import { ResponsesObject } from '@loopback/openapi-v3-types';
import { errorResponses } from './errors';
import { headers } from './headers';
export const generateResponses = (schemaName: string, example: any): ResponsesObject => ({
'200': {
headers,
description: 'OK',
content: {
'application/json': {
schema: { $ref: `#/components/schemas/${schemaName}` },
},
},
},
...errorResponses,
});
|