required-server-url
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
The Server Object must specify a URL for the target API host using the url
property.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Required property url in Server Object is missing. |
Code | OPENAPI3STANDARDS_V025 |
Type | Validation |
Rule System | Semantic |
Broad Category | Servers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation url server |
Suggested Fixes
- Add missing
url
property in the Server Object. - Make sure that the
url
property value is not null or empty. - The value should indicate the URL of a target API host or server e.g. https://i-am-a-server.com/v1
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#server-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/