-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Unable to reference models in the definitions of the root swagger definition #744
Comments
I agree it would be really awesome to have a fix for this issue. |
I see. I thought that it would be supported out of the box 😦 Is there an issue for this particular problem already open? I couldn't find to see anyone with the same problem |
It's not written anywhere that the definitions specified in the config are available as shared schemas. |
Any update on this? Would love to see this feature |
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Using the |
Similar issues:
Also tried using external spec, but run into these issues:
💬 Question
I am trying to reference a definition from the root swagger config in my response and body schemas. I have modified a simple example based on the README and fastify-swagger examples, but trying to reference gives an error and wont validate.
In regular swagger spec this works fine, e.g. Java. But not sure if things need to be different through fastify.
I have tried adding the definitions as external schemas, and can get the schema to build using that, however then I run into problems because fastify-swagger nests definitions and causes swagger-ui errors (see 2 tickets in preamble).
This should be quite straight forward, and no need to external schemas?
Also tried various other methods of referencing the definitions, and trying to step through the code.
Your Environment
The text was updated successfully, but these errors were encountered: