required-base-uri
Overview
This rule belongs to the raml-validation ruleset and states that:
The root object of RAML document must specify the URL for the target API host using the baseUri property. This will serve as the base URL for all resources in the document. If base URI information is not provided, a dummy value will be assigned automatically during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required property baseUri in root object is missing. |
| Code | RAML_V101 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | API Metadata |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | raml semantic validation base uri uri basic metadata |
Suggested Fixes
- Add missing
baseUriproperty in the root object. - Make sure that the
baseUriproperty value is not null or empty.
For More Information
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#base-uri-and-base-uri-parameters
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#the-root-of-the-document
- https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md#base-uri-and-baseuriparameters
- 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/