-
Hi, My paths:
I want to show the docs separately (e.g., with a selector on the page for every version or via different paths) or only show the docs from the v2 subdirectory. |
Beta Was this translation helpful? Give feedback.
Answered by
jellydn
Nov 8, 2023
Replies: 1 comment 1 reply
-
Hi @joergrech I think you could use import { createSwaggerSpec } from https://github.com/jellydn/next-swagger-doc;
export const getApiV1Docs = async () => {
const spec = createSwaggerSpec({
apiFolder: 'api/v1', // define api folder
definition: {
openapi: '3.0.0',
info: {
title: 'Next Swagger API Example',
version: '1.0',
},
components: {
securitySchemes: {
BearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT',
},
},
},
security: [],
},
});
return spec;
}; Let me know if any issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
joergrech
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @joergrech I think you could use
apiFolder
option for your need.Let me know if any issue.