This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Add HTTP style to the Request-example#588
Open
returncode wants to merge 5 commits intoTongchengOpenSource:masterfrom
Open
Add HTTP style to the Request-example#588returncode wants to merge 5 commits intoTongchengOpenSource:masterfrom
returncode wants to merge 5 commits intoTongchengOpenSource:masterfrom
Conversation
Contributor
|
麻烦说明下这个pr的目的是什么,什么场景需要。也提供下这个修改前后的一个文档效果对比图 |
Author
|
提供一种 HTTP形式 Request-example ,和浏览器控制台调试网络请求格式一致,还有可以通过VSCode插件Rest-client调试接口 post form-data upload file get form-data |
Contributor
|
curl下的http 样例可以在restclient中直接使用吗? |
Author
|
get form-data 可以用,其他的用不了 |
shalousun
reviewed
Sep 14, 2023
| List<ApiParam> queryParams = apiMethodDoc.getQueryParams(); | ||
| List<ApiParam> requestParams = apiMethodDoc.getRequestParams(); | ||
| StringBuilder title = new StringBuilder().append("### ").append(apiMethodDoc.getDesc()).append("\n"); | ||
| StringBuilder request = new StringBuilder().append(methodType).append(" ").append(apiMethodDoc.getUrl()).append(isGet ? " " : " HTTP/1.1").append("\n"); |
Contributor
There was a problem hiding this comment.
http/1.1这个硬编码是不是不太好,也存其它版本
| /** | ||
| * http flag | ||
| */ | ||
| private boolean http; |
Contributor
There was a problem hiding this comment.
这个定义是不是语义不够精细。http代表配置http协议呢还是http样例呢,可以换个更详细的单词
|
|
||
| default ApiRequestExample buildReqJson(DocJavaMethod javaMethod, ApiMethodDoc apiMethodDoc, String methodType, | ||
| ProjectDocConfigBuilder configBuilder, FrameworkAnnotations frameworkAnnotations) { | ||
| default String buildHttpJson(DocJavaMethod docJavaMethod, ApiMethodDoc apiMethodDoc, String methodType, ProjectDocConfigBuilder projectBuilder, FrameworkAnnotations frameworkAnnotations) { |
Contributor
There was a problem hiding this comment.
下面这新增的内容是不是在html的文档格式下不起作用
|
有用 |
added 3 commits
October 31, 2023 11:19
# Conflicts: # pom.xml # src/test/java/com/ly/doc/ApiDocTest.java
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
添加HTTP样式Request-example