Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JavaSpring] Fixed hardcoded media type for Swagger 3 annotation in Spring templates #11519

Closed
wants to merge 4 commits into from

Conversation

p-daniil
Copy link

@p-daniil p-daniil commented Feb 4, 2022

PR checklist

  • Read the contribution guidelines.
  • 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.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    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*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.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.

Description

Solved this issue:
#11511

@p-daniil p-daniil changed the title Fixed hardcoded media type for Swagger 3 annotation in Spring templates [JavaSpring] Fixed hardcoded media type for Swagger 3 annotation in Spring templates Feb 4, 2022
@p-daniil
Copy link
Author

p-daniil commented Feb 4, 2022

CI check failed with:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:helpmojo (help-goal) on project openapi-generator-maven-plugin: Execution help-goal of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:helpmojo failed: Plugin org.apache.maven.plugins:maven-plugin-plugin:3.6.0 or one of its dependencies could not be resolved: Could not transfer artifact org.ow2.asm:asm-commons:jar:7.0 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.jar: Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :openapi-generator-maven-plugin

I run locally this command: ./mvnw clean org.apache.maven.plugins:maven-plugin-plugin:3.6.0:helpmojo
And it successfully finishes:

[INFO] Scanning for projects...
[INFO] 
[INFO] ----------< org.openapitools:openapi-generator-maven-plugin >-----------
[INFO] Building openapi-generator (maven-plugin) 6.0.0-SNAPSHOT
[INFO] ----------------------------[ maven-plugin ]----------------------------
Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator/6.0.0-SNAPSHOT/openapi-generator-6.0.0-20220204.073414-37.pom
Downloaded from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator/6.0.0-SNAPSHOT/openapi-generator-6.0.0-20220204.073414-37.pom (18 kB at 16 kB/s)
Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/maven-metadata.xml
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/maven-metadata.xml
Downloaded from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/maven-metadata.xml (798 B at 3.0 kB/s)
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/maven-metadata.xml (798 B at 1.3 kB/s)
Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/openapi-generator-project-6.0.0-20220204.073408-37.pom
Downloaded from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-project/6.0.0-SNAPSHOT/openapi-generator-project-6.0.0-20220204.073408-37.pom (70 kB at 141 kB/s)
Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-core/6.0.0-SNAPSHOT/openapi-generator-core-6.0.0-20220204.073412-37.pom
Downloaded from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-core/6.0.0-SNAPSHOT/openapi-generator-core-6.0.0-20220204.073412-37.pom (2.3 kB at 9.4 kB/s)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openapi-generator-maven-plugin ---
[INFO] Deleting /home/pdaniil/IdeaProjects/openapi-generator-fork/modules/openapi-generator-maven-plugin/target
[INFO] 
[INFO] --- maven-plugin-plugin:3.6.0:helpmojo (default-cli) @ openapi-generator-maven-plugin ---
[INFO] Using 'UTF-8' encoding to read mojo source files.
[INFO] java-javadoc mojo extractor found 0 mojo descriptor.
[INFO] java-annotations mojo extractor found 0 mojo descriptor.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.329 s
[INFO] Finished at: 2022-02-04T16:43:17+03:00
[INFO] ------------------------------------------------------------------------

Anyone know how to solve this problem?

@cachescrubber
Copy link
Contributor

Hi @p-daniil Thanks for the report and PR! I filled #11526 based on your PR and other fixes. Main difference is formatting (I generally try to avoid very long lines and strive to find a good balance between readability of the template and generated code.) If it is okay for you, just close this pr.

@p-daniil p-daniil closed this Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants