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 (/).
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Path name is invalid. |
Code | OPENAPI3SYNTAX_V040 |
Type | Validation |
Rule System | Syntax |
Broad Category | Paths |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 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
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#paths-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/