swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.95k stars 6.03k forks source link

Code generation for Slim PHP framework #1075

Closed Zyles closed 8 years ago

Zyles commented 9 years ago

Please consider adding code generation for server in Slim PHP framework.

wing328 commented 9 years ago

@Zyles currently, we have code generator for Silex in develop_2.0 branch. Here is the code samples for Petstore: https://github.com/swagger-api/swagger-codegen/tree/develop_2.0/samples/server/petstore/silex/SwaggerServer

We do not have anything for Slim PHP framework at the moment. Is that something you would like to contribute? We (community) can help you on that and the code generator for Slim PHP framework would be a good starting point.

wing328 commented 9 years ago

@Zyles if you can provide the implementation of Slim PHP framework for the following endpoints in Petstore: addPet getPetById updatePetWithForm deletePet

We should be able to reverse-engineer the code back into the mustache template. Thanks in advance.

Zyles commented 9 years ago

Not sure how to do this. Also it might be best to wait for Slim 3 to be released as 2 will soon be deprecated anyway.

jfastnacht commented 8 years ago

Slim Framework 3.0.0 RC2 is released. Is someone already working on this issue or do you wait for a full release?

wing328 commented 8 years ago

@jfastnacht personally I don't think we need a full release and I'm not aware of anyone working on it at the moment. Do you have cycle to help implement it? If yes, I can work with you on it.

jfastnacht commented 8 years ago

@wing328 I'd like to give it a try if no one else wants to rush it. It might take some time.

jfastnacht commented 8 years ago

I've made a fork and work on the Slim support in a seperate branch at https://github.com/EduGraph/swagger-codegen/tree/issue-1075 . I've already added basic Slim support based on silex-PHP. It's still WIP! Just wanted to mention that I'm on it.

wing328 commented 8 years ago

@jfastnacht :+1: Let us know if you need any help :)

jfastnacht commented 8 years ago

I'd like to have some feedback on my changes in https://github.com/EduGraph/swagger-codegen/tree/issue-1075 Thank you!

wing328 commented 8 years ago

@jfastnacht overall it looks good :)

Do you mind submitting a PR so that I can leave some comments to start the discussion?