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

Added test suite for micronaut-openapi with spring-boot application. #1770

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

altro3
Copy link
Collaborator

@altro3 altro3 commented Sep 14, 2024

Added documentation how to use micronaut-openapi with Spring applications


// add to annotationProcessor and compileOnly blocks next libraries:

annotationProcessor platform("io.micronaut.platform:micronaut-platform:$micronautVersion")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should promote applying the Micronaut platform BOM, they should only apply the core BOM, the spring BOM and the OpenAPI BOM

The platform BOM may conflict

Copy link
Collaborator Author

@altro3 altro3 Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the versions may not be exactly the same, but personally I use it exactly like this and so far everything has worked fine. It's just that if you don't do it like this, you'll have to set your own version for each library or connect as many as 4 additional bomb files - core, openapi, serde and micronaut-spring.

It seems to me that it's quite normal for the first version. If users have real problems, then the example can be improved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the issue is it might work for you but it is likely not to align the Spring Platform BOM which will create issues for others depending on the dependencies specified. If it is purely documentation then sure maybe it is fine, but be aware this is not going to work at scale

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixed

src/main/docs/guide/spring/springWithOpenApiView.adoc Outdated Show resolved Hide resolved
@altro3 altro3 force-pushed the add-spring-tests branch 2 times, most recently from 57e84df to 510dd37 Compare September 20, 2024 08:14
@altro3
Copy link
Collaborator Author

altro3 commented Sep 20, 2024

@graemerocher could you merge all PRs?

gradle/libs.versions.toml Outdated Show resolved Hide resolved
src/main/docs/guide/spring/springWithGradle.adoc Outdated Show resolved Hide resolved
src/main/docs/guide/toc.yml Outdated Show resolved Hide resolved
test-suite-java-spring/src/main/resources/application.yml Outdated Show resolved Hide resolved
test-suite-java-spring/src/main/resources/application.yml Outdated Show resolved Hide resolved
Comment on lines 11 to 13
annotationProcessor("io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion")
annotationProcessor("io.micronaut.spring:micronaut-spring-web-annotation:$micronautSpringVersion")
annotationProcessor("io.micronaut.spring:micronaut-spring-boot-annotation:$micronautSpringVersion")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
annotationProcessor("io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion")
annotationProcessor("io.micronaut.spring:micronaut-spring-web-annotation:$micronautSpringVersion")
annotationProcessor("io.micronaut.spring:micronaut-spring-boot-annotation:$micronautSpringVersion")
annotationProcessor(platform("io.micronaut.spring:micronaut-spring-bom:$micronautSpringVersion"))
annotationProcessor("io.micronaut.spring:micronaut-spring-annotation")
annotationProcessor("io.micronaut.spring:micronaut-spring-web-annotation")
annotationProcessor("io.micronaut.spring:micronaut-spring-boot-annotation")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with the suggestion. I didn't do it because such code could affect other dependencies in this block.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm wrong. Ok, fixed

Added documentation how to use micronaut-openapi with Spring applications
@altro3 altro3 changed the base branch from 6.12.x to 6.13.x September 30, 2024 14:07
@altro3 altro3 requested a review from sdelamo October 1, 2024 13:34
@graemerocher graemerocher merged commit 14ca0fa into micronaut-projects:6.13.x Oct 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants