Skip to main content

resolvable-library-reference

Overview

This rule belongs to the raml-validation ruleset and states that:

A RAML document can reference assets from within a library using dot notation as follows: concatenate the library name followed by a period (.), followed by the name of the data type, resource type, trait, security scheme, or annotation type. For this reference to be resolvable following conditions must be satisfied: the library name must match exactly with the name of a library declared in the uses root level property, the library referenced must be accessible i.e. the path provided for the library in the uses property must be valid, and the name of the referenced asset must match exactly with the asset defined in the library.

PropertyValue
EnabledYes
Maximum SeverityError
MessageProvided library reference could not be resolved.
CodeRAML_V802
TypeValidation
Rule SystemSemantic
Broad CategoryLibraries
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsraml semantic validation path asset reference library

Suggested Fixes

  • Ensure that the library name referenced is defined in the root level uses property and has no typos. Names are compared in a case-sensitive manner.
  • Look for any errors related to issues in accessing the library path provided in the uses key-value pairs and resolve them first.
  • Ensure that the asset name provided matches exactly with the name of an asset in the library and that there are no typos. Names are compared in a case-sensitive manner.
  • Ensure that the asset type matches with expected asset type i.e. if you are trying to reference a library type, the name of the asset does indeed match with an asset defined in the library types list and not a resource type, trait, etc.

For More Information