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.
Property | Value |
---|---|
Enabled | No |
Maximum Severity | Warning |
Message | Default value is not allowed for required properties. |
Code | OPENAPI3APIMATIC_L687 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 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.