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

Some enums not generated for Java #19

Closed
jasonpaulos opened this issue Feb 14, 2022 · 5 comments
Closed

Some enums not generated for Java #19

jasonpaulos opened this issue Feb 14, 2022 · 5 comments
Assignees

Comments

@jasonpaulos
Copy link
Contributor

Summary

For the Java SDK, the generator fails to create the com.algorand.algosdk.v2.client.model.Enums.Hashtype class, but it still references from the com.algorand.algosdk.v2.client.model.ProofResponse class.

Details

Using the following definitions:

@michaeldiamant
Copy link
Contributor

I ran into the problem too without knowing about the issue's existence. Here's what I understand bearing in mind that I've spent ~10min looking at generator source:

@FrankSzendzielarz
Copy link
Contributor

FrankSzendzielarz commented May 23, 2022

Also misses Format enum, which is implicitly defined in a referenced parameter. iirc there are one or two other enums in the ref'd parameters section. As an aside, there are a lot of referenced parameters defined in the spec, but not sure why. So the issue might be solvable by modifying the spec rather than the generator.

@Eric-Warehime
Copy link
Contributor

Interesting, yeah. I think in terms of what is getting generated for the format options (at least for java), the queries are all just using "msgpack" and there is no configurable input where someone would supply an enum argument to get back json instead.

I don't know whether or not it's the right decision to automatically generate things like this since they're not included in the model objects. Maybe this relates more to optimizing how our query code is being generated?

I think it would be better to have a separate issue for this if it's something that's a problem or can't be worked around if you're using templates instead of the Java generator which is not using the templates.

Happy to look into this further and discuss solutions, but it seems separate to me so I'm going to close this one for now.

@FrankSzendzielarz
Copy link
Contributor

Erm...actually yeah... Format is ignored but iirc you always get json back not msgpack right?

@FrankSzendzielarz
Copy link
Contributor

Also the net sdks DO include enum referece vars as model objects because they are based on standard oas codegen. But not really important. I will leave them in as hardcoded utility classes until this codegen repo is brought up to scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants