Skip to content

Commit

Permalink
Spring Boot 2.x基础教程:Swagger静态文档的生成
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc87112 committed Oct 15, 2019
1 parent c4ac2d1 commit c91ddb2
Show file tree
Hide file tree
Showing 30 changed files with 4,673 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
- [Spring Boot 2.x基础教程:使用Swagger2构建强大的API文档](http://blog.didispace.com/spring-boot-learning-21-2-2/)
- [Spring Boot 2.x基础教程:JSR-303实现请求参数校验](http://blog.didispace.com/spring-boot-learning-21-2-3/)
- [Spring Boot 2.x基础教程:Swagger接口分类与各元素排序问题详解](http://blog.didispace.com/spring-boot-learning-21-2-4/)
- [Spring Boot 2.x基础教程:Swagger静态文档的生成](http://blog.didispace.com/spring-boot-learning-21-2-5/)

连载中...Star关注支持以下,随时获得更新信息!

Expand Down
1 change: 1 addition & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- [Spring Boot 2.x基础教程:使用Swagger2构建强大的API文档](http://blog.didispace.com/spring-boot-learning-21-2-2/)
- [Spring Boot 2.x基础教程:JSR-303实现请求参数校验](http://blog.didispace.com/spring-boot-learning-21-2-3/)
- [Spring Boot 2.x基础教程:Swagger接口分类与各元素排序问题详解](http://blog.didispace.com/spring-boot-learning-21-2-4/)
- [Spring Boot 2.x基础教程:Swagger静态文档的生成](http://blog.didispace.com/spring-boot-learning-21-2-5/)

连载中...Star关注支持以下,随时获得更新信息!

Expand Down
29 changes: 29 additions & 0 deletions chapter2-5/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
HELP.md
/target/
!.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/

### VS Code ###
.vscode/
102 changes: 102 additions & 0 deletions chapter2-5/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.didispace</groupId>
<artifactId>chapter2-5</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>chapter2-5</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.9.0.RELEASE</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup</artifactId>
<version>1.3.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup-maven-plugin</artifactId>
<version>1.3.3</version>
<configuration>
<swaggerInput>http://localhost:8080/v2/api-docs</swaggerInput>
<outputDir>src/docs/asciidoc/generated-by-plugin</outputDir>
<config>
<swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
</config>
</configuration>
</plugin>

<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.6</version>
<configuration>
<sourceDirectory>src/docs/asciidoc/generated</sourceDirectory>
<outputDirectory>src/docs/asciidoc/html</outputDirectory>
<backend>html</backend>
<sourceHighlighter>coderay</sourceHighlighter>
<attributes>
<toc>left</toc>
</attributes>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>jcenter-releases</id>
<name>jcenter</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>

</project>
22 changes: 22 additions & 0 deletions chapter2-5/src/docs/asciidoc/generated-by-plugin/definitions.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

[[_definitions]]
== Definitions

[[_user]]
=== User
用户实体


[options="header", cols=".^3,.^11,.^4"]
|===
|Name|Description|Schema
|**age** +
__optional__|用户年龄|integer (int32)
|**id** +
__optional__|用户编号|integer (int64)
|**name** +
__optional__|用户姓名|string
|===



38 changes: 38 additions & 0 deletions chapter2-5/src/docs/asciidoc/generated-by-plugin/overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= spring-boot-starter-swagger


[[_overview]]
== Overview
Starter for swagger 2.x


=== Version information
[%hardbreaks]
__Version__ : 1.9.0.RELEASE


=== Contact information
[%hardbreaks]
__Contact__ : didi
__Contact Email__ : dyc87112@qq.com


=== License information
[%hardbreaks]
__License__ : Apache License, Version 2.0
__License URL__ : https://www.apache.org/licenses/LICENSE-2.0.html
__Terms of service__ : https://github.com/dyc87112/spring-boot-starter-swagger


=== URI scheme
[%hardbreaks]
__Host__ : localhost:8080
__BasePath__ : /


=== Tags

* 用户管理 : User Controller



Loading

0 comments on commit c91ddb2

Please sign in to comment.