openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

upgrade swagger-parser to latest version

Open ctreatma opened this issue 1 year ago • 3 comments

This upgrades swagger-parser to the latest release. In manual testing, this upgrade restored the generator's ability to resolve external references in OpenAPI specs.

Fixes #18429

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • [x] Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH) Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • [x] File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • [x] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

ctreatma avatar Apr 19 '24 17:04 ctreatma

thanks for the PR.

i'm looking into the gradle test issues

updating gradle to latest 7.x and 8.x didn't help as shown in https://github.com/OpenAPITools/openapi-generator/pull/18300

i'll try to contact Gradle team to see if they can help.

wing328 avatar Apr 22 '24 16:04 wing328

Tests are still failing with this error. It could be a gradle bug but it feels like something else; note that the jackson version in the error message is 2.17.0, but this PR updates from 2.15.3 to 2.16.2. I don't know where the 2.17.0 requirement is coming from.

Test: Test method openApiGenerate should reuse configuration cache[0](8.1.1)(org.openapitools.generator.gradle.plugin.GenerateTaskConfigurationCacheTest) produced standard out/err: java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file D:\a\openapi-generator\openapi-generator\modules\openapi-generator-gradle-plugin\build\tmp\test\work\.gradle-test-kit\caches\jars-9\970b4f5233619a1f72a6b180050ad4b0\jackson-core-2.17.0.jar.

ctreatma avatar May 08 '24 14:05 ctreatma

Found some additional places to upgrade gradle versions and all checks are passing now. @wing328 could you take a look?

ctreatma avatar May 08 '24 17:05 ctreatma

nice 👍

i'll take another later today

wing328 avatar May 09 '24 02:05 wing328

looks good. let's give it a try

wing328 avatar May 09 '24 04:05 wing328

saw the following in travis ci:

e: /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt: (746, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

full log: https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds/270381537

can you please take a look when you've time?

wing328 avatar May 10 '24 02:05 wing328