paths:
- /pets:
- post:
- summary: Add a new pet to the store
- operationId: addPet
- ...
+paths:
+ /pets:
+ post:
+ summary: Add a new pet to the store
+ operationId: addPet
+ ...
diff --git a/1.0.0-SNAPSHOT/index.html b/1.0.0-SNAPSHOT/index.html index 3716243a..1ccd6408 100644 --- a/1.0.0-SNAPSHOT/index.html +++ b/1.0.0-SNAPSHOT/index.html @@ -516,7 +516,7 @@ table.CodeRay td.code>pre{padding:0}
Most content extensions supports to provide content in any markup language which will be converted, if needed, to configured Swagger2Markup converter markup language at import.
+The content files markup language can be any markup-document-builder supported language :
+ASCIIDOC : AsciiDoc. Mandatory content file extension : adoc
MARKDOWN : Github Flavored Markdown. Mandatory content file extension : md
CONFLUENCE_MARKUP : Confluence Wiki markup. Mandatory content file extension : txt
| + + | +
+
+
+Currently supported conversions are : +
+
+
|
+
Swagger2Markup provides some extensions which can be used out-of-the-box. You just have to add the extension to your classpath.
Allows to dynamically import Markup from files.
Allows to import Curl, HTTP request and response snippets from Spring Rest Docs.
Allows to import JSON or XML Schema files.
See documentation of Extensions points.
Here the list of all document naming conventions, just replace * with an arbitrary, meaningful, identifier.
Here the list of all document naming conventions for each position. You have to replace * with an arbitrary, meaningful, identifier.
All documents, relatively to each extension contentPath :
+All extensions, relatively to each extension contentPath :
document-before-*.<markup.ext>
DOCUMENT_BEFORE : document-before-*.<markup.ext>
document-begin-*.<markup.ext>
DOCUMENT_BEGIN : document-begin-*.<markup.ext>
document-end-*.<markup.ext>
DOCUMENT_END : document-end-*.<markup.ext>
document-after-*.<markup.ext>
DOCUMENT_AFTER : document-after-*.<markup.ext>
Paths document, relatively to swagger2markup.extensions.dynamicPaths.contentPath :
Paths extensions, relatively to each extension contentPath :
<operationId>/operation-begin-*.<markup.ext>
OPERATION_BEGIN : <operationId>/operation-begin-*.<markup.ext>
<operationId>/operation-end-*.<markup.ext>
OPERATION_END : <operationId>/operation-end-*.<markup.ext>
<operationId> value depends on Swagger specification. If you provided an operationId for operations in the Swagger document, the value will be used primarily. Otherwise, the value normalized(operation.summary + " " + lowerCase(operation.HTTPmethod)) will be used. It is highly recommended to set operationId for operations because it’s more stable : see Advanced usage - Swagger operationId. In all cases, <operationId> is case-sensitive.
+<operationId> value depends on Swagger specification. If you provided an operationId for operations in the Swagger document, the value will be used primarily. It is highly recommended to set operationId for operations : see Swagger operationId. In all cases, <operationId> is case-sensitive.
Definitions and Security document, relatively to swagger2markup.extensions.dynamicDefinitions.contentPath :
Definitions and Security extensions, relatively to each extension contentPath :
<definitionName>/definition-begin-*.<markup.ext>
DEFINITION_BEGIN : <definitionName>/definition-begin-*.<markup.ext>
<definitionName>/definition-end-*.<markup.ext>
DEFINITION_END : <definitionName>/definition-end-*.<markup.ext>
The content files markup language can be any markup-document-builder supported language :
-ASCIIDOC : AsciiDoc. Mandatory content file extension : adoc
MARKDOWN : Github Flavored Markdown. Mandatory content file extension : md
CONFLUENCE_MARKUP : Confluence Wiki markup. Mandatory content file extension : txt
By default, the markup language is set to ASCIIDOC, whatever the file extension. Set extension Configuration to change content markup language.
-The content file will be converted, if needed, to main Swagger2Markup converter markup language at import.
| - - | -
-
-
-Currently supported conversion are : -
-
-
|
-
By default, the markup language is set to ASCIIDOC. Set extension Configuration to change content markup language.
The extension adds the following properties to Swagger2Markup which must be configured:
Swagger2Markup can be used together with spring-restdocs. Swagger2Markup can include the generated CURL request, HTTP request and HTTP response example snippets from spring-restdocs into the generated Markup documents. See spring-restdocs how to configure it.
The extension searches for Spring RestDocs snippet files in a configurable path to append the snippets at the end of a path operation section. The files must conform to the naming convention:
+The extension searches for Spring RestDocs snippet files in a configurable path to append the snippets at the end of a path operation section. By default the following snippets are searched :
http-request.<markup.ext>
<operationId>/http-request.<markup.ext>
http-response.<markup.ext>
<operationId>/http-response.<markup.ext>
curl-request.<markup.ext>
<operationId>/curl-request.<markup.ext>
The files must be stored in a folder which matches the Swagger operationId.
+| + + | +
+<operationId> value depends on Swagger specification. If you provided an operationId for operations in the Swagger document, the value will be used primarily. It is highly recommended to set operationId for operations : see Swagger operationId. In all cases, <operationId> is case-sensitive.
+ |
+
Swagger Example:
paths:
- /pets:
- post:
- summary: Add a new pet to the store
- operationId: addPet
- ...
+paths:
+ /pets:
+ post:
+ summary: Add a new pet to the store
+ operationId: addPet
+ ...
By default, the markup language is set to ASCIIDOC. Set extension Configuration to change content markup language.
+The extension adds the following properties to Swagger2Markup which must be configured:
| Name | Description | +Default | Example |
|---|---|---|---|
|
The path to the Spring RestDocs snippets |
+- |
|
|
+The markup language of the content files |
+
|
+
|
+
|
+Boolean value. Set to false to disable default snippet files |
+
|
+
|
+
You can customize the task by configuring a Map of Swagger2Markup properties.
You can customize the task by configuring a Map of Swagger2Markup properties.
Create a config.properties file to customize the Swagger2Markup properties. For Example: