danielgtaylor / huma

Huma REST/HTTP API Framework for Golang with OpenAPI 3.1
https://huma.rocks/
MIT License
1.87k stars 138 forks source link

Bug: API doc hidden is not *real* hidden #430

Open jc-fireball opened 4 months ago

jc-fireball commented 4 months ago

The operation provide a hidden field that users can set to hide the endpoint from API documentation. However the is an broken feature, the corresponding schema will still display in the openapi spec. For example though the endpoint A is not in the doc, request/response schema definition will appear in the openapi spec.

danielgtaylor commented 4 months ago

Nice catch! The schemas are used for validation, so I'll have to figure out how to hide them while still keeping them around to validate the request.