Class OpenAPIPrimitivePropertyExtension

java.lang.Object
io.domainlifecycles.swagger.v3.OpenAPIPrimitivePropertyExtension

public class OpenAPIPrimitivePropertyExtension extends Object
If omitted, primitive properties are initialized by Jackson with primitive default values. That's ok, but it can lead to unintended behaviour. So in case of DLC we want to make the requested behaviour explicit. Therefore, we mark primitive values as required in the API documentation. So the API user is requested to provide explicit value for the initialization of primitive field, when deserializing.
  • Constructor Details

    • OpenAPIPrimitivePropertyExtension

      public OpenAPIPrimitivePropertyExtension()
  • Method Details

    • extendPrimitiveProperties

      public static void extendPrimitiveProperties(io.swagger.v3.oas.models.OpenAPI openAPI)
      Entry point for all Open API extension regarding primitive class properties.
      Parameters:
      openAPI - OpenAPI instance to be extended