Open sq2wkh opened 7 years ago
@sq2wkh Can you try the latest master to see if the issue still occurs? Snapshot version available at https://github.com/swagger-api/swagger-codegen#compatibility
Hi @wing328
Issue still exist. Tested on: swagger-codegen-cli-2.3.0-20170927.021746-163. There is no implementation for HEAD method.
Please share the spec via https://gist.github.com so that we can use it to reproduce the issue.
Have you tried other PHP server generator to see if you encounter similar issues?
No, i tried only generation for ze-ph. Here is specification: https://gist.github.com/sq2wkh/b7f2067e189a2fcabdad988cc807f2f6
Description
During generation of ze-ph code , codegen throws exception:
Exception in thread "main" java.lang.RuntimeException: Could not generate api file for '/servers' at io.swagger.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:463) at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:666) at io.swagger.codegen.cmd.Generate.run(Generate.java:234) at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:41) Caused by: java.lang.RuntimeException: Unknown HTTP Method HEAD not allowed at io.swagger.codegen.languages.ZendExpressivePathHandlerServerCodegen.postProcessOperations(ZendExpressivePathHandlerServerCodegen.java:150) at io.swagger.codegen.DefaultGenerator.processOperations(DefaultGenerator.java:885) at io.swagger.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:380) ... 3 more
Swagger-codegen version
swagger-codegen-cli-2.2.2
Command line used for generation
java -jar swagger-codegen-cli-2.2.2.jar generate -i http://host:port/some-service/swagger.json -l ze-ph -o /tmp/ze-ph
Suggest a fix/enhancement
Implement code for missing http methods in ZendExpressivePathHandlerServerCodegen.java