Skip to content

Commit

Permalink
Add example for 200 response (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
melroy89 authored Mar 31, 2024
1 parent 5ca7154 commit a448916
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ async function fastifyUnderPressure (fastify, opts) {
properties: Object.assign(
{ status: { type: 'string' } },
opts.exposeStatusRoute.routeResponseSchemaOpts
)
),
example: {
status: 'ok'
}
},
500: {
type: 'object',
Expand Down
6 changes: 6 additions & 0 deletions test/statusRoute.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ test('Expose status route with additional route options, route schema options',
description: 'Health Check Succeeded',
properties: {
status: { type: 'string' }
},
example: {
status: 'ok'
}
},
500: {
Expand Down Expand Up @@ -188,6 +191,9 @@ test('Expose status route with additional route options, route schema options an
description: 'Health Check Succeeded',
properties: {
status: { type: 'string' }
},
example: {
status: 'ok'
}
},
500: {
Expand Down

0 comments on commit a448916

Please sign in to comment.