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

RFC: Support schema from a child definition #960

Open
cdaringe opened this issue Apr 17, 2024 · 1 comment
Open

RFC: Support schema from a child definition #960

cdaringe opened this issue Apr 17, 2024 · 1 comment

Comments

@cdaringe
Copy link

cdaringe commented Apr 17, 2024

Is your enhancement related to a problem? Please describe.

My schema is defined in https://foo.net/openapi, which returns a swagger/openapi document, but my schema needs to be a specific model in the JSON response.

That is,foo.yaml's schema is actually defined by https://foo.net.net/openapi#components.schemas.MyJsonSchemaThing

Describe the solution you would like

Support specifying a lookup path from the JSON response.

Describe alternatives you have considered

Writing a proxy server to do this path traversal for me

Additional context

OpenAPI/Swagger is a pretty common provider of JSONSchema models. Would be great to support this common use case.

@cdaringe
Copy link
Author

I dug into the source. By the time I make it to this line:

let schema: JSONSchema = schemaToResolve.schema;
, the .schema property will not be present. some sort of config and remapping would need occur at or before this point.

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