-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Usecases #12
base: master
Are you sure you want to change the base?
Add Usecases #12
Conversation
/** | ||
* Claim Header At Method Level | ||
* @apiNote 可以在方法注解上单独声明Header,使用headers属性 | ||
* TODO #051 在此处Headers中声明的Accept字段,无法影响最终的渲染结果中Content-Type字段 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headers accept包括其它注解的一些属性都一直没有完全解析支持。这个也是基于smart-doc推荐开发者尽量走最佳实践。保持项目的代码简单化。所以很多使用概率很低的都直接在开始实现上放弃了
* //在Class上声明被忽略的成员变量 | ||
* String fooClassStringToIgnore; | ||
* | ||
* //使用@JsonIgnoreType声明的类型 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JsonIgnoreType这个可以支持,可以先添加issue
/** | ||
* `@author` In Default | ||
* @apiNote 默认情况下,API.Meta.Author 的取值为类文件上的@author注解所标示的值 | ||
* TODO #003 在@author字段之后的所有内容都会被拼接上, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个属于qdox的bug。这个需要在文档里特别注明
/** | ||
* Json Format With @RequestBody | ||
* @apiNote 使用@RequestBody时,Content-Type为 application/json | ||
* TODO #002 只支持 application/json 、application/x-www-form-urlencoded 两种形式的Content-Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个属于smart-doc放弃支持的功能。smart-doc其实就是引导开发者尽量去使用json。包括mapping里多个method也属于直接放弃的功能。工具不支持的目的就是直接屏蔽用户写出各种不太推荐的例子
* @apiNote TODO #051 使用consumes字段尝试更改接口的Content-Type不会奏效,这个字段似乎只和方法入参的声明方式有关。 | ||
* @param bar 测试对象 | ||
*/ | ||
@PostMapping(value = "/application/specify-the-content-type",consumes = {MediaType.TEXT_HTML_VALUE}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从consumes基本上一开始就被放弃支持。当然使用xml类似这种smart-doc完全就不支持这个功能。未来其实也没有什么支持的必要。
String barString; | ||
|
||
/** | ||
* TODO #016 这个地方的mock示例值,如果类型不对,也能正常渲染结果 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
启用mock,需要用户自己保证,不需要检查,没有检查的必要
/** | ||
* When Use JSR-303 Annotations | ||
* @apiNote 当使用JSR-303的注解时,Description字段会拼接此类注解的描述信息<code>Validate[]</code>中进行显示, | ||
* TODO 0x0E 注意:如果使用JSR-303字段,但是不添加描述的话,缺省值不是 <code>No comments Founds </code>而是 <code>null</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加issue,后续可以优化下
/** | ||
* Use Array Types | ||
* @apiNote 使用<code>BarType[] bars</code><code>BarType... bars2</code>作为入参时的类型渲染<br> | ||
* TODO 0x02 使用...作入参传递时,Invoke-parameters的Type类型和单独传递时无法区分 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以添加到issue
/** | ||
* Return Arrays | ||
* @apiNote TODO 0x15 当返回对象是数组时,Definition将数组标识丢弃了 | ||
* 此处的方法声明是<code>FooType[] returnArrayObjects();</code>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以添加到issue
/** | ||
* Return Basic Type | ||
* @apiNote TODO 0x0F 当返回简单类型时,Response-fields一栏未被展示 | ||
* @return Integer 测试返回简单类型的描述 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要,方法定义已经知道类型。Response-fields也不能表达自出类型字段信息
1、put all the usecases under package com.power.doc.usecase.*
2、restful api's usecases under the package com.power.doc.usecase.rest.*
3、rpc api's usecases under the package com.power.doc.usecase.rpc.*
4、bugs or issues about restful api's marked like TODO #0..
5、bugs or issues about rpc api's marked like TODO 0x..