Skip to content

Support for non-nullable types in Kotlin #443

Closed
@frank-van-eerden

Description

@frank-van-eerden

NB: This is a more specific continuation of issue #269

When generating apidocs from Kotlin data classes the non-nullable fields are not listed as required.

data class Person(
    val name: String
    val nickname: String?
)

The name property should be in the required list:

"Person": {
        "required": [
          "name"
        ],
...

There are workarounds like annotating the non-nullable properties with javax.validation.NotNull, but that is too verbose to my taste.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions