Skip to main content

path-item-reference-is-a-path-item-object

Overview

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

When $ref is used within a Path Item Object, it must point to a valid Path Item Object defined elsewhere and which will replace the current Path Item Object with its contents. The $ref must eventually resolve into a Path Item Object (and no other type of object). The resolved object should not contain $ref as a property i.e. the references must not form an endless loop.

PropertyValue
EnabledYes
Maximum SeverityError
MessageReferenced path object is not a valid Path Item Object.
CodeSWAGGER20STANDARDS_V050
TypeValidation
Rule SystemSemantic
Broad CategoryPath Items
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation paths path $ref

Suggested Fixes

  • Ensure that the path provided in $ref is a valid path to a Path Item Object.
  • Ensure that the component you are trying to reference using $ref is indeed a Path Item Object.
  • A Path Item Object generally contains a few operation definitions using keys like get, post, put, delete, etc.

For More Information