resolvable-include-path
Overview
This rule belongs to the raml-validation
ruleset and states that:
Content of external files can be marked for inclusion in a RAML file using the !include
keyword followed by a valid resolvable path to the file. The path can be a absolute path (A path that begins with a single slash (/) and is interpreted relative to the root RAML file location.), relative path (A path that neither begins with a single slash (/) nor constitutes a URL, and is interpreted relative to the location of the included file.) or an absolute URL.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Provided !include path could not be resolved. |
Code | RAML_V700 |
Type | Validation |
Rule System | Semantic |
Broad Category | Includes |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | raml semantic validation path includes |
Suggested Fixes
- If the include path is a local path, ensure that you have uploaded a ZIP file with all relevant files.
- Make sure that the path is valid.
- Make sure that the file name matches exactly with the name specified in the file path.
- Make sure that the file exists at the path specified.
- Make sure that the file path is accessible.
- Remember that if the path is a relative path and begins with a /, the path will be interpreted relative to where the master RAML file exists and not your current file's location.
- If the path is a URL ensure that the URL is publicly accessible. This means that the file is not hidden behind authentication or the URL does not use a local server.
- If the path is a URL make sure that it is valid and does not contain any forbidden characters preventing accessibility.
- If the path is a URL, make sure that it points directly to a valid JSON/XML/YAML/Markdown file and not to some kind of a HTML webpage.
For More Information
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#includes
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md#includes
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md
- https://docs.apimatic.io/rulesets/overview/