Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageURL is invalid.
CodeSWAGGER20SYNTAX_V101
TypeValidation
Rule SystemSyntax
Broad CategoryMiscellaneous
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 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.

For More Information