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
WrapResponses in TypeScript Client #600
Comments
Same here. +1 |
@RSuter Any timeframe on getting this feature worked into the TypeScript generator? |
This is pretty import with restful services. |
I have implemented this for the Angular client in my branch, though I have only really tested it on the project I am working on and haven't tried all the different combinations of options. Are there some more examples I should test it on? Should I make a pull request? |
Looks good so far, please remove/do not commit the changes in the .tt autogenerated .cs files to make it more readable.. we should at least also support this for the fetch template. Thank you very much. |
Please create a PR and ill look into it. |
Ref: #891 |
Thanks, done. I did start looking into what's needed for Fetch, but only got about as far as realising that it isn't the same thing as Aurelia (I've been fairly busy recently). |
Ok, the feature is implemented in the master branch. Now we have to test this. Guys? :-) |
Please open specific issues if you encounter problems with this feature... |
Should be supported for all TypeScript templates |
And also added WrapResponseMethods setting |
I tested the new version and it seems to work fine for what I want. |
This looks great! Thanks @quails4Eva and @RSuter for getting these change implemented! |
|
Btw: You can use WrapResponseMethods to enable this feature for specific operations |
|
So the generated code is fine? |
Yes, it works fine for me. |
Do you think the casing is the same between different browsers? Otherwise we have to lower case all keys for safety... |
I have done some testing (and reading up). So to get it to work consistently across browsers you need to have some Header class that abstracts away the casing, or you can probably just lower case them all. Angular does the former, but if Chrome is lowercasing them anyway then you can never guarentee you are getting the original casing if you support Chrome, so lower casing should be fine. |
OK, I've created a new issue: #916 We should implement this fast to avoid breaking changes for users... |
I would like to use the
settings when generating a TypeScript client. I see the settings are only available to the CSharp client generation.
I need to read the response headers for paging information and status codes.
The text was updated successfully, but these errors were encountered: