Skip to main content

required-resource-listing-base-path

Overview

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

If Resource Listing document is provided as a local file from the system, relative paths of API declaration documents provided in the apis property cannot be resolved. For such cases, if the Resource Listing document is publicly available, upload it via its URL instead of a local file. Alternatively, the root object of a Swagger v1 Resource Listing document must specify the base path to use for loading relative API declaration documents, using the basePath property.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired property basePath in root object of Resource Listing document is empty or missing.
CodeSWAGGER1_V053
TypeValidation
Rule SystemSemantic
Broad CategoryResource Listing
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger1 swagger semantic validation base path resource listing

Suggested Fixes

  • Add missing basePath property in the root object of the Resource Listing document.
  • Make sure that the basePath property value is not null or empty.
  • Ensure that the basePath property is an absolute URL path which is publicly accessible and not hidden behind an authentication layer.
  • Ensure that all API declaration documents are available relative to this basePath.

For More Information