Add Usecases - #12
Open
NoNException wants to merge 2 commits into
Open
Conversation
shalousun
reviewed
Oct 18, 2022
| /** | ||
| * Claim Header At Method Level | ||
| * @apiNote 可以在方法注解上单独声明Header,使用headers属性 | ||
| * TODO #051 在此处Headers中声明的Accept字段,无法影响最终的渲染结果中Content-Type字段 |
Collaborator
There was a problem hiding this comment.
headers accept包括其它注解的一些属性都一直没有完全解析支持。这个也是基于smart-doc推荐开发者尽量走最佳实践。保持项目的代码简单化。所以很多使用概率很低的都直接在开始实现上放弃了
| * //在Class上声明被忽略的成员变量 | ||
| * String fooClassStringToIgnore; | ||
| * | ||
| * //使用@JsonIgnoreType声明的类型 |
Collaborator
There was a problem hiding this comment.
@JsonIgnoreType这个可以支持,可以先添加issue
| /** | ||
| * `@author` In Default | ||
| * @apiNote 默认情况下,API.Meta.Author 的取值为类文件上的@author注解所标示的值 | ||
| * TODO #003 在@author字段之后的所有内容都会被拼接上, |
Collaborator
There was a problem hiding this comment.
这个属于qdox的bug。这个需要在文档里特别注明
| /** | ||
| * Json Format With @RequestBody | ||
| * @apiNote 使用@RequestBody时,Content-Type为 application/json | ||
| * TODO #002 只支持 application/json 、application/x-www-form-urlencoded 两种形式的Content-Type |
Collaborator
There was a problem hiding this comment.
这个属于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}) |
Collaborator
There was a problem hiding this comment.
从consumes基本上一开始就被放弃支持。当然使用xml类似这种smart-doc完全就不支持这个功能。未来其实也没有什么支持的必要。
| String barString; | ||
|
|
||
| /** | ||
| * TODO #016 这个地方的mock示例值,如果类型不对,也能正常渲染结果 |
Collaborator
There was a problem hiding this comment.
启用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> |
| /** | ||
| * Use Array Types | ||
| * @apiNote 使用<code>BarType[] bars</code><code>BarType... bars2</code>作为入参时的类型渲染<br> | ||
| * TODO 0x02 使用...作入参传递时,Invoke-parameters的Type类型和单独传递时无法区分 |
| /** | ||
| * Return Arrays | ||
| * @apiNote TODO 0x15 当返回对象是数组时,Definition将数组标识丢弃了 | ||
| * 此处的方法声明是<code>FooType[] returnArrayObjects();</code>, |
| /** | ||
| * Return Basic Type | ||
| * @apiNote TODO 0x0F 当返回简单类型时,Response-fields一栏未被展示 | ||
| * @return Integer 测试返回简单类型的描述 |
Collaborator
There was a problem hiding this comment.
不需要,方法定义已经知道类型。Response-fields也不能表达自出类型字段信息
PeterXiao
pushed a commit
to PeterXiao/api-doc-test
that referenced
this pull request
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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..