Skip to main content

field-read-only-and-write-only-mutual-exclusiveness

Overview

This rule belongs to the apimatic-preliminary-validation ruleset and states that:

A custom type field/property may be marked as read-only or write-only but not both.

PropertyValue
EnabledYes
Maximum SeverityError
MessageField is marked as read-only as well as write-only.
CodeAPIMATICPRE_V518
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic read-only write-only field custom type model complex model

Suggested Fixes

  • Marking a field as read-only means that it may be sent as part of a response but should not be sent as part of the request.
  • Marking a field as write-only means that it may be sent as part of a request but should not be sent as part of the response.

For More Information