* Fixed issue #8: logback.xml on the classpath
* Fixed issue #13: unknown format not supported for properties
This commit is contained in:
@@ -9,5 +9,12 @@
|
|||||||
=== Version 0.2.1
|
=== Version 0.2.1
|
||||||
* Signed jar files and published in Maven Central
|
* Signed jar files and published in Maven Central
|
||||||
|
|
||||||
=== Version 0.2.1
|
=== Version 0.2.2
|
||||||
* Fixed wrong dependency version to io.github.robwin:markup-document-builder
|
* Fixed wrong dependency version to io.github.robwin:markup-document-builder
|
||||||
|
|
||||||
|
=== Version 0.2.3
|
||||||
|
* Fixed issue #7: @ApiModelProperty metadata are ignored for definitions file
|
||||||
|
|
||||||
|
=== Version 0.2.4
|
||||||
|
* Fixed issue #8: logback.xml on the classpath
|
||||||
|
* Fixed issue #13: unknown format not supported for properties
|
||||||
@@ -13,7 +13,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
description = 'swagger2markup Build'
|
description = 'swagger2markup Build'
|
||||||
version = '0.2.3'
|
version = '0.2.4'
|
||||||
group = 'io.github.robwin'
|
group = 'io.github.robwin'
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
@@ -79,12 +79,17 @@ artifacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
asciidoctor {
|
asciidoctor {
|
||||||
|
sources {
|
||||||
|
include 'index.adoc'
|
||||||
|
}
|
||||||
backends = ['html5', 'pdf']
|
backends = ['html5', 'pdf']
|
||||||
attributes = [
|
attributes = [
|
||||||
doctype: 'book',
|
doctype: 'book',
|
||||||
toc: 'left',
|
toc: 'left',
|
||||||
toclevels: '2',
|
toclevels: '2',
|
||||||
numbered: ''
|
numbered: '',
|
||||||
|
sectlinks: '',
|
||||||
|
sectanchors: ''
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
src/docs/asciidoc/index.adoc
Normal file
9
src/docs/asciidoc/index.adoc
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
:doctype: book
|
||||||
|
:toc: left
|
||||||
|
:toclevels: 2
|
||||||
|
:numbered:
|
||||||
|
:sectlinks:
|
||||||
|
:sectanchors:
|
||||||
|
|
||||||
|
include::paths.adoc[]
|
||||||
|
include::definitions.adoc[]
|
||||||
@@ -2431,7 +2431,7 @@ Schemes: HTTP</p>
|
|||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-text">
|
<div id="footer-text">
|
||||||
Last updated 2015-04-15 16:23:53 MESZ
|
Last updated 2015-04-16 12:10:07 MESZ
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -107,19 +107,21 @@ public class DefinitionsDocument extends MarkupDocument {
|
|||||||
List<String> headerAndContent = new ArrayList<>();
|
List<String> headerAndContent = new ArrayList<>();
|
||||||
List<String> header = Arrays.asList(NAME_COLUMN, DESCRIPTION_COLUMN, SCHEMA_COLUMN, REQUIRED_COLUMN);
|
List<String> header = Arrays.asList(NAME_COLUMN, DESCRIPTION_COLUMN, SCHEMA_COLUMN, REQUIRED_COLUMN);
|
||||||
headerAndContent.add(StringUtils.join(header, DELIMITER));
|
headerAndContent.add(StringUtils.join(header, DELIMITER));
|
||||||
for (Map.Entry<String, Property> propertyEntry : properties.entrySet()) {
|
if(MapUtils.isNotEmpty(properties)){
|
||||||
Property property = propertyEntry.getValue();
|
for (Map.Entry<String, Property> propertyEntry : properties.entrySet()) {
|
||||||
String description = "";
|
Property property = propertyEntry.getValue();
|
||||||
if(property instanceof AbstractProperty){
|
String description = "";
|
||||||
if(StringUtils.isNotBlank(property.getDescription())){
|
if(property instanceof AbstractProperty){
|
||||||
description = property.getDescription();
|
if(StringUtils.isNotBlank(property.getDescription())){
|
||||||
|
description = property.getDescription();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
String type = PropertyUtils.getType(property, markupLanguage);
|
||||||
|
List<String> content = Arrays.asList(propertyEntry.getKey(), description, type, Boolean.toString(property.getRequired()));
|
||||||
|
headerAndContent.add(StringUtils.join(content, DELIMITER));
|
||||||
}
|
}
|
||||||
String type = PropertyUtils.getType(property, markupLanguage);
|
this.markupDocBuilder.tableWithHeaderRow(headerAndContent);
|
||||||
List<String> content = Arrays.asList(propertyEntry.getKey(), description, type, Boolean.toString(property.getRequired()));
|
|
||||||
headerAndContent.add(StringUtils.join(content, DELIMITER));
|
|
||||||
}
|
}
|
||||||
this.markupDocBuilder.tableWithHeaderRow(headerAndContent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void definitionSchema(String definitionName) throws IOException {
|
private void definitionSchema(String definitionName) throws IOException {
|
||||||
|
|||||||
@@ -135,11 +135,13 @@ public class PathsDocument extends MarkupDocument {
|
|||||||
this.markupDocBuilder.sectionTitleLevel1(PATHS);
|
this.markupDocBuilder.sectionTitleLevel1(PATHS);
|
||||||
for (Map.Entry<String, Path> entry : paths.entrySet()) {
|
for (Map.Entry<String, Path> entry : paths.entrySet()) {
|
||||||
Path path = entry.getValue();
|
Path path = entry.getValue();
|
||||||
path("GET", entry.getKey(), path.getGet());
|
if(path != null) {
|
||||||
path("PUT", entry.getKey(), path.getPut());
|
path("GET", entry.getKey(), path.getGet());
|
||||||
path("DELETE", entry.getKey(), path.getDelete());
|
path("PUT", entry.getKey(), path.getPut());
|
||||||
path("POST", entry.getKey(), path.getPost());
|
path("DELETE", entry.getKey(), path.getDelete());
|
||||||
path("PATCH", entry.getKey(), path.getPatch());
|
path("POST", entry.getKey(), path.getPost());
|
||||||
|
path("PATCH", entry.getKey(), path.getPatch());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true">
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<root level="DEBUG">
|
|
||||||
<appender-ref ref="CONSOLE" />
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
Reference in New Issue
Block a user