Updated documentation
This commit is contained in:
@@ -26,22 +26,28 @@ NAME
|
||||
Markup documents.
|
||||
|
||||
SYNOPSIS
|
||||
swagger2markup convert [(-c <configFile> | --configFile <configFile>)]
|
||||
[(-h | --help)] (-i <inputFile> | --inputFile <inputFile>)
|
||||
(-o <outputPath> | --outputPath <outputPath>)
|
||||
swagger2markup convert [(-c <configFile> | --config <configFile>)]
|
||||
[(-d <outputDir> | --outputDir <outputDir>)]
|
||||
[(-f <outputFile> | --outputFile <outputFile>)]
|
||||
(-i <swaggerInput> | --swaggerInput <swaggerInput>)
|
||||
|
||||
OPTIONS
|
||||
-c <configFile>, --configFile <configFile>
|
||||
Config file
|
||||
-c <configFile>, --config <configFile>
|
||||
Config file.
|
||||
|
||||
-d <outputDir>, --outputDir <outputDir>
|
||||
Output directory. Converts the Swagger specification into multiple
|
||||
files.
|
||||
|
||||
-f <outputFile>, --outputFile <outputFile>
|
||||
Output file. Converts the Swagger specification into one file.
|
||||
|
||||
-h, --help
|
||||
Display help information
|
||||
|
||||
-i <inputFile>, --inputFile <inputFile>
|
||||
Input file. Can either be a URL or a file.
|
||||
-i <swaggerInput>, --swaggerInput <swaggerInput>
|
||||
Swagger input. Can either be a URL or a file path.
|
||||
|
||||
-o <outputPath>, --outputPath <outputPath>
|
||||
Output path. Can either be a directory or a file.
|
||||
|
||||
----
|
||||
|
||||
@@ -51,10 +57,10 @@ You can convert a Swagger file into a folder as follows:
|
||||
|
||||
[source, subs="attributes"]
|
||||
----
|
||||
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i /path/to/swagger_petstore.yaml -o /tmp
|
||||
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i /path/to/swagger_petstore.yaml -d /tmp/asiidoc
|
||||
----
|
||||
|
||||
It generates the Markup documents into the `/tmp` folder.
|
||||
It generates the Markup documents into the `/tmp/asiidoc` folder.
|
||||
|
||||
==== Conversion into a file
|
||||
|
||||
@@ -62,12 +68,12 @@ You can convert a local Swagger file into a file as follows:
|
||||
|
||||
[source, subs="attributes"]
|
||||
----
|
||||
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i /path/to/swagger_petstore.yaml -o /tmp/swagger
|
||||
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i /path/to/swagger_petstore.yaml -f /tmp/asiidoc/swagger
|
||||
----
|
||||
|
||||
NOTE: The input file must not have a file extension
|
||||
|
||||
It generates the Markup documents into the file `/tmp/swagger.adoc`.
|
||||
It generates the Markup documents into the file `/tmp/asiidoc/swagger.adoc`.
|
||||
|
||||
==== Conversion of a remote Swagger file
|
||||
|
||||
@@ -75,7 +81,7 @@ You can convert a remote Swagger specification which must be accessible via HTTP
|
||||
|
||||
[source, subs="attributes"]
|
||||
----
|
||||
java -jar swagger2markup-cli-1.0.0-SNAPSHOT.jar convert -i "http://petstore.swagger.io/v2/swagger.json" -o /tmp
|
||||
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
|
||||
|
||||
@@ -29,9 +29,9 @@ You can customize the task by configuring a Map of <<Swagger2Markup properties>>
|
||||
[source,groovy]
|
||||
----
|
||||
convertSwagger2markup {
|
||||
swaggerInput file("src/docs/asciidoc")
|
||||
markupOutputFile file("${buildDir}/asciidoc")
|
||||
config = ['swagger2markup.markupLanguage' : 'ASCCIDOC',
|
||||
input file("src/docs/swagger/swagger_petstore.yaml")
|
||||
outputDir file("${buildDir}/asciidoc")
|
||||
config = ['swagger2markup.markupLanguage' : 'ASCIIDOC',
|
||||
'swagger2markup.pathsGroupedBy' : 'TAGS']
|
||||
}
|
||||
|
||||
@@ -40,14 +40,9 @@ convertSwagger2markup {
|
||||
[options="header"]
|
||||
.Gradle Plugin properties
|
||||
|====
|
||||
| Name | Description | Type | Example | Default
|
||||
| swaggerInput | The directory or file path to the Swagger specification | File | `file("src/docs/swagger_petstore.yaml")` (file) or `file("src/docs/swagger")` (directory) | ``file("src/docs/swagger")``
|
||||
| markupOutputDir | The directory where the output should be stored. | String | `new File("/tmp/asciidoc")` | ``file("$buildDir/asciidoc")``
|
||||
| markupOutputFile | The file (without extensions) where the output should be stored. | String | ``file("$buildDir/asciidoc/swagger")`` |
|
||||
| config | The Swagger2Markup properties to configure the converter | Map | ['swagger2markup.markupLanguage' : 'ASCCIDOC'] |
|
||||
| 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
|
||||
| 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 | |
|
||||
|====
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
src/docs/asciidoc/images/confluence_petstore_screenshot_1024.png
Normal file
BIN
src/docs/asciidoc/images/confluence_petstore_screenshot_1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
BIN
src/docs/asciidoc/images/overview_extension_points.png
Normal file
BIN
src/docs/asciidoc/images/overview_extension_points.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -29,8 +29,8 @@ You can customize the task by configuring a Map of <<Swagger2Markup properties>>
|
||||
<artifactId>swagger2markup-maven-plugin</artifactId>
|
||||
<version>{project-version}</version>
|
||||
<configuration>
|
||||
<input>${project.basedir}/src/docs/swagger</input>
|
||||
<output>${project.build.directory}/asciidoc</output>
|
||||
<input>${project.basedir}/src/docs/swagger/swagger_petstore.yaml</input>
|
||||
<outputDir>${project.build.directory}/asciidoc</output>
|
||||
<config>
|
||||
<swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
|
||||
</config>
|
||||
@@ -41,11 +41,12 @@ You can customize the task by configuring a Map of <<Swagger2Markup properties>>
|
||||
|
||||
|
||||
[options="header"]
|
||||
.Gradle Plugin properties
|
||||
.Maven Plugin properties
|
||||
|====
|
||||
| Name | Description | Type | Example | Default
|
||||
| input | The URL, directory or file path to the Swagger specification | String | `src/docs/swagger_petstore.yaml` (file) or `"src/docs/swagger` (directory) | ``${project.basedir}/src/docs/swagger``
|
||||
| output | The directory or file (without extension) where the output should be stored. | String | `/tmp/asciidoc` or `/tmp/asciidoc/swagger` | ``${project.build.directory}/asciidoc``
|
||||
| config | The Swagger2Markup properties to configure the converter | Map | | |
|
||||
| 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`
|
||||
| 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 | |
|
||||
|====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user