We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Image used: 6c07143937e57095d8478efc8ab7eab52b44e67c7673285f8c0a2bf4a7b137ad
openapi: 3.0.3 info: title: test version: '1.0' servers: - url: 'http://localhost:8000' paths: /test: get: responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean default: 'true' examples: a: value: ok: true headers: ETag: schema: type: string example: '"c561c68d0ba92bbeb8b0f612a9199f722e3a621a"' Last-Modified: schema: type: string example: Mon, 18 Jul 2016 02:36:04 GMT
Will return:
HTTP/1.1 200 OK Access-Control-Allow-Origin: * Content-Type: application/json Etag: string Last-Modified: string Date: Thu, 23 Apr 2020 22:38:43 GMT Content-Length: 16
Either the example values should be provided or (better) real values should be generated.
The text was updated successfully, but these errors were encountered:
This is related to #46.
In the case of:
ETag: schema: type: string Last-Modified: schema: type: string
The output would preferably be:
Etag: ${eTag} Last-Modified: ${lastModified}
with
const serverStartup = new Date(); // ... const lastModified = `${serverStartup}`; const eTag = `"${serverStartup.getTime()}"`;
instead of
Etag: string Last-Modified: string
You might even return those 2 headers regardless of their inclusion in the OpenAPI file.
Sorry, something went wrong.
i would use serverStartup only if examples are not provided: after all, apisprout is all about serving examples
No branches or pull requests
Docker Image used: 6c07143937e57095d8478efc8ab7eab52b44e67c7673285f8c0a2bf4a7b137ad
Will return:
Either the example values should be provided or (better) real values should be generated.
The text was updated successfully, but these errors were encountered: