swagger-api / swagger-api/swagger-codegen
[codegen]{ze-ph} Lack of implementation for http HEAD method in ZendExpressivePathHandlerServerCodegen
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ZendExpressivePathHandlerServerCodegen.java, especially postProcessOperations, and reproduce the failure with the supplied swagger-codegen-cli command using a definition containing HEAD. Done means ze-ph generation no longer throws “Unknown HTTP Method HEAD” and the generated /servers API is produced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, php
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100