Skip to main content

valid-location-for-file-type-parameter

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

For file type parameters, the parameter's location must be formData. Form is the only parameter type that can be used to send files, thus supporting the file type.

PropertyValue
EnabledYes
Maximum SeverityError
MessageInvalid parameter location for file type parameter found.
CodeSWAGGER20STANDARDS_V107
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation location parameter type file

Suggested Fixes

  • Ensure that the in property of the parameter contains the value formData.
  • Location value is compared in a case-sensitive manner.
  • Ensure that the value for parameter location is not null or empty.

For More Information