swagger-api / swagger-api/swagger-codegen

Error generating kotlin for bitbucket api

Open
#10,983 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Rerun curl command above

  2. Run again, but change "kotlin" to "java" at the end of the command.

  3. Gives error, 2. works.

Related issues/PRs
Suggest a fix/enhancement

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.