bridge-node-server/node_server/tools/docgen/templates/adoc-definitions.handlebars
Martin Donnelly 57bd6c8e6a init
2018-06-24 21:15:03 +01:00

65 lines
1.0 KiB
Handlebars

== Definitions
=== Simple Types
[options="header"]
|===
|Name|Description|Schema|Example
{{#each swagger.definitions}}
{{#unless allOf}}
{{#isnt type "object"}}
{{> propertiesRow}}
{{/isnt}}
{{/unless}}
{{/each}}
|===
=== Complex Types
{{!-- complex (object) types --}}
{{#each swagger.definitions}}
{{#is type "object"}}
==== {{@key}} [[{{@key}}]] {{!--Explicit anchor in same format as refToLink--}}
:hardbreaks:
{{description}}
===== Properties
[options="header"]
|===
|Name|Description|Schema|Example
{{#each properties}}
{{#isnt type "object"}}
{{> propertiesRow}}
{{/isnt}}
{{/each}}
|===
{{/is}}
{{/each}}
{{!-- allOff items --}}
{{#each swagger.definitions}}
{{#if allOf}}
==== {{@key}}
:hardbreaks:
{{description}}
===== Properties
[options="header"]
|===
|Name|Description|Schema|Example
{{#each allOf}}
{{#if $ref}}
{{#swaggerRef $ref}}
{{#each properties}}
{{~> propertiesRow}}
{{/each}}
{{/swaggerRef}}
{{/if}}
{{#each properties}}
{{~> propertiesRow}}
{{/each}}
{{/each}}
|===
{{/if}}
{{/each}}