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

Anonymous enum support #370

Closed
hanny24 opened this issue Aug 14, 2019 · 2 comments · Fixed by #398
Closed

Anonymous enum support #370

hanny24 opened this issue Aug 14, 2019 · 2 comments · Fixed by #398

Comments

@hanny24
Copy link
Contributor

hanny24 commented Aug 14, 2019

We should support anonymous enums. Given this definition:

  Foo:
    type: object
    properties:
      value:
        type: string
        enum: [X, Y]

we should generate sealed trait Value in a companion object of Foo. Currently value has type String.

@Peppi-Ressler
Copy link

Hi, I believe that this has been implemented only for String type. Current workaround is moving for example int enum into custom object but would be great to have that cc @blast-hardcheese

@blast-hardcheese
Copy link
Member

@Peppi-Ressler Certainly, if you wouldn't mind opening a new issue for this with a reproducing test case, that would be appreciated

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 a pull request may close this issue.

3 participants