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
We have a lot of assumptions about how fields should be tagged in generated models, and I'd like to retain current default behavior, but allow the users to override every aspect of this behavior.
Likewise, we have some patterns that we match to identify a content-type as JSON or YAML or whatever, but they can't catch all cases, so I would also like to backport the implementation:
We have a lot of assumptions about how fields should be tagged in generated models, and I'd like to retain current default behavior, but allow the users to override every aspect of this behavior.
In https://github.com/oapi-codegen/oapi-codegen-exp, I've allowed field tags to be fully customized, where users can insert their own field tags by looking at the name in the spec, whether the field is required, etc.
https://github.com/oapi-codegen/oapi-codegen-exp/blob/56dd39ec275d400ae5cdc1eed293719464bbf8c2/codegen/internal/configuration.go#L44[
](https://github.com/oapi-codegen/oapi-codegen-exp/blob/56dd39ec275d400ae5cdc1eed293719464bbf8c2/Configuration.md?plain=1#L293)
Likewise, we have some patterns that we match to identify a content-type as JSON or YAML or whatever, but they can't catch all cases, so I would also like to backport the implementation:
https://github.com/oapi-codegen/oapi-codegen-exp/blob/56dd39ec275d400ae5cdc1eed293719464bbf8c2/codegen/internal/configuration.go#L37
https://github.com/oapi-codegen/oapi-codegen-exp/blob/56dd39ec275d400ae5cdc1eed293719464bbf8c2/Configuration.md?plain=1#L265
https://github.com/oapi-codegen/oapi-codegen-exp/blob/56dd39ec275d400ae5cdc1eed293719464bbf8c2/codegen/internal/configuration.go#L41
https://github.com/oapi-codegen/oapi-codegen-exp/blob/main/Configuration.md?plain=1#L275