Skip to content

Add support for typescript-jquery (typescript-based API calls using jquery ajax in the browser)#4953

Merged
wing328 merged 8 commits intoswagger-api:masterfrom
bherila:master
Mar 14, 2017
Merged

Add support for typescript-jquery (typescript-based API calls using jquery ajax in the browser)#4953
wing328 merged 8 commits intoswagger-api:masterfrom
bherila:master

Conversation

@bherila
Copy link
Copy Markdown
Contributor

@bherila bherila commented Mar 6, 2017

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Adds a typescript-jquery language option.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Mar 14, 2017

@bherila thanks for the PR. I did some tests and the result is good.

@wing328 wing328 merged commit eea58c5 into swagger-api:master Mar 14, 2017
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Mar 14, 2017

Tweet: https://twitter.com/wing328/status/841685880473509891

Please help retweet to promote the new generator.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Mar 14, 2017

@bherila for your upcoming PRs, I would suggest creating a new branch as per git best practice.

@bherila
Copy link
Copy Markdown
Contributor Author

bherila commented Mar 16, 2017

@wing328 sure, I will do that

spr3nk3ls pushed a commit to spr3nk3ls/swagger-codegen that referenced this pull request Mar 28, 2017
…query ajax in the browser) (swagger-api#4953)

* Typescript jquery client wip

* typescript-jquery wip

* Fix typo

* typescript-jquery wip

* Fix formatting

* Petstore sample for typescript-jquery

* Petstore sample for typescript-jquery

* wip
@JFCote
Copy link
Copy Markdown
Contributor

JFCote commented Apr 3, 2017

@bherila : As suggested by @wing328 , I'm letting you know that I will start to work on a refactor of your typescript-jquery template to use the very good model generator from the typescript-angular2 template. Since your are the creator of this template, I will tag you in all my future PR to make sure you can comment on them! I should create a PR since the end of the week. Thanks!

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Apr 3, 2017

@JFCote please pull the latest as I've merged a PR to replace tab with 4-space for code indentation.

@JFCote
Copy link
Copy Markdown
Contributor

JFCote commented Apr 3, 2017

@wing328 : Yes I have the latest
@bherila : My PR is probably going to be pushed in 2-3 weeks. I forgot our typescript specialist is currently gone for 2 weeks and he will review my submission before I create the PR.
I'll keep you posted. If you do any update until then, please notify me if possible!

@bherila
Copy link
Copy Markdown
Contributor Author

bherila commented Apr 12, 2017 via email

@JFCote
Copy link
Copy Markdown
Contributor

JFCote commented Apr 12, 2017

@bherila : Fear not, will make sure it doesn't break anything and if it does, tell us and we will work this out.

As for my PR, it will take longer. I have been flooded at work and did not have time to work on this a lot.
Will let you know when it's ready!

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Apr 12, 2017

If the enhancements contain breaking changes, please submit against 2.3.0 branch instead.

@bherila
Copy link
Copy Markdown
Contributor Author

bherila commented Apr 19, 2017

Since the jquery and fetch APIs are not compatible, it will certainly be a breaking change. The jquery api returns the response object and the content is retrieved with {response}.body whereas the fetch API returns the body directly as the result of the promise.

@JFCote
Copy link
Copy Markdown
Contributor

JFCote commented Apr 19, 2017

@bherila : I'm not changing anything related to that. It will still use jquery but it will use the model generation from the Angular2 and made additionnal improvement in the generator itself. It should be backward compatible for the moment (almost 75% done for now).

If I'm not sure at the end, I will submit it in the 2.3.0 branch and you will be able to test it. If it doesn't break anything, we could also merge it in the master.

Will let you know when it's ready! Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants