Open juliangehring opened 1 year ago
I tried exactly the example you've given without seeing the error you have.
Using current release 0.1.10
.
The code with an empty schema (schema: {}
) does not throw an error - however, it renders an empty json object in the schema on the documentation page. This is what I would like to avoid, for responses that don't return an object.
The error occurs when trying to omit schema
, either by a) setting schema to null: schema: null
or b) omitting schema
completely:
responses: {
'415': {
description: 'Not supported'
}
}
which yields the Uncaught TypeError: Cannot read properties of undefined (reading 'generated')
Yes I did observe that error when schema
is missing.
A curious thing given everything in ResponseSchema
is supposedly optional.
The same issue would apply when returning 204 No Content
for a delete action which cannot contain content.
Thanks for confirming. I agree that it would be good to avoid the error when schema is missing.
If there are other ways to skip the schema, I would be open to ideas.
Is it possible to define a response that has no schema, e.g. for return an error?
Currently, the schema needs to be set, for example like
which renders an empty json object in the schema on the documentation page.
Omitting the schema or setting it to null fails with
It would be nice if one could represent that nothing gets returned.