express-openapi
express-openapi copied to clipboard
Generate OpenAPI docs for an Express App
I get the following error when running Express v5: ``` TypeError: split(...).join is not a function at ...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:73:47 at Array.forEach () at iterateStack (...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:71:24) at ...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:17:5 at Array.forEach () at...
My openapi.helper.ts file (which is located in: `src/helpers/`: ``` import oapi from '@wesleytodd/openapi'; const openapi = oapi({ openapi: '1.0.0', info: { title: 'Rest Docs', version: '1.0.0', description: 'Rest description, },...
Would be fine to add Typescript definitions to the library
The Swagger specification points out that you can set default values for parameters (https://swagger.io/docs/specification/describing-parameters/#default). I tried adding some to my route definition, but it doesn't seem to do anything. Here's...
I have a route that returns an object with a few properties. Each of these properties is another object with a few props. All of these nested objects follow the...
The generic TypeScript description for `express.RequestHandler` allows type definitions for the request path params, response body, request body and request query params: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/03fa4ecc7ecbe94e50b5e5fe03d7add64a198198/types/express-serve-static-core/index.d.ts#L53-L66 Would it be possible to make use...
Hey again @wesleytodd! 👋 One test case was failing as mentioned in my other pr #64. This should fix that issue! The replace failed to inject the route parameter as...
Hey @wesleytodd! 👋 I noticed that you had an open issue #25 for adding typescript types to this library. Fortunately there was already a base to start with, which I...
Tags are very helpful in APIs that have alot of endpoints https://swagger.io/docs/specification/grouping-operations-with-tags/
Looking at Route Paths in https://expressjs.com/en/guide/routing.html, Express supports routes such as `/ab?cd` and `/ab*cd`; however, when trying to implement `/ab/cd(*)` (which is mentioned in [this issue](https://github.com/expressjs/express/issues/2495)), you would receive the...