You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drf-spectacular docs say "We now also support 3.1.0", so I wonder if const keyword generated in schema is supported and how to force schema to generate it?
Is it possible to introduce this keyword through custom extension?
The text was updated successfully, but these errors were encountered:
Spectacular does not explicitly generate single value enums by itself.
The concept of constant values is not really a thing in DRF.
You can write a postprocessing hook yourself though. I don't see this as
worth the effort at the moment since this is basically an existing
functionality that looks just a bit prettier.
OAI/OpenAPI-Specification#1977 introduced support for JSON Schema Draft 2019-09, which has introduced
const
keyword.drf-spectacular docs say "We now also support 3.1.0", so I wonder if
const
keyword generated in schema is supported and how to force schema to generate it?Is it possible to introduce this keyword through custom extension?
The text was updated successfully, but these errors were encountered: