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

[Lua] Add API client generation #4794

Closed
daurnimator opened this issue Feb 14, 2017 · 12 comments
Closed

[Lua] Add API client generation #4794

daurnimator opened this issue Feb 14, 2017 · 12 comments

Comments

@daurnimator
Copy link
Contributor

Add lua API client generation.

Probably using lua-http

@wing328
Copy link
Contributor

wing328 commented Feb 14, 2017

@daurnimator sounds good to me :)

May I know if you're working on the Lua generator? Do you need any help from us (the community)?

@daurnimator
Copy link
Contributor Author

May I know if you're working on the Lua generator?

Not yet. Though I'm considering it.

Do you need any help from us (the community)?

Indeed: I'm not sure where to start. (I've just had a look around at some of the other generators: shouldn't be too hard to translate...)

@wing328
Copy link
Contributor

wing328 commented Feb 14, 2017

We recently add the Bash generator via #4541, which may serve as a good starting point to add a new client generator.

@zjarkov
Copy link

zjarkov commented Feb 14, 2017

Hi, didn't try it personally wth swagger but lua-Spore is not sufficient?

@daurnimator
Copy link
Contributor Author

daurnimator commented Feb 15, 2017

Hi, didn't try it personally wth swagger but lua-Spore is not sufficient?

I didn't realise lua-Spore had a swagger component. It might actually be suitable for me.


I'm wondering if adding lua support to swagger-codegen is the most useful thing to do. I feel like a fully dynamic-runtime approach like swagger-js took might be more appropriate.

@wing328
Copy link
Contributor

wing328 commented Feb 15, 2017

@daurnimator dynamic client approach (e.g. swagger-js, lua-spore) is definitely one way to do it but some developers prefer static clients generated by Swagger Codegen.

@kigsmtua
Copy link

kigsmtua commented Aug 4, 2017

@daurnimator any progress on this

@wing328
Copy link
Contributor

wing328 commented Aug 4, 2017

@daurnimator @zjarkov @kigsmtua similar to PowerShell and Rust, we can go through the same approach by creating a Lua API client for PetStore by focusing on a few endpoints.

The Lua code can be put in the folder samples/client/petstore/lua.

Then we can reverse-engineer the Lua code to create the mustache templates and the generator in Java.

@daurnimator
Copy link
Contributor Author

@daurnimator any progress on this

No. I think I'm one of those developers that prefers a dynamic approach :)

@daurnimator
Copy link
Contributor Author

@daurnimator @zjarkov @kigsmtua similar to PowerShell and Rust, we can go through the same approach by creating a Lua API client for PetStore by focusing on a few endpoints.

GET
POST (form)
POST (JSON body)

The Lua code can be put in the folder samples/client/petstore/lua.

Then we can reverse-engineer the Lua code to create the mustache templates and the generator in Java.

I'm not totally sure what you're requesting. If you can explain further (are you on irc? matrix?) I'm happy to give you samples. I created the PR #6244 to track.

@wing328
Copy link
Contributor

wing328 commented Aug 5, 2017

@daurnimator thanks. Let me review the code.

@wing328
Copy link
Contributor

wing328 commented Aug 11, 2017

Closed via #6252.

@kigsmtua @zjarkov please pull the latest master or use the latest SNAPSHOT version to give it a try.

@wing328 wing328 closed this as completed Aug 11, 2017
@wing328 wing328 modified the milestones: v2.3.0, Future Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants