support head routes #648
Checklist
- [x] run
npm run test - [ ] and
npm run benchmark(npm ERR! Missing script: "benchmark") - [x] tests and/or benchmarks are included
- [ ] documentation is changed or added (tell me where it is necessary)
- [x] commit message and code follows the Developer's Certification of Origin and the Code of conduct
Run npm run lint and fix the linting issues.
@Uzlopak could you please have another look?
@Fdawgs I think @climba03003 has a point. It should be maybe implemented differently.
Any update on this one? cc @climba03003
Any update on this one?
It's not updated based on my comment. The current approach is error-prone and not good for maintenance.
sorry i was on vacation I will submit a updated version in the coming week 🤞
So I just pushed a new approach: As I described here https://github.com/fastify/fastify-swagger/issues/648#issuecomment-1207410705 the problem is a duplicate operationId. My solution now, suffixes HEAD routes that have an operationId while any of exposeHeadRoutes or exposeHeadRoute is true. Also if the flag is set, and the user trys to add a custom HEAD route any way, fastify already warns the user: https://github.com/fastify/fastify/blob/main/lib/route.js#L358-L360
@climba03003 PTAL
@Uzlopak @climba03003 ptal
@Eomm PTAL
Hi all, any update on this PR? It needs some changes? We also need the openapi of the HEAD methods, which at the moment is totally skipped. Can I help to unblock this in some way?
I think this can land