Skip to main content



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

An API Declaration document can define the base path at which the API being defined is served, using the basePath property. This path must be an absolute URL path as relative paths are not allowed.

Maximum SeverityError
MessageBase path provided for the API using property basePath is invalid.
Rule SystemSemantic
Broad CategoryAPI Declaration
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger1 swagger semantic validation base path api api declaration

Suggested Fixes

  • Ensure that the basePath value is not a relative path.
  • Make sure that the basePath property is not empty or null.
  • Ensure that the basePath URL is an absolute path and points to where the API is served.
  • Ensure that the base path value does not contain any forbidden characters.
  • The base path of the API is not necessarily the same as the path to a Resource Listing or API Declaration document.

For More Information