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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Required property basePath in root object of Resource Listing document is empty or missing. |
Code | SWAGGER1_V053 |
Type | Validation |
Rule System | Semantic |
Broad Category | Resource Listing |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger1 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
.