xml-attribute-cannot-be-array-or-map
Overview
This rule belongs to the apimatic-preliminary-validation
ruleset and states that:
A field declared as an XML attribute cannot be declared as an array or map.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The model field is configured as an XML attribute but is declared as an array/map. |
Code | APIMATICPRE_V604 |
Type | Validation |
Rule System | Semantic |
Broad Category | XML Attributes |
Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
Tags | preliminary checks validation apimatic array map xml attribute xml |
Suggested Fixes
- Disable the "IsMap" and "IsArray" flags for this field.
- Valid types for fields declared as XML attributes: String, Number, Long, Precision, Boolean, DateTime, Date, Time, UUID and enumeration custom types.
- Change the type of field to one supported for XML attributes.
- Disable the "IsAttribute" flag in the field's XML attributes.
- Remove the field definition from the complex type/model definition.