Skip to content

Latest commit

 

History

History
603 lines (322 loc) · 21.2 KB

handlebars-partials.md

File metadata and controls

603 lines (322 loc) · 21.2 KB

Template structure


index.htmlDefault template for rendering the...
├─┬ base/html-head
│ └── base/titleRenders the page title
├── base/headerThis partial is displayed at the top of the...
├─┬ base/body
│ │ This partial renders the  of the HTML page.
│ ├── swagger/externalDocs
│ │   Renders the externalDocs-property in various...
│ ├─┬ swagger/tags
│ │ │ Renders a summary based on the tags of this...
│ │ └── *swagger/externalDocs*
│ ├── swagger/summary
│ │   Renders a summary of this services ignoring...
│ ├── swagger/securityDefinitions
│ │   Renders the security-section of the...
│ ├─┬ swagger/paths
│ │ │ Renders the paths-section of the Rest-Service...
│ │ └─┬ swagger/path
│ │   │ Renders a single path definition with all its...
│ │   └─┬ swagger/operation
│ │     │ This partial renders a box containing...
│ │     ├── *swagger/externalDocs*
│ │     ├─┬ swagger/request-body
│ │     │ │ Renders the request-body section of an operation.
│ │     │ ├── swagger/list-of-labels
│ │     │ │   Renders an array of strings as list of labels
│ │     │ ├── *swagger/list-of-labels*
│ │     │ └─┬ swagger/model
│ │     │   │ Renders a json-schema model within swagger...
│ │     │   └─┬ json-schema/main-panel
│ │     │     ├── json-schema/datatype
│ │     │     │   Enum values
│ │     │     ├── json-schema/reference
│ │     │     └─┬ json-schema/body
│ │     │       ├─┬ json-schema/type-object
│ │     │       │ │ Renders the properties of an `object`
│ │     │       │ ├─┬ json-schema/properties
│ │     │       │ │ ├── *json-schema/datatype*
│ │     │       │ │ └── *json-schema/body*
│ │     │       │ └─┬ json-schema/additionalProperties
│ │     │       │   ├── *json-schema/datatype*
│ │     │       │   └── *json-schema/body*
│ │     │       ├─┬ json-schema/array-items
│ │     │       │ ├── *json-schema/datatype*
│ │     │       │ └── *json-schema/body*
│ │     │       ├── *json-schema/type-object*
│ │     │       ├─┬ json-schema/allOf
│ │     │       │ ├── *json-schema/reference*
│ │     │       │ └── *json-schema/body*
│ │     │       └─┬ json-schema/anyOf
│ │     │         ├── *json-schema/datatype*
│ │     │         └── *json-schema/body*
│ │     ├─┬ swagger/parameters
│ │     │ │ Renders the parameter table within a operation...
│ │     │ ├── swagger/parameterRow
│ │     │ │   Display a single parameter in a table row.
│ │     │ └── *swagger/parameterRow*
│ │     ├─┬ swagger/responses
│ │     │ │ Renders the responses section of an operation
│ │     │ ├── *swagger/list-of-labels*
│ │     │ ├── *swagger/list-of-labels*
│ │     │ ├─┬ swagger/response
│ │     │ │ │ Renders details about a single response
│ │     │ │ ├── *swagger/model*
│ │     │ │ ├─┬ swagger/responseHeaderRow
│ │     │ │ │ │ Display a single parameter in a table row.
│ │     │ │ │ ├── *json-schema/datatype*
│ │     │ │ │ └── *json-schema/datatype*
│ │     │ │ └── *swagger/responseHeaderRow*
│ │     │ └── *swagger/response*
│ │     └── swagger/security
│ │         Renders the security definitions of the...
│ ├─┬ swagger/parameterDefinitions
│ │ │ Global parameter definitions (see...
│ │ └── *swagger/parameterRow*
│ ├─┬ swagger/responseDefinitions
│ │ │ Renders the response definitions
│ │ └── *swagger/response*
│ └─┬ swagger/definitions
│   │ Renders the definition-section of the HTML-page.
│   └── *swagger/model*
├── base/footerThis partial is displayed at the bottom of the...
└── base/javascript-libs

Partial reference

base/body

(jump to source in [email protected])

This partial renders the of the HTML page.

Uses the following partials:

base/footer

(jump to source in [email protected])

This partial is displayed at the bottom of the HTML-body. It is empty and can be overridden to include custom content in the Bootprint-result.

  • Parameters:
    • $context$: object - the whole input data

base/header

(jump to source in [email protected])

This partial is displayed at the top of the HTML-body. It is empty and can be overridden to include custom content in the Bootprint-result.

  • Parameters:
    • $context$: object - the whole input data

base/html-head

(jump to source in [email protected])

Uses the following partials:

base/javascript-libs

(jump to source in [email protected])

base/title

(jump to source in [email protected])

Renders the page title

  • Parameters:
    • $context$: object - the whole swagger definition

json-schema/additionalProperties

(jump to source in [email protected])

Uses the following partials:

json-schema/allOf

(jump to source in [email protected])

Uses the following partials:

json-schema/anyOf

(jump to source in [email protected])

Uses the following partials:

json-schema/array-items

(jump to source in [email protected])

Uses the following partials:

json-schema/body

(jump to source in [email protected])

Uses the following partials:

json-schema/datatype

(jump to source in [email protected])

Enum values

min- and max-values

Default values (for non-enum types)

json-schema/definitions

(jump to source in [email protected])

Uses the following partials:

json-schema/main-panel

(jump to source in [email protected])

Uses the following partials:

json-schema/properties

(jump to source in [email protected])

Uses the following partials:

json-schema/reference

(jump to source in [email protected])

json-schema/type-object

(jump to source in [email protected])

Renders the properties of an object

Uses the following partials:

swagger/definitions

(jump to source in [email protected])

Renders the definition-section of the HTML-page.

  • Parameters:
    • definitions: Array - a list of JSON-subschemas.

Uses the following partials:

swagger/externalDocs

(jump to source in [email protected])

Renders the externalDocs-property in various places

swagger/list-of-labels

(jump to source in [email protected])

Renders an array of strings as list of labels

  • Parameters:
    • values: Array

swagger/model

(jump to source in [email protected])

Renders a json-schema model within swagger (calls json-schema-partials).

  • Parameters:
    • model: JsonSchema - a JSON-schema definition
    • title: string - the name of the definition

Uses the following partials:

swagger/operation

(jump to source in [email protected])

This partial renders a box containing information about a single operation of the service (such as calling a POST on the "/pets" resource).

  • Parameters:
    • operation: Operation - a Swagger-Operation object.
    • method: string - the http-method (GET, POST, DELETE, PUT, PATCH)

Uses the following partials:

swagger/parameterDefinitions

(jump to source in [email protected])

Global parameter definitions (see https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject)

  • Parameters:
    • parameters: object - the parameter-definitions object

Uses the following partials:

swagger/parameterRow

(jump to source in [email protected])

Display a single parameter in a table row.

  • Parameters:
    • parameter: Parameter - a parameter object
    • key: string= - a reference key (if present, this is display in an additional column in front of the other columns
    • $ref: string= - the reference path of the parameter, in case it is a reference to a default parameter

swagger/parameters

(jump to source in [email protected])

Renders the parameter table within a operation definition.

Uses the following partials:

swagger/path

(jump to source in [email protected])

Renders a single path definition with all its methods (GET, POST).

  • Parameters:
    • path: string - the request path
    • pathItems: object - a swagger path-item-object

Uses the following partials:

swagger/paths

(jump to source in [email protected])

Renders the paths-section of the Rest-Service definition

Uses the following partials:

swagger/request-body

(jump to source in [email protected])

Renders the request-body section of an operation.

  • Parameters:
    • consumes: Array - a list of request content type eligible for this operation.
    • body: Parameter - the Parameter-Object of the body-parameter

Uses the following partials:

swagger/response

(jump to source in [email protected])

Renders details about a single response

  • Parameters:
    • response: Response - a swagger response-object

Uses the following partials:

swagger/responseDefinitions

(jump to source in [email protected])

Renders the response definitions

Uses the following partials:

swagger/responseHeaderRow

(jump to source in [email protected])

Display a single parameter in a table row.

Uses the following partials:

swagger/responses

(jump to source in [email protected])

Renders the responses section of an operation

  • Parameters:
    • responses: Array - a list of Swagger-Response definitions
    • produces: Array - a list of response content types produced by the operation

Uses the following partials:

swagger/security

(jump to source in [email protected])

Renders the security definitions of the Rest-service.

  • Parameters:
    • security: Array - TODO

swagger/securityDefinitions

(jump to source in [email protected])

Renders the security-section of the HTML-page TODO: Parameters

swagger/summary

(jump to source in [email protected])

Renders a summary of this services ignoring tags, containing references to all operations and paths

swagger/tags

(jump to source in [email protected])

Renders a summary based on the tags of this services, containing references to all operations and paths

  • Parameters:
    • tags: Array<{name: string, summary: string, operations: object}> - a list of tags

Uses the following partials: