Skip to main content



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

In Swagger 2.0, each path within the paths section should start with a leading slash (/). This violation occurs when a path name is defined without the required leading slash, which is mandatory according to the Swagger 2.0 specification.

Maximum SeverityError
MessagePath name does not begin with a leading slash.
Rule SystemSyntax
Broad CategoryPaths
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger syntax validation path name leading slash

Suggested Fixes

  • Add a leading slash to the path name: Review the paths defined in your Swagger 2.0 specification. Ensure that each path name starts with a leading slash (/). For example, if you have a path like users/{id}, modify it to /users/{id}.

For More Information