Class NullableSchemaModule

java.lang.Object
net.jacobpeterson.jet.openapiannotationsplugin.schemagenerator.module.nullable.NullableSchemaModule
All Implemented Interfaces:
com.github.victools.jsonschema.generator.Module

@NullMarked public class NullableSchemaModule extends Object implements com.github.victools.jsonschema.generator.Module
NullableSchemaModule is a Module that uses NullableUtil.isFieldNullable(Field) for SchemaGeneratorConfigPart.withRequiredCheck(Predicate).

Note: SchemaGeneratorConfigPart.withNullableCheck(ConfigFunction) is not applied because SchemaGenerator uses anyOf for all nullable properties, which adds unnecessary complexity to the schema, and many OpenAPI generators reference required for nullability.

  • Constructor Details

    • NullableSchemaModule

      public NullableSchemaModule()
  • Method Details

    • applyToConfigBuilder

      public void applyToConfigBuilder(com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder builder)
      Specified by:
      applyToConfigBuilder in interface com.github.victools.jsonschema.generator.Module