next-swagger-doc only able to reference schema.json files if it is kept in /public folder? #819
Replies: 1 comment 2 replies
-
Could you check the example here? https://github.com/jellydn/next-swagger-doc/blob/main/examples/next13-simple/README.md schemaFolders: ['../../../schemas/schema.json'], This seems wrong to me. It should be a folder, not a file. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
swagger is only able to reference the schema.json file when it is kept inside the /public folder and when I move this file to the project's root folder, I get a reference error
Could not resolve reference: Could not resolve pointer: /definitions/PackagingConfigDetails does not exist in document
. I tried providing the exact path in$ref
in js-doc specification but still got the same error.This is my API route handler code.
And swagger-specification code:
Any help would be greatly appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions