same-server-sets
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
The server sets of environments in the server configuration of the API must be the same i.e. the total number of servers and their names in each environment must be the same.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Not all environments have the same servers defined. |
Code | OPENAPI3APIMATIC_L105 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Servers |
Products Impacted | API Transformer, Code Generation |
Tags | openapi3 openapi apimatic semantic linting server servers environments server configuration |
Suggested Fixes
- Make sure that the server sets across environments are the same.
- Add missing servers in each environment, if any.
- Remove extra servers from each environment, if any.
- Make sure that the count of servers in each environment is same.
- Make sure that the names of servers across environments are the same.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-server-configuration-extensions/#server-object
- https://docs.apimatic.io/specification-extensions/swagger-server-configuration-extensions/#environment-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/