Skip to content

Example generation: nullable fields not visible in types #1415

@ccudennec-otto

Description

@ccudennec-otto

Describe the bug
The schema generation currently does not properly support nullable types.

Example:

class Person {
  @Schema(nullable = true)
  private String name;
}

IMHO this should generate the following specification in asyncapi:

    Person
      title: Person
      type: object
      properties:
        name:
          types: [ "string", "null" ]

Compare the documentation of "null" types in the AsyncAPI + JSON schema specification:

Dependencies and versions used

  • springwolf-kafka version 1.17.0
  • springwolf-ui version 1.X.0

Checklist for follow-up tasks discovered during implementation:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions