swagger-api / swagger-api/swagger-core

Gradle plug-in doesn't seem to acknowledge all modelConverterClasses

Open
#4,422 0 comments 0 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

In my build.gradle I have a resolve block similar to:

resolve {
    outputFileName = 'swagger'
    outputFormat = 'JSON'
    prettyPrint = 'TRUE'
    classpath = sourceSets.main.runtimeClasspath
    resourcePackages = ['foo.bar']
    modelConverterClasses = ['foo.bar.Resolver1']
    outputDir = file('/dev/null')
}

My assumption (based on an example I see here: https://github.com/swagger-api/swagger-core/issues/3388) was that converter classes could be chained and had intended to add something like:

modelConverterClasses = ['foo.bar.Resolver1', 'foo.bar.Resolver2']

to my config, where foo.bar.Resolver1 would call the next converter in the chain, presumably Resolver2, however it seems like (via printlns) only Resolver2 is ever called.

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 behavior from the build.gradle resolve block, using two entries in modelConverterClasses and printlns in Resolver1 and Resolver2. Inspect the Gradle plug-in path that processes modelConverterClasses and verify whether both converters are invoked in the expected chain. Done means the handling is corrected or the supported chaining behavior is made explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.