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

Considerations for generating Ruby? #25

Open
brandur opened this issue Oct 24, 2014 · 9 comments
Open

Considerations for generating Ruby? #25

brandur opened this issue Oct 24, 2014 · 9 comments

Comments

@brandur
Copy link
Member

brandur commented Oct 24, 2014

Hey @cyberdelia!

I've seen quite a few complaints around our current Ruby API client for V3, and am considering trying to replace it.

What do you think about generating Ruby code from Schematic? It seems like the main change required would be an extra set of templates. Are there any other considerations that you can imagine?

Thanks!

/cc @bgentry

@cyberdelia
Copy link
Member

The current priority would be that schematic generate again some Go for the new API schema 😕
And most of the code is done with Go has the end goal in mind, so supporting Ruby is close to a rewrite.

@brandur
Copy link
Member Author

brandur commented Oct 24, 2014

It's not generating against the current schema any longer? Shoot.

Ack, it's too bad to hear about Ruby though! Feel free to close this out then, but we should still keep it mind as a possibility :) Thanks.

@cyberdelia
Copy link
Member

I started working on fixing it, but haven't yet reach a satisfactory state. I do not totally exclude multi-language support, but that would requires smarter design too.

@ernesto-jimenez
Copy link
Contributor

@cyberdelia what about splitting schematic into different packages?

  • One package to parse the API Schema and provide all the information required to generate code.
  • A second package for the cli that takes uses the first one and uses the Go templates to generate Go code.

That way you could generate alternative cli's for Ruby/documentation/a server/...

@cyberdelia
Copy link
Member

I though of that, generating a sort of AST and leaving language specificities to some kind of renderer, it's very much a pie in a sky right: since we can't resolve a JSON schema properly anymore.

@ernesto-jimenez
Copy link
Contributor

@cyberdelia do you have a list of the current issues resolving JSON schema?

@cyberdelia
Copy link
Member

@ernesto-jimenez Mainly #29.

@ernesto-jimenez
Copy link
Contributor

@cyberdelia well, that bug is about failing with invalid JSON Schema :)

@cyberdelia
Copy link
Member

@ernesto-jimenez Try using schematic against the heroku JSON schema.

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