type-declaration-example-and-examples-are-mutually-exclusive
Overview
This rule belongs to the raml-validation
ruleset and states that:
The properties example
and examples
in a type declaration are mutually exclusive. This means that in a type declaration, only one of these properties must be present at a time but not both.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Type declaration contains both example and examples properties. |
Code | RAML_V204 |
Type | Validation |
Rule System | Semantic |
Broad Category | Types |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | raml semantic validation examples example schema type declaration type |
Suggested Fixes
- Remove either the
example
orexamples
property from the type declaration.
For More Information
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#type-declarations:~:text=The%20%22example%22%20facet%20MUST%20NOT%20be%20available%20when%20the%20%22examples%22%20facet%20is%20already%20defined
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md
- https://docs.apimatic.io/rulesets/overview/