Skip to main content

no-schema-default-for-required-property

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

Required properties should not have a default value defined as this can lead to unwanted behavior therefore, these must be removed.

PropertyValue
EnabledNo
Maximum SeverityWarning
MessageDefault value is not allowed for required properties.
CodeOPENAPI3APIMATIC_L687
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting schema property default required

Suggested Fixes

  • Ensure that you have not defined default values for any required properties within a schema definition.
  • Remove any default values corresponding to required properties.

For More Information