Skip to content

1.0.0 Proposal: generate enums during schema-codegen #69

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

Open
vbalexr opened this issue Apr 26, 2020 · 5 comments
Open

1.0.0 Proposal: generate enums during schema-codegen #69

vbalexr opened this issue Apr 26, 2020 · 5 comments

Comments

@vbalexr
Copy link

vbalexr commented Apr 26, 2020

I think that something useful would be to be able to map enum or initial values of the variables.
In case you have message exchanges, you don't have to duplicate a class / enum in the final language.

@endel
Copy link
Member

endel commented Apr 26, 2020

Hi @alexvargasbenamburg, would you mind elaborating more on what you mean?

It is planned to generate enum's during the schema-codegen. Interfaces have been implemented recently (#68). Besides enum, which other classes you think would need generation as well?

Cheers

@vbalexr
Copy link
Author

vbalexr commented Apr 28, 2020

I mean generations of enum, but you already said it's planned. So thanks and sorry: D

@vbalexr vbalexr closed this as completed Apr 28, 2020
@endel endel changed the title 1.0.0 Proposal: add default value fields 1.0.0 Proposal: generate enums during schema-codegen Apr 28, 2020
@endel
Copy link
Member

endel commented Apr 28, 2020

No worries, let's keep this issue open to track the progress of this :)

@endel endel reopened this Apr 28, 2020
@endel
Copy link
Member

endel commented May 2, 2020

A quick note: to be able to support both enum of int and string values, I think it would be reasonable to convert enums to structs on C#:

struct MessageTypes
{
    public const string TYPE_1 = "my_type_1";
    public const string TYPE_2 = "my_type_2";
}

@amireldor
Copy link
Contributor

Hello, any news on implementing enum schema generation, especially for Unity?
I am fiddling around with the code a bit, seems like I'm on the right track. I hope I can get a PR posted in a timely manner.

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

No branches or pull requests

3 participants