Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: percent in enum values #664

Merged
merged 1 commit into from Jul 25, 2022
Merged

Conversation

corani
Copy link
Contributor

@corani corani commented Jul 7, 2022

Translate % in enum values to Percent. E.g. the following model:

funny:
  type: string
  enum: [ '%' ]

results in:

const (
    FunnyPercent Funny = "%"
)

Closes: #661

@corani
Copy link
Contributor Author

corani commented Jul 7, 2022

This should fix #661, however it feels a bit like whack-a-mole. There's a long list of other characters that are dropped.

@deepmap-marcinr deepmap-marcinr merged commit 00a095c into deepmap:master Jul 25, 2022
@corani corani deleted the daniel/sanitize branch July 26, 2022 01:13
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
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.

[generating code, enum types, variable names] Duplicate types from enum convertions
2 participants