no-namespace-for-xml-attribute
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
A namespace cannot be declared for a field set as an XML attribute.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Namespace is provided for a field declared as an XML attribute which is not allowed. |
| Code | APIMATICPRE_V605 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | XML Attributes |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic namespace xml attribute xml |
Suggested Fixes
- Remove the namespace value (and prefix if provided) from the field.
- Disable the "IsAttribute" flag in the field's XML attributes.
- Remove the field definition from the complex type/model definition.