OpenAPITools / OpenAPITools/openapi-generator

Impossible to create Dart client with Github spec

Open
#7,850 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Dart
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Hi. I am tried to use OpenApitools and https://editor.swagger.io/ online generators for build dart github api client, but no one of them cant build working code.

openapi-generator version

5.0.0-beta2

OpenAPI declaration file content or url

https://github.com/github/rest-api-description/tree/main/descriptions/api.github.com

Command line used for generation

I tried using online generator on https://editor.swagger.io/,
just put URL on github json spec file and select DART in dropdown menu.

After that i also try to use openapi tools generator and download jar and used command from
https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO

java -jar .\openapi-generator-cli-5.0.0-beta2.jar generate -i .\openapi.json -g dart -o .\dart-client

Where openapi.json file i getting from https://github.com/github/rest-api-description/tree/main/descriptions/api.github.com

Steps to reproduce

Just try to build client from github swagger.json, and open code editor, after analyze is finished dart compiler will show all issues with generated code.

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

Reproduce the generation using the linked GitHub OpenAPI declaration, OpenAPI Generator 5.0.0-beta2, and the documented generate -i ... -g dart command. Inspect the Dart compiler errors after generation; the issue is done when the generated GitHub client builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, java, openapi
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.