Skip to main content

valid-schema-dollar-id-format

Overview

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

The value of $id in a Schema Object must be a URI-reference (absolute URI or relative reference). If a relative path is used it must resolve to an absolute URI. $id must not contain a non-empty fragment value.

PropertyValue
EnabledYes
Maximum SeverityError
MessageURI provided in $id of the Schema Object is invalid.
CodeOPENAPI3SYNTAX_V140
TypeValidation
Rule SystemSyntax
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi syntax validation uri $id id json schema schema

Suggested Fixes

  • A URI-reference can be an absolute URI or a relative path.
  • Ensure that the $id path is a valid absolute/relative URI.
  • Ensure that the $id does not contain forbidden characters.
  • Ensure that the $id URI does not contain a fragment i.e. remove # or anything after # from the end of the URI.

For More Information