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

Creating a value enum with lower case names results in weird schema #3964

Closed
wesbillman opened this issue Jan 10, 2025 · 0 comments · Fixed by #4238
Closed

Creating a value enum with lower case names results in weird schema #3964

wesbillman opened this issue Jan 10, 2025 · 0 comments · Fixed by #4238
Assignees
Labels
bug Something isn't working

Comments

@wesbillman
Copy link
Collaborator

The bad version looks like this:

//ftl:enum
type MyCoolEnum string

const (
	animal MyCoolEnum = "animal"
	bird   MyCoolEnum = "bird"
)

Will result in:

enum MyCoolEnum: String {
   Ftl/Stockticker.Animal = "animal"
   Ftl/Stockticker.Bird = "bird"
}

The correct version looks like this:

//ftl:enum
type MyCoolEnum string

const (
	Animal MyCoolEnum = "animal"
	Bird   MyCoolEnum = "bird"
)

Will result in:

enum MyCoolEnum: String {
    Animal = "animal"
    Bird = "bird"
  }
@wesbillman wesbillman added the bug Something isn't working label Jan 10, 2025
@github-actions github-actions bot added the triage Issue needs triaging label Jan 10, 2025
@alecthomas alecthomas added the next Work that will be be picked up next label Jan 27, 2025
@github-actions github-actions bot removed the triage Issue needs triaging label Jan 27, 2025
@matt2e matt2e self-assigned this Jan 30, 2025
@github-actions github-actions bot removed the next Work that will be be picked up next label Jan 30, 2025
@matt2e matt2e closed this as completed in e47ff38 Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants