swagger-api / swagger-api/swagger-codegen
Error generating kotlin for bitbucket api
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I got the following error trying to generate Kotlin code from the bitbucket API specification
{"code":1,"type":"error","message":"Unable to build target: Could not process model 'branch'. Please make sure that your schema is correct!"}
It works ok with Java and Ruby.
Swagger-codegen version
The current one used by the online generator
Swagger declaration file content or url
https://api.bitbucket.org/swagger.json
Command line used for generation
curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://api.bitbucket.org/swagger.json"}' https://generator.swagger.io/api/gen/clients/kotlin
Steps to reproduce
-
Rerun curl command above
-
Run again, but change "kotlin" to "java" at the end of the command.
-
Gives error, 2. works.
Related issues/PRs
Suggest a fix/enhancement
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 rerunning the provided curl request against https://api.bitbucket.org/swagger.json for the Kotlin generator, then compare it with the Java request that succeeds. Investigate why the Bitbucket branch model cannot be processed; done means Kotlin client generation completes successfully for this specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100