Skip to content

Implement KotlinModule for JSON schema generation #1766

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

Closed

Conversation

devcrocod
Copy link
Contributor

Issue

#1667


  • Implemented com.github.victools.jsonschema.generator.Module for Kotlin. This adds support for generating JSON schemas from Kotlin classes by leveraging Kotlin reflection. The module handles nullability, default values, and required properties based on Kotlin's types

  • Added kotlin-reflect dependency

  • Updated Kotlin version to 2.0.21

@markpollack
Copy link
Member

Looks like a great contribution, Sebastian is on PTO this week, so he can review next week when he is back. Thanks!

@markpollack
Copy link
Member

@sdeleuze can you take a look as time permits please

@markpollack markpollack modified the milestones: 1.0.0-M5, 1.0.0-M6 Dec 21, 2024
Copy link
Contributor

@sdeleuze sdeleuze left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for this contribution, please just remove the Kotlin version bump to 2.0.21 as we need to keep a Kotlin 1.9 baseline with Boot 3.x. I will update the documentation accordingly once merged.

Copy link
Contributor

@sdeleuze sdeleuze left a comment

Choose a reason for hiding this comment

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

@markpollack @tzolov Looks good to merge if tests are green.

@tzolov tzolov modified the milestones: 1.0.0-M6, 1.0.0-M5 Dec 23, 2024
@tzolov
Copy link
Contributor

tzolov commented Dec 23, 2024

Thank you @devcrocod for the contribution and @sdeleuze for reviewing it!

@tzolov
Copy link
Contributor

tzolov commented Dec 23, 2024

rebased , squashed and merged at 756a9dc

@tzolov tzolov closed this Dec 23, 2024
@sdeleuze sdeleuze mentioned this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants