Discussions
Display field name instead of defined type name
over 3 years ago by Eric T
Hello,
My OpenAPI spec declares the following type definition:
"definitions":{"Foo":{"type":"object","required":...}}
Then, some other type Bar
(used as some endpoint body definition) declares 2 fields of this type:
"someFoo":{"description":"some foo","$ref":"#/definitions/Foo"}
"otherFoo":{"description":"another foo","$ref":"#/definitions/Foo"}
When I upload this spec to Readme, open the API page and look at the description of Bar
, those two fields are both listed as Foo
, instead of someFoo
and otherFoo
(whereas other fields that don't refer to any definition appear with their correct name).
Is there a way to change this behavior?
Thank you!