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

Enhancement: allow JSON pointer to schema within file #37

Open
matmar10 opened this issue Jul 26, 2020 · 0 comments
Open

Enhancement: allow JSON pointer to schema within file #37

matmar10 opened this issue Jul 26, 2020 · 0 comments

Comments

@matmar10
Copy link
Contributor

Use Case

An OpenAPI (FKA Swagger) spec often contains multiple schema definitions, such as #/components/responses/someResponseName

It would be very useful to reuse schema definitions from within the existing files, such as:

specs:
  - name: Some request
    ...
    response:
      json_schema:
        type: file
        $ref: schemas/openapi.json#/components/responses/NotFoundError

This would read the __dirname/schemas/openapi.json and extract the components.responses.NotFoundError property.

I can probably submit a contribution for this but would like to collect thoughts to make sure I implement it correctly.

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