Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageThe schema properties declared as xml attributes cannot have non-primitive types.
CodeOPENAPI3APIMATIC_L846
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI XML
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 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