Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apidoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
apidoc
Commits
14f303d4
Commit
14f303d4
authored
Apr 09, 2020
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成markdown api文档
parent
bf2a7907
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
apidoc-core/src/main/java/com/kim/apidoc/core/schema/Project.java
...ore/src/main/java/com/kim/apidoc/core/schema/Project.java
+1
-1
apidoc-springmvc/src/main/java/com/kim/apidoc/springmvc/SpringParser.java
.../src/main/java/com/kim/apidoc/springmvc/SpringParser.java
+7
-5
apidoc-springmvc/src/test/java/com/kim/apidoc/example/spring/advanced/KimUserController.java
...kim/apidoc/example/spring/advanced/KimUserController.java
+1
-0
apidoc-springmvc/src/test/java/com/kim/apidoc/springmvc/SpringTest.java
...vc/src/test/java/com/kim/apidoc/springmvc/SpringTest.java
+1
-1
No files found.
apidoc-core/src/main/java/com/kim/apidoc/core/schema/Project.java
View file @
14f303d4
...
...
@@ -32,7 +32,7 @@ public class Project extends Node {
*/
List
<
Appendix
>
appendices
=
new
LinkedList
<>();
/**
*
resultData
*
统一结果
*/
ClassOrInterfaceDeclaration
resultDataClassOrInterfaceDeclaration
;
...
...
apidoc-springmvc/src/main/java/com/kim/apidoc/springmvc/SpringParser.java
View file @
14f303d4
...
...
@@ -308,11 +308,13 @@ public class SpringParser implements ParserStrategy {
* @param section the section
*/
private
void
visitReturn
(
MethodDeclaration
n
,
Chapter
chapter
,
Section
section
)
{
ClassOrInterfaceDeclaration
resultDataClassOrInterfaceDeclaration
=
ApiDoc
.
getInstance
().
getProject
().
getResultDataClassOrInterfaceDeclaration
();
if
(
null
!=
resultDataClassOrInterfaceDeclaration
)
{
ClassOrInterfaceType
returnType
=
new
ClassOrInterfaceType
();
returnType
.
setName
(
ApiDoc
.
getInstance
().
getProject
().
getResultDataClassOrInterfaceDeclaration
()
.
getName
());
returnType
.
setName
(
resultDataClassOrInterfaceDeclaration
.
getName
());
returnType
.
setTypeArguments
(
n
.
getType
());
n
.
setType
(
returnType
);
}
TypeDescription
description
=
ApiDoc
.
getInstance
().
getTypeResolvers
().
resolve
(
n
.
getType
());
if
(
description
.
isAvailable
())
{
if
(
description
.
isPrimitive
())
{
...
...
apidoc-springmvc/src/test/java/com/kim/apidoc/example/spring/advanced/KimUserController.java
View file @
14f303d4
...
...
@@ -41,6 +41,7 @@ public class KimUserController {
* Add integer.
*
* @return the integer
* @return
*/
@PostMapping
public
Integer
add
()
{
...
...
apidoc-springmvc/src/test/java/com/kim/apidoc/springmvc/SpringTest.java
View file @
14f303d4
...
...
@@ -17,7 +17,7 @@ public class SpringTest {
Context
context
=
new
Context
();
context
.
setId
(
"test"
);
context
.
setName
(
"测试项目"
);
context
.
addSource
(
Paths
.
get
(
"
K:\\@project-
dianli@\\tool\\apidoc\\apidoc-springmvc\\src\\test\\java"
));
context
.
addSource
(
Paths
.
get
(
"
F:\\@project@\\@
dianli@\\tool\\apidoc\\apidoc-springmvc\\src\\test\\java"
));
// context.setCss("https://darshandsoni.com/asciidoctor-skins/css/monospace.css");
ApiDoc
apigcc
=
new
ApiDoc
(
context
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment