required-base-uri-parameter-default-value
Overview
This rule belongs to the raml-validation
ruleset and states that:
A default value must be provided for the base URI parameter using the default
property that can be substituted in the base URI in case no other value is supplied at the time of making the request. If a value is not provided in the RAML document, a dummy value will be assigned automatically as the default value during import/transformations in APIMatic.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | No default value provided for base URI parameter. |
Code | RAML_V102 |
Type | Validation |
Rule System | Semantic |
Broad Category | API Metadata |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | raml semantic validation default parameter base uri uri |
Suggested Fixes
- Add missing
default
property in the base URI parameter definition. - Make sure that the
default
property 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-10/raml-10.md#type-declarations
- 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-08/raml-08.md#named-parameters
- 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/