Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot generate &ref examples (examples defined in components) #50

Open
peteanusergiu opened this issue Aug 9, 2019 · 0 comments
Open

Comments

@peteanusergiu
Copy link

When an example is defined in "components>examples"
components: examples: ResponseObjectExample: value: we gonna STOP now
and then referenced(&ref) in the path>responses>content>example
... responses: 200: description: We gonna STOP now content: application/json: schema: $ref: "#/components/schemas/ResponseObject" example: $ref: "#/components/examples/ResponseObjectExample"
the mock response will not contain the actual example but the reference as string
#/components/examples/ResponseObjectExample'

BUT
when one defines the example in the path>responses>content>example
responses: 200: description: We gonna STOP now content: application/json: schema: $ref: "#/components/schemas/ResponseObject" example: value: "This is an example"
then all works fine:
{ "value": "This is an example" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant