valid-url-format
Overview
This rule belongs to the swagger-v2-syntax-validation
ruleset and states that:
String value should be in the format of a proper URL. The URL path can be relative only if a server URL exists in the API document to help resolve the URL path into an absolute path.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | URL is invalid. |
Code | SWAGGER20SYNTAX_V101 |
Type | Validation |
Rule System | Syntax |
Broad Category | Miscellaneous |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 swagger syntax validation url |
Suggested Fixes
- If the URL is a relative path, ensure that a server URL exists.
- If the Swagger document does not contain any servers information, ensure that the URL is an asolute path.
- Ensure that the URL does not contain any forbidden characters.