swagger-api / swagger-api/swagger-codegen
Code Gen API - Unable to build target: null
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When sending a request to https://generator.swagger.io/api/gen/clients/html the service returns error 400 with the foolowing response:
{
"code": 1,
"type": "error",
"message": "Unable to build target: null"
}
All other languages are fine, html is the only one returning this error.
Swagger-codegen version
Sent to the api, using https://generator.swagger.io/api/gen/clients/html
Swagger declaration file content or url
https://gist.github.com/taroquu/2e812316647ea4e28eb9624559361b67
Command line used for generation
Generated by sending to the API.
Steps to reproduce
To https://generator.swagger.io/api/gen/clients/html send the following post request:
{
"spec": {},
"options": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"swaggerUrl": "http://petstore.swagger.io/v2/swagger.json",
"authorizationValue": {
"value": "string",
"type": "string",
"keyName": "string"
},
"securityDefinition": {
"type": "string",
"description": "string"
}
}
The value for spec can be filled in with the contents from the above gist.
Related issues/PRs
This is posibly similar to an older issue #1753
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 by reproducing the POST request against https://generator.swagger.io/api/gen/clients/html with the Swagger declaration from the linked gist, then compare its response with the other client-generation endpoints. Done means the HTML target builds successfully and the API no longer returns "Unable to build target: null" for the supplied specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100