Skip to main content

path-name-begin-with-forward-slash

Overview

This rule belongs to the openapi-v3-syntax-validation ruleset and states that:

A path name represents a relative path from the server at which the API is served. Therefore, it must start with a forward slash (/).

PropertyValue
EnabledYes
Maximum SeverityError
MessagePath name is invalid.
CodeOPENAPI3SYNTAX_V040
TypeValidation
Rule SystemSyntax
Broad CategoryPaths
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi syntax validation name path

Suggested Fixes

  • Ensure that the name is a valid relative path/route from the server.
  • If the relative path is not expected to contain any path segment you can simply place a forward slash (/) as the complete path name.
  • The name must not be an absolute path.
  • The path name must not be null or empty.

For More Information