API Documentation (using Swagger) #170
Replies: 3 comments 7 replies
-
Hi. Yes i plan for a generic inspector with HTTP testing UI (#3). Initially, I also created an issue for open API and swagger support (#4) but seemed to be extra effort when working on inspector. I'll reopen it to see how hard it would be. |
Beta Was this translation helpful? Give feedback.
-
I use swagger Page for swager
Swagger component
And endpoints
/server/api/doc.ts
I get |
Beta Was this translation helpful? Give feedback.
-
Its not clear how to write OpenAPI specification for the specific handler. Could somebody post an example? |
Beta Was this translation helpful? Give feedback.
-
I was wondering if there are any plans in place to build a tool that would be able to generate API Documentation automatically based on endpoints in the "routes" folder.
I'm just starting to use Nitro for the first time. It's awesome!
Usually in the past I would use a tool like SwaggerUI which would allow me to write annotations, and SwaggerUI generates a tool that allows people to view information about the API and play around with it.
I have this feeling that you can't really avoid annotations, but it would be cool if the Swagger configuration could be generated automatically based on the routes themselves.
You can infer Request type based on file name (
hello.get.ts
is aGET
request.hello.post.ts
is aPOST
request)We might be able to infer available request params and response type as well based on the code.
Beta Was this translation helpful? Give feedback.
All reactions