Updated documentation

This commit is contained in:
Robert Winkler
2016-04-05 13:40:30 +02:00
parent db36397e81
commit 0b38f2a91c
3 changed files with 33 additions and 6 deletions

View File

@@ -84,7 +84,7 @@ You can convert a remote Swagger specification which must be accessible via HTTP
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i "http://petstore.swagger.io/v2/swagger.json" -d /tmp
----
==== Configuration from a properties file
==== Configuration
Create a `config.properties` file to customize the <<Swagger2Markup properties>>. For Example:

View File

@@ -1,8 +1,12 @@
== Gradle Plugin
Swagger2Markup provides a Gradle plugin. The Gradle plugin is published in JCenter and Maven Central.
NOTE: The Gradle Plugin requires at least JDK 8.
=== Usage guide
Swagger2Markup provides a Gradle plugin. The Gradle plugin is published in JCenter and Maven Central. Add the following snippet to your Gradle build file:
Add the following snippet to your Gradle build file:
[source,java]
[source,groovy, subs="attributes"]
@@ -24,6 +28,8 @@ The plugin adds a new task named ``convertSwagger2markup``. You can run the task
`gradlew convertSwagger2markup`
=== Configuration
You can customize the task by configuring a Map of <<Swagger2Markup properties>>.
[source,groovy]
@@ -41,8 +47,15 @@ convertSwagger2markup {
.Gradle Plugin properties
|====
| Name | Description | Type | Example
| input | The URL or file path to the Swagger specification | String | `file("src/docs/swagger/swagger_petstore.yaml")` or `http://petstore.swagger.io/v2/swagger.json
| input | The URL or file path to the Swagger specification | String | `file("src/docs/swagger/swagger_petstore.yaml")` or `http://petstore.swagger.io/v2/swagger.json`
| outputDir | The directory where the output should be stored. | File | `file("${buildDir}/asciidoc")`
| outputFile | The file path (without extension) where the output should be stored. | File | `file("${buildDir}/asciidoc/swagger")`
| config | The Swagger2Markup properties to configure the converter | Map | |
|====
=== Example
You can copy the template project from GitHub to get started.
https://github.com/Swagger2Markup/swagger2markup-gradle-project-template

View File

@@ -1,8 +1,12 @@
== Maven Plugin
Swagger2Markup provides a Maven plugin. The Maven plugin is published in JCenter and Maven Central.
NOTE: The Maven Plugin requires at least JDK 8.
=== Usage guide
Swagger2Markup provides a Maven plugin. The Maven plugin is published in JCenter and Maven Central. Add the following snippet to your Maven POM file:
Add the following snippet to your Maven POM file:
[source,xml, subs="specialcharacters,attributes"]
----
@@ -19,9 +23,11 @@ The plugin adds a new task goal `swagger2markup:convertSwagger2markup`. You can
`mvn swagger2markup:convertSwagger2markup`
=== Configuration
You can customize the task by configuring a Map of <<Swagger2Markup properties>>.
[source,java]
[source,xml]
----
<plugins>
<plugin>
@@ -44,9 +50,17 @@ You can customize the task by configuring a Map of <<Swagger2Markup properties>>
.Maven Plugin properties
|====
| Name | Description | Type | Example
| input | The URL file path to the Swagger specification | String | `${project.basedir}/src/docs/swagger/swagger_petstore.yaml` or `http://petstore.swagger.io/v2/swagger.json`
| input | The URL or file path to the Swagger specification | String | `${project.basedir}/src/docs/swagger/swagger_petstore.yaml` or `http://petstore.swagger.io/v2/swagger.json`
| outputDir | The directory where the output should be stored. | File | `${project.build.directory}/asciidoc`
| outputFile | The file path (without extension) where the output should be stored. | File | `${project.build.directory}/asciidoc/swagger`
| config | The Swagger2Markup properties to configure the converter | Map | |
|====
=== Example
You can copy the template project from GitHub to get started.
https://github.com/Swagger2Markup/swagger2markup-maven-project-template