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

Fixed process kotlin coroutines and reactivex types #1014

Merged
merged 3 commits into from
May 23, 2023

Conversation

altro3
Copy link
Collaborator

@altro3 altro3 commented May 10, 2023

Fixed #1013

@altro3 altro3 force-pushed the fix_flow branch 3 times, most recently from 38d75ee to a9dbafe Compare May 10, 2023 16:23
@altro3 altro3 requested a review from dstepanov May 10, 2023 16:53
*
* @since 4.8.3
*/
public final class ElementUtils {
Copy link
Contributor

Choose a reason for hiding this comment

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

annotate with @Internal

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment on lines +75 to +82
return element.isNullable()
|| element.getType().isOptional()
|| element.hasStereotype(Nullable.class)
|| element.hasStereotype("javax.annotation.Nullable")
|| element.hasStereotype("jakarta.annotation.Nullable")
|| element.hasStereotype("org.jetbrains.annotations.Nullable")
Copy link
Contributor

Choose a reason for hiding this comment

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

the above checks (apart from isOptional()) are not necessary since isNullable() already checks this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@graemerocher Hah! As you see, you're not right ;-)
изображение
Reverted

Comment on lines +81 to +89
|| element.hasStereotype("androidx.annotation.Nullable")
|| element.hasStereotype("edu.umd.cs.findbugs.annotations.Nullable")
|| element.hasStereotype("org.eclipse.jdt.annotation.Nullable")
|| element.hasStereotype("io.reactivex.annotations.Nullable")
|| element.hasStereotype("io.reactivex.rxjava3.annotations.Nullable")
|| element.hasStereotype("reactor.util.annotation.Nullable")
|| element.hasStereotype("org.jspecify.annotations.Nullable");
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@graemerocher By the way, how is this solution worse than what you suggest? You propose to hardcode the names of annotations separated by classes, I have them in one place, without using additional complex structures and the check goes linearly. In both cases, you will have to hardcode the full path to the annotation class, only in your case I will have to describe 10 more classes without any profit.

In general, I do not understand the better your solution :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

because if it is part of core then every module does not have to repeat the same logic and it is encapsulated into a single place. Other parts of the framework will likely need to know what is nullable and that could differ from what OpenAPI believes is nullable if it is only captured here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@graemerocher do you suggest to add these annotaions to core module?

Copy link
Contributor

Choose a reason for hiding this comment

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

that is what makes sense indeed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@graemerocher I will rebase tomorrow in the core. But this commit is for core version 3.9.x, so these changes can only be made in release micronaut-openapi 5.0. Can't you merge these changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@graemerocher could you approve this PR ?

@altro3 altro3 force-pushed the fix_flow branch 2 times, most recently from 62f72f3 to 73963cb Compare May 12, 2023 14:50
@altro3 altro3 requested a review from graemerocher May 12, 2023 22:04
@altro3
Copy link
Collaborator Author

altro3 commented May 20, 2023

@graemerocher Hi! Could you approve this PR and this: #988 . After it we can finalize release 4.9.0

@altro3
Copy link
Collaborator Author

altro3 commented May 23, 2023

@graemerocher ping

@graemerocher graemerocher merged commit 92b2615 into micronaut-projects:4.9.x May 23, 2023
@altro3
Copy link
Collaborator Author

altro3 commented May 23, 2023

@graemerocher Thanks! Can I publish the release myself or will you do it yourself?? This is draft release: https://github.com/micronaut-projects/micronaut-openapi/releases/tag/untagged-6a3ba8a3c25774f62800

@altro3
Copy link
Collaborator Author

altro3 commented May 23, 2023

@graemerocher And about merge to master branch: it's to early. First need merge micronaut 3.9.2 changes to micronaut 4.0.0 (feature to disable slf4j).

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