-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
Description
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:
- https://www.asyncapi.com/docs/reference/specification/v3.0.0#schemaObject
- https://json-schema.org/draft-07/schema
Dependencies and versions used
-
springwolf-kafkaversion1.17.0 -
springwolf-uiversion1.X.0
Checklist for follow-up tasks discovered during implementation:
- Maintainer note: Use OpenAPI 3.1 fields (deprecate OpenAPI 3.0 fields) -> moved to Use OpenAPI 3.1 fields #1487
- Migrate to AssertJ (i.e. using openRewrite) -> feat(core): Support for nullable types #1416 (comment)