Skip to main content

normalized-schema-dollar-id-uri

Overview

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

The value of $id in a Schema Object must be a valid normalized URI.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageURI provided in $id of the Schema Object is not normalized.
CodeOPENAPI3SYNTAX_L142
TypeLinting
Rule SystemSyntax
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi syntax linting uri $id id json schema schema

Suggested Fixes

  • URI normalizations include case normalization, percent-encoding normalization, path segment normalization, scheme-based normalization, protocol-based normalization etc.
  • The hexadecimal digits within a percent-encoding triplet (e.g., %3a versus %3A) are case-insensitive and therefore should be normalized to use uppercase letters for the digits A-F.
  • The scheme and host are case-insensitive and therefore should be normalized to lowercase e.g. the URI <HTTP://www.EXAMPLE.com/> is equivalent to <http://www.example.com/>.
  • Convert an empty path to / path e.g. http://example.com and http://example.com/ are equivalent.
  • Dot-segments . and .. in the path component of the URI should be removed by applying the remove_dot_segments algorithm.

For More Information