swagger-api / swagger-api/swagger-core

OpenAPI spec generated via latest version of ‘Swagger Gradle Plugin’ is not compatible with latest OpenAPI Generator CLI

Open
#4,601 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog
Dominant language
Java
Stars
7.5k
Forks
2.3k
Avg merge
18h 1m
Merged PRs (30d)
10

Description

OpenAPI spec generated via latest version of ‘Swagger Gradle Plugin’ (io.swagger.core.v3.swagger-gradle-plugin, version 2.2.20) is not compatible with latest OpenAPI Generator CLI (openapitools/openapi-generator-cli:latest).

Specifically, tenths of errors / warnings appear during code generation based on such OpenAPI spec, e.g. over 130 occurrences of "Illegal schema found with non-object type..." error:

ERROR o.o.codegen.InlineModelResolver - Illegal schema found with non-object type combined with properties, no properties should be defined:
 class ArraySchema {
    class Schema {

Thankfully, this does not prevent code being generated off such OpenAPI spec, which BTW implies such should perhaps be classified as “Warning” instead of “Error” ?

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 issue by generating a spec with io.swagger.core.v3.swagger-gradle-plugin 2.2.20 and processing it with openapitools/openapi-generator-cli:latest. Inspect the InlineModelResolver diagnostics for the reported ArraySchema cases; done means the generated spec no longer produces these compatibility errors, or the diagnostics are correctly treated as warnings if generation remains valid.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.