Skip to content

feat(v3): generate enum types and constants (#337) - #338

Merged
lerenn merged 2 commits into
mainfrom
feat/337-enum-values
Oct 9, 2026
Merged

lerenn merged 2 commits into
mainfrom
feat/337-enum-values

Conversation

@lerenn

@lerenn lerenn commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #337

String enums (component schemas and inline properties/array items) now generate a dedicated Go type with one constant per value, e.g. type Color string with ColorRed. Validation tags are unchanged, and SetDefaults uses the typed value.

Notes:

  • Breaking for existing users: enum fields change from *string to the new type (existing issue tests updated).
  • Names follow existing schema naming (e.g. EnumPropPropertyFromTestSchemaAmber); non-string enums, x-go-type and date formats are untouched.
  • v3 only; v2 is unchanged.
  • Added test/v3/issues/337.

🤖 Generated with Claude Code

lerenn and others added 2 commits October 9, 2026 18:47
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lerenn

lerenn commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@lerenn
lerenn merged commit 1bc9071 into main Oct 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate enum values

1 participant