Skip to content

$ref in response example #544

@paulprogrammer

Description

@paulprogrammer

I would like to use $ref in the response example in order to break up my specification into more readily manageable chunks. Examples also benefit from being externalized because they can be easily revisioned, and included verbatim in reference implementations.

desired structure:

      responses:
        200:
          description: Success
          schema:
            $ref: 'profile-models.yaml#/ProfileSearchResponse'
          examples:
            application/json:
              $ref: 'ProfileExample.yaml#/ProfileSearchResponseExample'

Today, the children of examples are included directly, meaning the example itself using this example is:

{
  "$ref": "ProfileExample.yaml#/ProfileSearchResponseExample"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions