Skip to content

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

Open
@peteanusergiu

Description

@peteanusergiu

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" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions