You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestion: separate generated structs for different param types #1115
Hi, I think oapi-codegen might benefit from having a bit more modularity with generated parameters. Having separate structs for different parameter types (e.g. headers vs cookies etc) might allow more flexibility to use the type generation without requiring users to use the server code generation also. I'm personally more interested in ensuring accuracy of API docs than reducing the writing of boilerplate and prefer a greater level of control and brevity in my http handlers. So I'd like the option to take or leave certain parts of the generation functionality.
If we had separate structs for different parameter types, then I believe we could leverage json tags without the risk of accidentally overwriting attributes. For example:
Activity