![JAR search and dependency download from the Maven repository](/logo.png)
enjianjx.swagger2html.2.0.0.source-code.single-html.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger2html Show documentation
Show all versions of swagger2html Show documentation
A java tool to convert swagger json to readable doc
<#escape x as (x!)?html>
<#macro showModelRows rows>
<#if (rows?size > 0) >
Property
Type
Description
Format
Required
ReadOnly
<#list rows as row>
${row.getOgnlPath()}
${row.getTypeStr()}
${row.getProperty().getDescription()}
${row.getProperty().getFormat()}
${row.getProperty().getRequired()?string('Y', 'N')}
<#if row.getProperty().getReadOnly()??>
${row.getProperty().getReadOnly()?string('Y', 'N')}
#if>
#list>
#if>
#macro>
<#noescape>
${css}
#noescape>
${sw.getTitle()}
${sw.getTitle()}
Information
<#if sw.getBaseUrls()??>
Base URL
<#list sw.getBaseUrls() as baseUrl>
${baseUrl}
#list>
#if>
<#if sw.swagger.getInfo()??>
Version ${sw.swagger.getInfo().getVersion()}
<#if sw.swagger.getInfo().getDescription()??>
Description <#noescape> ${sw.getDescription()!} #noescape>
#if>
<#if sw.swagger.getInfo().getContact()??>
<#if sw.swagger.getInfo().getContact().getName()??>
Contact Name ${sw.swagger.getInfo().getContact().getName()}
#if>
<#if sw.swagger.getInfo().getContact().getEmail()??>
Contact Email ${sw.swagger.getInfo().getContact().getEmail()}
#if>
<#if sw.swagger.getInfo().getContact().getUrl()??>
Contact URL ${sw.swagger.getInfo().getContact().getUrl()}
#if>
#if>
<#if sw.swagger.getInfo().getLicense()??>
License ${sw.swagger.getInfo().getLicense().getName()}
#if>
<#if sw.swagger.getInfo().getTermsOfService()??>
Terms Of Service ${sw.swagger.getInfo().getTermsOfService()}
#if>
#if>
Table of Contents
<#if sw.getTags()??>
<#list sw.getTags() as tag>
${tag.getName()}
${tag.getDescription()}
Index
Method
Path
Summary
<#list sw.getOperationIdsOfTag(tag.getName()) as operationId>
${operationId_index + 1}
${operationId.getMethod()}
${operationId.getPath()}
<#if sw.getOperation(operationId)??>
${sw.getOperation(operationId).getSummary()}
#if>
#list>
#list>
#if>
<#if sw.getTags()??>
<#list sw.getTags() as tag>
${tag.getName()}
<#list sw.getOperationIdsOfTag(tag.getName()) as operationId>
${operationId.getMethod()} ${operationId.getPath()}
Summary ${sw.getOperation(operationId).getSummary()}
Notes ${sw.getOperation(operationId).getDescription()}
Consumes ${displayList(sw.getOperation(operationId).getConsumes())}
Produces ${displayList(sw.getOperation(operationId).getProduces())}
Parameters
<#if (sw.getOperation(operationId).getParameters()?? && (sw.getOperation(operationId).getParameters()?size > 0)) >
Name
Parameter Type
Data Type
Required
Description
<#list sw.getOperation(operationId).getParameters() as param>
${param.getName()}
${param.getIn()}
${paramTypeStr(param, operationId)}
<@showModelRows rows=paramToModelRows(param, operationId)/>
${param.getRequired()?string('Y', 'N')}
${param.getDescription()}
#list>
<#else>
No Parameters
#if>
Responses
HTTP Status Code
Reason
Response Type
<#if sw.getOperation(operationId).getResponses()??>
<#list sw.getOperation(operationId).getResponses()?keys as httpCode>
${httpCode}
${sw.getOperation(operationId).getResponses()[httpCode] .getDescription()}
<#if sw.getOperation(operationId).getResponses()[httpCode].getSchema()??>
${propertyTypeStr(sw.getOperation(operationId).getResponses()[httpCode].getSchema(), opeartionId)}
<@showModelRows rows=propertyToModelRows(sw.getOperation(operationId).getResponses()[httpCode].getSchema(), opeartionId)/>
#if>
#list>
#if>
#list>
#list>
#if>
#escape>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy