aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-api/src/responses.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sra-api/src/responses.ts')
-rw-r--r--packages/sra-api/src/responses.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sra-api/src/responses.ts b/packages/sra-api/src/responses.ts
index 59c679b9c..03a0cced8 100644
--- a/packages/sra-api/src/responses.ts
+++ b/packages/sra-api/src/responses.ts
@@ -3,13 +3,14 @@ import { ResponsesObject } from '@loopback/openapi-v3-types';
import { errorResponses } from './errors';
import { headers } from './headers';
-export const generateResponses = (schemaName: string, example: any): ResponsesObject => ({
+export const generateResponses = (schemaName: string, example: any, description: string = 'OK'): ResponsesObject => ({
'200': {
headers,
- description: 'OK',
+ description,
content: {
'application/json': {
schema: { $ref: `#/components/schemas/${schemaName}` },
+ example,
},
},
},