-
Notifications
You must be signed in to change notification settings - Fork 569
fix(templates): fix .tpl and bump ts-client deps #4691
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, could you please provide a way to test?
/* eslint-disable */ | ||
import axios from 'axios' | ||
import * as qs from 'qs' | ||
// FOR REFERENCE ONLY -- NOT A TEMPLATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please provide a more detailed description? What is a reference-only file? Also, wdyt add the line:
// Code generated by Ignite . DO NOT EDIT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is for me to use. I'll create a PR to make this a generic Go template. But Alex created the whole boilerplate as I've no clue how to do it the right way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed with @julienrbrt about generating this based on what we have from cosmo/proto analysis via template ...This used to be generated by the nodetime sta package which we no longer have.
Hence, I did it for the bank module by hand so we can work together to turn it into a template that can be filled out during ts-client generation.
Specifically we need to loop through the queries for each module and generate these: https://github.com/ignite/cli/pull/4691/files/4f090f4960d9a11e3ad14e71f970dd4a9274b317#diff-6aa02530b1b86d05918372030bd85b30534f44c545d690dfba92b851d2cb2615R4
with the appropriate names/types/args/query params and the response types generated by ts-proto during the generation run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, merged! I'll open a follow up and attempt to generalize it as a go template + fill it in the HTTPRules data
@Mergifyio backport release/v28.x.y |
✅ Backports have been created
|
* chore: fix tpl and bump ts-client deps * chore: add handcoded `rest.ts.tpl` for bank module (cherry picked from commit e3ce3f8)
ref: #4690