Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageNamespace is provided for a field declared as an XML attribute which is not allowed.
CodeAPIMATICPRE_V605
TypeValidation
Rule SystemSemantic
Broad CategoryXML Attributes
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary 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.