Open Devon-White opened 1 month ago
Hi @Devon-White, thanks for reporting the issue. I think it stems from how we handle allOf
- we are currently resolving/merging the allOf
before passing the result on to SchemaItem
for rendering. If the allOf
doesn't include example
, default
, description
, then I can see how those could be left out of the final render. Can you try moving the default
property inside of the ref to see if that works?
like this:
UrlMethodType:
type: string
enum:
- GET
- POST
default: POST
That said, I think we should probably look to merge the result of allOf
with the original schema so that we aren't missing anything.
Describe the bug
Will display the default value when the docs are generated:
Will not display a default value
UrlMethodType Enum looks like:
Expected behavior
For Default value to always be shown, regardless if its using a
ref
or not.Current behavior
No default is exposed when spec is written like the second example above.
Possible solution
Inline enums to allow default value to be shown.
Steps to reproduce
Look at examples above.
Context
Useful to allow this to work on
refs
so I can reuse the same type in multiple places, rather then constantly inlining my enum.