Closed KilianB closed 3 months ago
When registering a route with the all method the generated swagger blindly copies the httpMethod which is not valid according to openapi 3.0.3 spec.
all
app .use(swagger()) .all("test",() => {});
"/test": { "all": { "operationId": "allTest", "responses": { "200": {} } } },
The only valid methods are get, put, post, delete, options, head, path, trace https://swagger.io/specification/
get, put, post, delete, options, head, path, trace
Here we probably should filter by valid methods and in case of all call the register function multiple times.
https://github.com/elysiajs/elysia-swagger/blob/8eb03f05cf87881b2ccb62ca761bacbea31faf4d/src/index.ts#L132-L143
When registering a route with the
all
method the generated swagger blindly copies the httpMethod which is not valid according to openapi 3.0.3 spec.The only valid methods are
get, put, post, delete, options, head, path, trace
https://swagger.io/specification/Here we probably should filter by valid methods and in case of all call the register function multiple times.
https://github.com/elysiajs/elysia-swagger/blob/8eb03f05cf87881b2ccb62ca761bacbea31faf4d/src/index.ts#L132-L143