当前位置:网站首页>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
边栏推荐
猜你喜欢

Day_ 04

Difference between app test and web test

微信公众号服务器配置

批量--07---断点重提

DDD概念复杂难懂,实际落地如何设计代码实现模型?

Using pywebio testing, novice testers can also make their own testing tools

mac php多版本管理以及安装swoole扩展

Do you know all the configurations of pychrm?

3年,我是如何涨薪到20k?

Nsurlsession learning notes (III) download task
随机推荐
千万级购物车系统缓存架构方案
绕过技术聊'跨端'......
Bypass technology to talk about 'cross end'
Cache architecture scheme of ten million level shopping cart system
Paper notes: generalized random forests
JVM memory structure
Day_ ten
Day_ fifteen
【精通高并发】深入理解C语言基础与汇编下的C语言
加密潮流:时尚向元宇宙的进阶
代码注释的艺术,优秀代码真的不需要注释吗?
Day_ thirteen
1-8file sharing in VMWare
JVM内存结构
3.条件概率与独立性
How did I get a salary increase of 13k+ after one year of employment?
XShell连接VMWare虚拟机
Day21 multithreading
从业一年,我是如何涨薪13K+?
MySQL_ JDBC