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
Will display the default value when the docs are generated:
primary_request_method:
type: stringenum:
- GET
- POSTexample: GETdescription: Primary request method of the External LAML Handler.default: GET
Will not display a default value
primary_request_method:
allOf:
- $ref: '#/components/schemas/UrlMethodType'example: GETdescription: Primary request method of the External LAML Handler.default: POST
UrlMethodType Enum looks like:
UrlMethodType:
type: stringenum:
- GET
- POST
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.
Version used: 3.0.2
The text was updated successfully, but these errors were encountered:
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
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.The text was updated successfully, but these errors were encountered: