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

[kotlin-spring] Adding DocumentationProvider and SwaggerUI #12184

Merged

Conversation

sjoblomj
Copy link
Contributor

@sjoblomj sjoblomj commented Apr 20, 2022

This is my Kotlin Spring implementation of @cachescrubber's excellent work in #11258 and #11531.

A user can now select a Documentation Provider (None, Source, Springfox, Springdoc), an Annotation Library (None, Swagger1, Swagger2) and whether to use Swagger UI.

Please note that this removes the swaggerAnnotations option that previously existed! Considering this, it is probably a good idea to include this PR in version 6.0.0 with breaking changes, if the PR is deemed to be useful and of sufficient quality.

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.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@cachescrubber @wing328 @jimschubert @dr4ke616 @karismann @Zomzog @andrewemery @4brunu @yutaka0m

@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch 2 times, most recently from d7ddabc to a9ff4e1 Compare April 20, 2022 22:06
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch 3 times, most recently from 6894893 to 8697f7b Compare April 21, 2022 13:18
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch 5 times, most recently from 2b5f57e to f137088 Compare April 21, 2022 17:46
@sjoblomj sjoblomj changed the title Adding DocumentationProvider and SwaggerUI to Kotlin Spring [kotlin-spring] Adding DocumentationProvider and SwaggerUI Apr 21, 2022
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch 2 times, most recently from b63ec85 to 684b0a1 Compare April 21, 2022 19:41
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch from 684b0a1 to 0a7344f Compare April 21, 2022 19:55
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch from 0a7344f to cb10002 Compare April 22, 2022 13:31
@sjoblomj sjoblomj requested a review from jimschubert as a code owner April 22, 2022 13:31
@sjoblomj sjoblomj force-pushed the documentation_provider_for_kotlin_spring branch from cb10002 to 17dbaac Compare April 22, 2022 14:07
@cachescrubber
Copy link
Contributor

@sjoblomj Thanks for your effort - I'll try provide more detailed feedback in the next days.

@wing328
Copy link
Member

wing328 commented Apr 26, 2022

LGTM. Thanks for the PR 👍

@wing328 wing328 merged commit 356732d into OpenAPITools:master Apr 26, 2022
@wing328
Copy link
Member

wing328 commented Apr 26, 2022

@cachescrubber oops... sorry didn't see your comment earlier. Let us know your feedback and we'll file separate PRs instead 🙏

@cachescrubber
Copy link
Contributor

No problem. Just skimmed over the changes - LGTM too. @sjoblomj - if you like please upgrade the Spring Boot version used in the generated poms / build.gradle files? They are still 2.2.0M3.

And the following REQ does apply to the spring kotlind generator too: #12220.

@sjoblomj
Copy link
Contributor Author

No problem. Just skimmed over the changes - LGTM too. @sjoblomj - if you like please upgrade the Spring Boot version used in the generated poms / build.gradle files? They are still 2.2.0M3.

And the following REQ does apply to the spring kotlind generator too: #12220.

I've made a PR to update dependencies here: #12281

I'll take a look at #12220 and try to make a separate PR for it when I have time 👍

@ghost
Copy link

ghost commented May 18, 2022

The problem described in #12220 is addressed in #12377.

@sdewinter-maqqie
Copy link

sdewinter-maqqie commented Dec 19, 2022

Since you have used hardcoded the content type as schema in for example apiInterface.mustache. It is not possible to generate content schemas for arrays.

This also is/was an issue in the java-spring and seems like #13332 is an bug report for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants