OpenAPITools / OpenAPITools/openapi-generator

[BUG] Unable to compile code generated for GitHub OpenAPI Spec.

Open
#24,743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Trying to generate a Scala client for the GitHub REST API. Using the GitHub OpenAPI spec.

openapi-generator version

Version 7.24.0

OpenAPI declaration file content or url

GitHub OpenAPI spec

Generation Details

Using the sbt-openapi-generator plugin for SBT. Using default values for openApi* configuration variables.

Steps to reproduce
  1. Download the GitHub OpenAPI Spec from the URL provided above.
  2. Set `openApiInputSpec := "path/to/spec.json"
  3. Run sbt compile
Related issues/PRs

Could not find any issue related to the GitHub OpenAPI Spec.

Suggest a fix

For now, I could not work on a fix. But it looks to me that the compilation errors show it is a mix of templating bugs (mustache files) and unsupported advanced/complex OpenAPI spec features.

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 reproducing the issue with the linked GitHub OpenAPI spec, the sbt-openapi-generator plugin, and sbt compile. Inspect the compilation errors to separate mustache templating failures from unsupported OpenAPI features; done means the generated Scala client compiles successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, scala
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.