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

Skip the templatedata.go intermediate step #653

Open
coryan opened this issue Jan 9, 2025 · 0 comments
Open

Skip the templatedata.go intermediate step #653

coryan opened this issue Jan 9, 2025 · 0 comments
Labels
sidekick Issues related to the code generator type: cleanup An internal cleanup or hygiene concern.

Comments

@coryan
Copy link
Contributor

coryan commented Jan 9, 2025

sidekick parses Protobuf or OpenAPI (and whatever comes next) and creates a api.API model of the service specification.

Then we ask the target language Codec (currently for Rust or Go) a bunch of questions and create the model in templatedata.go. And then we use the same mustache templates that the Codec creates to generate the code.

Maybe a cleaner approach would be to pass the api.API model directly to the Codec and let it call the mustache templates. The Codec can create its own enriched1 model of the API if needed.

@dangazineu suggested the good parts of this issue request, the bad ideas came from somebody else (not me, of course).

Footnotes

  1. I think that is what the cool kids call them.

@coryan coryan added type: cleanup An internal cleanup or hygiene concern. sidekick Issues related to the code generator labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sidekick Issues related to the code generator type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant