valid-server-url-format
Overview
This rule belongs to the openapi-v3-syntax-validation
ruleset and states that:
Value must be in the format of a URL. A URL can either be absolute or relative and can contain variables wrapped in {}.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Invalid server URL found. |
Code | OPENAPI3SYNTAX_V001 |
Type | Validation |
Rule System | Syntax |
Broad Category | Servers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi syntax validation url server |
Suggested Fixes
- Ensure that the URL does not contain any forbidden characters.
- If you have declared any server variables, ensure that the variable segment in the URL starts and ends properly with a curly brace {}.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#server-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#relative-references-in-urls
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/