Introduction
Starting from version v2.0
, the Server
component of the framework provides an additional standardized router registration method, which is more suitable for scenarios that require team standardization and projects with higher business complexity. The specified router implements the following features:
- Standardization of
API
design according to structured programming - Specification of
API
API method parameter style definitions - Simplified router registration and maintenance
- Unified API return data format design
- Ensures synchronized maintenance of code and API documentation
- Automatic reception and validation of
API
parameter objects - Automatic generation of API documentation based on the standard
OpenAPIv3
protocol - Automatic generation of
SwaggerUI
pages
tip
Please note that specified router along with the original function, object, group routing methods are all registration methods supported by the framework’s HTTP Server
component. They are designed to solve scenarios of standardized and automated API management and are more suitable for multi-person team collaboration. Other routing methods, especially the function and object registration methods of the framework’s v1
version, are also supported in the new version! Choose reasonably based on personal usage habits.