当前位置:网站首页>Internship: the annotation under swagger involves the provision of interfaces
Internship: the annotation under swagger involves the provision of interfaces
2022-06-25 16:53:00 【ahyo】
knife4j:
Knife4j Is a can provide online API Document framework , Is based on Swagger Framework implementation
That is, compared with the previous Unused annotations :
@API
Has two properties :value、tags, Source code is as follows
//If tags is not used,this value will be used to set the tag for the operations described by this resource. Otherwise, the value will be ignored.
String value() default "";
//Tags can be used for logical grouping of operations by resources or any other qualifier.
String[] tags() default {
""};
@Api(tags = "list1")
@Api(tags = {
"list1","list2"})
@ApiOperation
Used in methods , It means a http Requested operation
There are too many attributes in the source code , Remember some commonly used
value—— Used for method description
notes—— Used to prompt content
tags—— You can regroup
@ApiParam
Use on methods or parameters , Field description ; Represents adding metadata to parameters ( Description or whether it is required, etc )
name– Parameter name
value– Parameter description
required– If required
@ApiModel()
Use on class , Represents a description of a class , Used for parameter receiving with entity class
value– Represents the object name
description– describe
@ApiModelProperty()
Use in method , Field , Said to model Property description or data operation change
value– Field description
name– Override property name
dataType– Override property type
required– If required
example– Illustrate with examples
hidden– hide
边栏推荐
猜你喜欢

Bombard the headquarters. Don't let a UI framework destroy you

Xinlou: un voyage de sept ans de Huawei Sports Health

Preliminary understanding of JVM

Kalman filter meets deep learning: papers on Kalman filter and deep learning

揭秘GES超大规模图计算引擎HyG:图切分

Batch --07--- breakpoint lifting

这些老系统代码,是猪写的么?

App测试工具大全,收藏这篇就够了

Day_ fourteen

Read mysql45 - a simple understanding of global locks and table locks
随机推荐
Day_ seventeen
mysql使用过程中遇到的问题
Uniapp to preview pictures (single / multiple)
Day_ 18 hash table, generic
使用PyWebIO测试,刚入门的测试员也能做出自己的测试工具
Preliminary understanding of JVM
巴比特 | 元宇宙每日荐读:三位手握“价值千万”藏品的玩家,揭秘数字藏品市场“三大套路”...
論文筆記:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
根据先序遍历和中序遍历生成后序遍历
File operation, serialization, recursive copy
Kalman time series prediction
Unity技术手册 - 生命周期旋转RotationOverLifetime-速度旋转RotationBySpeed-外力ExternalForces
XXIX - orbslam2 real-time 3D reconstruction using realsensed435
A TDD example
vscode插件自用
What is backbone network
数字经济时代文化消费新特征
2021, committed to better development
uniapp实现图片(单张/多张)预览
Difference between app test and web test