-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Build a JS client library #2336
Comments
@glederrey first of all, please use the latest master to generate the JS API client if you've not done so as there's been a lot of enhancements to the JS API client generator recently. Here are some test cases: https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/javascript/test/api/PetApiTest.js Would these serve as a good starting point? |
@wing328 I used the latest master to generate it.. And I also tried to start from this JS script.. I could make it work.. But I wasn't able to use it in another way for my purpose.. I won't lie to you, I just started JS.. So, I don't understand everything.. But also, I think your example is a bit complex to understand for someone who never used JS.. I will continue when I have the time to do it.. And if I can find a simpler example, I will show it to you.. So, that you can maybe have this complexe and complete example with Mocha and a simpler one just to understand how to use the JS client library.. Is it fine? |
@glederrey how urgent do you need the example? We're working on a task to improve the documentation for the JS API client. For your reference, here is the sample documentation we've generated for Perl Petstore: https://github.com/wing328/swagger-petstore-perl/blob/master/docs/PetApi.md Later we'll need your feedback from a JS beginner developer perspective to review the documentation for JS API client. |
@wing328 It's not urgent.. Since our calls are really simple (for one of our API) we're using simple requests with jQuery and ajax.. But we want to have multiple client libraries for a more complex API.. I don't think we'll need this until end of March.. If my boss asks me for it, I'll come back to you. And what you've done is really cool and really intuitive. I like it! It would be perfect to have it for all the languages.. =) And I'll be happy to help you. Do not hesitate to ask. Thanks for the good work. |
@glederrey Here is what the documentation (markdown) looks like: https://github.com/xhh/swagger-petstore-js |
@wing328 It's looking good.. =) Just a question, this documentation is the one for the JS client library, right?? |
Yes, it's the JS API client for Petstore. If you (or anyone from the community) has any feedback on the auto-generated documentation (markdown), please let us know. |
Okay.. I will take your link and check if I have some comments to do.. Do I write them here?? Just tell me the more convenient way for you.. |
Sharing here is fine. |
or you can send me directly via my personal email address in my Github profile page if you prefer to keep your feedback private. |
I will send it here.. So that if someone want to confirm or change of my comments, he/she can discuss about it here too.. I'll do that for Friday. |
Hi @wing328, I don't have a lot of comments to do on the JS doc.. It's really well done! The only thing that is a bit confusing for me is the first line of code in the Getting Started section: On Tuesday, one of our interns will start writing the JS client library for our API.. I'll give him this documentation and I'll ask him to write here if he has some improvements to do. Thanks for the good work again.. =) |
@glederrey thanks for the feedback. I'll add a one-liner later in v2.2.0 |
Hi,
This isn't really an issue.. But I'm trying to use the JS client library and trying to build a really simple wrapper to use it.. But I really can't.. I've been struggling for days on this..
Does anyone have an example a bit simpler than the one you provide? Or could you show a way to call a function without any parameters? I can share my JSON spec.
Thank you very much
The text was updated successfully, but these errors were encountered: