[BUG] Kotlin Constraints Preset omits @Valid annotation
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 448
- Forks
- 242
- Avg merge
- 15m
- Merged PRs (30d)
- 7
Description
Describe the bug.
Kotlin's Constraint Preset doesn't add Valid annotation to array/object fields, effectively disabling cascading validation.
It's similar to issue Java generator had #2175
Expected behavior
Valid annotation is added to array/object fields enabling cascading validation
Screenshots
None
How to Reproduce
- Define JSON Schema that has an array/object property
- Run codegen for Kotlin with ConstraintsPreset
- Generated class doesn't have Valid annotation for array/object property
🖥️ Device Information [optional]
- Operating System (OS):
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Kotlin code generator's ConstraintsPreset and compare its handling with the Java generator issue #2175. Reproduce the case with a JSON Schema containing an array or object property, then verify that generated Kotlin fields receive the Valid annotation and enable cascading validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100