discord-gophers / goapi-gen

This package contains a set of utilities for generating Go boilerplate code for services based on OpenAPI 3.0 API definitions
Apache License 2.0
132 stars 12 forks source link

Unmarshaling string to enum produces empty value #72

Closed dustin-decker closed 2 years ago

dustin-decker commented 2 years ago

Unmarshalling a string to an enum currently unmarshals an empty string because the value is never set and persisted internally.

This MR fixes two issues:

hhhapz commented 2 years ago

Can you please run all of the tests and add all of the changed templates (generated or not) so that the checks can pass? Thanks!

dustin-decker commented 2 years ago

I ran go generate ./... to update the generated schema. All tests seem to be passing already.