Skip to content

Server Introduction

AngusTester's servers ensure developers can efficiently manage and test API interfaces. Through flexible server definitions and variable management, teams can easily adapt to different development environments and version control requirements, thereby improving overall development efficiency and software quality.

About Servers

In API design and implementation, the server component is a critical part. By integrating with interface servers, you can:

  • Automatically switch to test environment servers during testing
  • Automatically update production environment URLs upon release
  • Synchronize variable configurations automatically during version changes

AngusTester provides comprehensive definitions for servers and their dynamic components, including two main sections: Server and Variables.

Server Composition

The server composition includes the full URL, server, endpoint, and their relationships. This structured approach not only simplifies API usage but also enhances project maintainability and scalability.

Full URL (path) composition diagram:

text
https://dev-api.example.com/v1/users?role=admin&status=active&page=1  
\_________________________/\_______/ \____________________________/  
server URL                  endpoint        query parameters

Can be broken down into:

Defining Variables

Variables enable dynamic server configuration and automatic switching to accommodate various API application scenarios.

Full URL (path) variable application diagram:

text
https://{env}-api.example.com/{apiVersion}/users?role=admin&status=active&page=1  
\___________________________/\___________/ \____________________________/  
server URL                      endpoint        query parameters

Variable and custom value examples:

  • env: prod, beta, dev
  • apiVersion: v1, v2

Server Field Information

AngusTester's interface servers and variables comply with the OpenAPI 3.0 specification. For more details, refer to: OpenAPI Server Object.

Basic Server Configuration

ParameterField NameTypeRequiredLength LimitDescription
URL TemplateurlstringYes≤400Target host URL, must follow standard format (supports template variables like {env})
DescriptiondescriptionstringNo≤800Server description, supports CommonMark rich text syntax
Variable DefinitionsvariablesmapNo/Variable substitution definitions for URL templates
Extension PropertiesextensionsmapNo/OpenAPI specification extension properties

Server Variable Configuration

ParameterField NameTypeConstraintLength LimitDescription
Enum Values_enumlistNo/List of optional values (cannot be empty when defined)
Default Value_defaultstringConditional≤400Default value (must be one of the enum items if enum is defined)
DescriptiondescriptionstringNo≤800Variable description, supports CommonMark rich text
Extension PropertiesextensionsmapNo/OpenAPI specification extension properties

Released under the GPL-3.0 License.