only-schema-primitive-type-for-xml-attribute-property
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
When declaring schema properties as XML attributes, only primitive types are allowed. Non-primitive types, such as object types or arrays, are not permitted as XML attribute properties.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The schema properties declared as xml attributes cannot have non-primitive types. |
Code | OPENAPI3APIMATIC_L846 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI XML |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting schema primitive type xml attribute property |
Suggested Fixes
- Valid types for properties declared as XML attributes: string, number, boolean.
- Declare the property as XML element.
For More Information
- https://www.apimatic.io/
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schema-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#xml-object
- https://docs.apimatic.io/rulesets/overview/