Hand writing the spec, then validating (ie via http://gitlab.com/jamietanna/httptest-openapi) is a valid option - keeps it in sync very well from quite a few big Go apps I know using it

Or you could wrap your implementation in https://github.com/oapi-codegen/oapi-codegen/ from a hand rolled spec - we support net/http - and that then starts towards the process of being closer to the spec

Either way, you still need to validate the spec and implementation are in sync, and IMO, hand-writing the spec is the only "right" solution that makes sure you're intentionally making changes to the API, whereas generating spec from code could lead to just documenting what's in place and ie accidental breaking changes being missed

This post was filed under replies.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.