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.
Uh oh!
There was an error while loading. Please reload this page.
-
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.tsis aGETrequest.hello.post.tsis aPOSTrequest)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