This rule belongs to the
swagger-v2-syntax-validation ruleset and states that:
In Swagger 2.0, the
basePath field is used to specify the common path prefix for all API endpoints. The violation occurs when the
basePath value does not begin with a leading slash (
/), which is required according to the Swagger 2.0 specification.
|Base path does not begin with a leading slash.
|API Transformer, Code Generation, Developer Experience Portal
- Add a leading slash to the base path: Review the value of the
basePathfield in your Swagger 2.0 specification. Ensure that it starts with a leading slash (
/). For example, if your base path is currently defined as
api/v1, modify it to