This rule belongs to the
openapi-v3-codegen-linting ruleset and states that:
The domain name example.com is reserved by the Internet Engineering Task Force (IETF) for use in documentation and examples, and it should not be used as an actual domain name in production environments. This rule enforces the requirement that server URLs in an OpenAPI specification should not point to example.com, in order to avoid any potential confusion or conflicts with the reserved domain name.
|Message||Server URLs should not point to example.com.|
|Broad Category||OpenAPI Servers|
|Products Impacted||Code Generation, Developer Experience Portal|
- Review the OpenAPI specification and locate the servers property that lists the servers used to access the API.
- Check the url property of each server definition to ensure that it does not point to example.com.
- If any server definition points to example.com, replace it with a valid URL that points to the server hosting the API.
- If the API is not yet hosted, use a valid domain name that will be used to host the API in the future.
For More Information