raml-1-0-schemas-and-types-are-mutually-exclusive
Overview
This rule belongs to the raml-validation
ruleset and states that:
The properties schemas
and types
in a RAML root object are mutually exclusive. This means that in a root object instance, only one of these properties must be present at a time but not both. It is recommended to use the types
property because a future RAML version might remove the schemas
alias with that property.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | RAML root object contains both schemas and types properties. |
Code | RAML_V201 |
Type | Validation |
Rule System | Semantic |
Broad Category | Types |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | raml semantic validation schemas types |
Suggested Fixes
- Remove the
schemas
property from the root object.
For More Information
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#the-root-of-the-document:~:text=API%20definitions%20SHOULD%20use%20the%20%22types%22%20node%20because%20a%20future%20RAML%20version%20might%20remove%20the%20%22schemas%22%20alias%20with%20that%20node
- 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/