In which format the parameter array is specified, the current ServiceComb support value is csv/multiĪllows users to customize the data format. Whether to allow multiple values (if true, parameters can be used as an array) Parameter location, valid optional value is path/query/body/header/form If the parameter name of the configuration is different from the automatically inferred parameter name, then the parameter of the annotation configuration will be added as a new parameter to the operation in which the annotation is located otherwise, the property of the parameter with the same name will be overwritten. Note: ServiceComb can automatically infer parameter names based on code and SpringMVC, JAX-RS annotations. Weather to hide this at the method level, which is used to describe the properties of the parameters of the operation in the Swagger document. The available protocol (schemes), possible values are http, https, ws, wss, separated by commas The optional values are List, Set, response message header, ServiceComb support attribute value of name, response, responseContainerīody in response to the data format specified The container type that wraps the return value. AttributeĪ brief description of the method, corresponding to the summary field of the Swagger contract operationĭetails, corresponding to the description field of the Swagger contract operation Optional values are definition, contains three attributes: name, description, documentation links, including values and at the method level to describe a Swagger operation. License information, including name, url attribute AttributeĬontact information, including name, email, url attributes Specify the MIME types of response in schema level, separated by at the class level to define information in a Swagger resource. Specify the MIME types of request in schema level, separated by commas Set the default tag value of the operation defined under the current Class ServiceComb can determine which classes need to parse the Swagger contract based on and Attribute However, this annotation is not required in ServiceComb. acts at the class level and is used to mark a Class as a Swagger resource in the official Swagger description. When a user uses SpringMVC and JAX-RS annotations to annotate microservice methods, ServiceComb can infer the contract information for each microservice method based on the values of these annotations. In ServiceComb, Swagger annotations are not required. You can refer to the official documentation and this guide to learn how to use annotations to specify the properties of a Swagger contract under the ServiceComb framework. The official description can be found in the (). Scene Descriptionīy using annotations to describe interface contracts, users can use ServiceComb's Swagger contract generation function to automatically generate contract documents that meet the requirements without having to manually write and modify contracts, which can effectively improve development efficiency. ServiceComb supports part of these annotations. Users can use annotations to add descriptions of contracts to their code. Swagger provides a set of annotations for describing interface contracts. Using Swagger annotations Concept Description ServiceComb Java Chassis Developers Guide
0 Comments
Leave a Reply. |