Update LICENCE

This commit is contained in:
Kam Low 2018-09-20 00:23:17 +02:00
parent 624f6811c7
commit 8026b600bf
28 changed files with 144 additions and 70 deletions

View File

@ -1,4 +1,5 @@
Copyright (c) 2015-2017 Kam Low Copyright (c) 2015-2017 Kam Low
Code from bootprint-openapi and bootprint-json-schema Copyright (c) 2015 Nils Knappmeier
MIT License MIT License

View File

@ -1,4 +1,10 @@
var util = require('util') var util = require('util')
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/
/** /**
* *

View File

@ -1,3 +1,10 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/
module.exports = function(value, paramName) { module.exports = function(value, paramName) {
return { return {
'csv': 'Array values passed separated by comma: `?' + paramName + '=aaa,bbb`', 'csv': 'Array values passed separated by comma: `?' + paramName + '=aaa,bbb`',

View File

@ -1,3 +1,10 @@
/**
* Copyright (c) 2015 Nils Knappmeier
* https://github.com/bootprint/bootprint-openapi
*
* @license MIT
**/
module.exports = function(options) { module.exports = function(options) {
var data = options.data.root; var data = options.data.root;
var endpoint = 'http'; var endpoint = 'http';

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Show a subschema for additionaProperties of a `object` definition. Show a subschema for additionaProperties of a `object` definition.
--}} --}}
<section class="json-schema-additionalProperties"> <section class="json-schema-additionalProperties">

View File

@ -1,6 +1,9 @@
{{! {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders a json-schema "allOf"-definition. Renders a json-schema "allOf"-definition.
}} --}}
<section class="json-schema-allOf"> <section class="json-schema-allOf">
{{! Display ref (i.e. superclasses)}} {{! Display ref (i.e. superclasses)}}
<section class="json-schema-allOf-inherited"> <section class="json-schema-allOf-inherited">

View File

@ -1,6 +1,9 @@
{{! {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders a json-schema "anyOf"-definition. Renders a json-schema "anyOf"-definition.
}} --}}
<section class="json-schema-anyOf"> <section class="json-schema-anyOf">
{{! Display ref (i.e. superclasses)}} {{! Display ref (i.e. superclasses)}}
<dl> <dl>

View File

@ -1,6 +1,9 @@
{{! {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders a json-schema "items"-definition of array-types. Renders a json-schema "items"-definition of array-types.
}} --}}
<section class="json-schema-array-items"> <section class="json-schema-array-items">
{{>json-schema/datatype .}} {{>json-schema/datatype .}}
<div class="json-inner-schema"> <div class="json-inner-schema">

View File

@ -1,7 +1,10 @@
{{! {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders a json-schema without the surrounding panel. Renders a json-schema without the surrounding panel.
@param {boolean} showType whether or not to show the plain datatype for primitives @param {boolean} showType whether or not to show the plain datatype for primitives
}} --}}
{{#if description}} {{#if description}}
<section class="json-schema-description"> <section class="json-schema-description">

View File

@ -1,18 +1,14 @@
{{! {{!--
Copyright (c) 2015 Nils Knappmeier Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema https://github.com/bootprint/bootprint-json-schema
@license MIT When properties are renderered this partial renders the datatype of a property,
}} with a link to the type-definition (in case of a $ref).
Depending on the input, it renders an augmented data-type (e.g. "string[]"),
the 'format'-value (e.g. "date-time") and "enum"-values.
{{! @param {boolean} discriminator true, this property is a swagger-discriminator (in which case enums are rendered as links)
When properties are renderered this partial renders the datatype of a property, --}}
with a link to the type-definition (in case of a $ref).
Depending on the input, it renders an augmented data-type (e.g. "string[]"),
the 'format'-value (e.g. "date-time") and "enum"-values.
@param {boolean} discriminator true, this property is a swagger-discriminator (in which case enums are rendered as links)
}}
<span class="json-property-type"> <span class="json-property-type">
{{~#if $ref}} {{~#if $ref}}
{{~>json-schema/reference .}} {{~>json-schema/reference .}}

View File

@ -1,4 +1,9 @@
{{!Renders all subschemas}} {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders all subschemas
--}}
{{#if definitions}} {{#if definitions}}
{{#eachSorted definitions}} {{#eachSorted definitions}}
{{>json-schema/main-panel . title=@key anchor=true}} {{>json-schema/main-panel . title=@key anchor=true}}

View File

@ -1,11 +1,9 @@
{{! {{!--
Copyright (c) 2015 Nils Knappmeier Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema https://github.com/bootprint/bootprint-json-schema
@license MIT Renders json-schema object properties.
}} --}}
{{!Renders json-schema object properties.}}
{{#if properties}} {{#if properties}}
<section class="json-schema-properties"> <section class="json-schema-properties">
<dl> <dl>

View File

@ -1,11 +1,9 @@
{{! {{!--
Copyright (c) 2015 Nils Knappmeier Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema https://github.com/bootprint/bootprint-json-schema
@license MIT Renders a reference to a subschema
}} --}}
{{!Renders a reference to a subschema}}
{{#if $ref}} {{#if $ref}}
<span class="{{#if type}}json-schema-ref-{{type}}{{/if}}"> <span class="{{#if type}}json-schema-ref-{{type}}{{/if}}">
<a class="json-schema-ref" href="{{schemaReferenceHref $ref}}">{{schemaSubschemaName $ref}}</a> <a class="json-schema-ref" href="{{schemaReferenceHref $ref}}">{{schemaSubschemaName $ref}}</a>

View File

@ -1,5 +1,8 @@
{{!-- {{!--
Renders the properties of an `object` Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders the properties of an `object`
--}} --}}
{{>json-schema/properties}} {{>json-schema/properties}}
{{#if additionalProperties}} {{#if additionalProperties}}

View File

@ -1,8 +1,11 @@
{{! {{!--
Renders a json.schema inside a panel. Original work Copyright (c) 2015 Nils Knappmeier
@public https://github.com/bootprint/bootprint-openapi
@readonly
}} Renders a json.schema inside a panel.
@public
@readonly
--}}
<div id="definition-{{htmlId @key}}" class="definition panel" <div id="definition-{{htmlId @key}}" class="definition panel"
data-traverse-target="definition-{{htmlId @key}}"> data-traverse-target="definition-{{htmlId @key}}">
{{#if title}} {{#if title}}

View File

@ -1,7 +1,10 @@
{{!-- {{!--
Renders the definition-section of the HTML-page. Original work Copyright (c) 2015 Nils Knappmeier
@param {Definition[]} definitions a list of JSON-subschemas. https://github.com/bootprint/bootprint-openapi
@api public
Renders the definition-section of the HTML-page.
@param {Definition[]} definitions a list of JSON-subschemas.
@api public
--}} --}}
{{#if definitions}} {{#if definitions}}

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders a json-schema model within swagger (calls json-schema-partials). Renders a json-schema model within swagger (calls json-schema-partials).
@param {JsonSchema} model a JSON-schema definition @param {JsonSchema} model a JSON-schema definition
@param {string} title the name of the definition @param {string} title the name of the definition

View File

@ -1,5 +1,8 @@
{{!-- {{!--
Renders an array of strings as list of labels Original work Copyright (c) 2015 Nils Knappmeier
@param {string[]} values https://github.com/bootprint/bootprint-openapi
Renders an array of strings as list of labels
@param {string[]} values
--}} --}}
{{#each values}}<span class="default-label">{{.}}</span> {{/each}} {{#each values}}<span class="default-label">{{.}}</span> {{/each}}

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
This partial renders a box containing information about a single operation of the service This partial renders a box containing information about a single operation of the service
(such as calling a POST on the "/pets" resource). (such as calling a POST on the "/pets" resource).
@param {Operation} operation a Swagger-Operation object. @param {Operation} operation a Swagger-Operation object.

View File

@ -1,10 +1,13 @@
{{!-- {{!--
Renders the parameter table within a operation definition. Original work Copyright (c) 2015 Nils Knappmeier
@param {Array<Parameter>|Object<Parameter>} parameters a list of Swagger-Parameter objects https://github.com/bootprint/bootprint-openapi
If this is an object, an it is expected to be the global parameter list
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject Renders the parameter table within a operation definition.
and the key of each entry is display in a column in front of the other columns. @param {Array<Parameter>|Object<Parameter>} parameters a list of Swagger-Parameter objects
@api public If this is an object, an it is expected to be the global parameter list
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parametersDefinitionsObject
and the key of each entry is display in a column in front of the other columns.
@api public
--}} --}}
{{#if parameters}} {{#if parameters}}

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders a single path definition with all its methods (GET, POST). Renders a single path definition with all its methods (GET, POST).
@param {string} path the request path @param {string} path the request path
@param {object<Operation>} pathItems a swagger [path-item-object](http://swagger.io/specification/#pathItemObject) @param {object<Operation>} pathItems a swagger [path-item-object](http://swagger.io/specification/#pathItemObject)

View File

@ -1,7 +1,10 @@
{{!-- {{!--
Renders the paths-section of the Rest-Service definition Original work Copyright (c) 2015 Nils Knappmeier
@params {Path[]} paths a list of Swagger Path-Objects https://github.com/bootprint/bootprint-openapi
@api public
Renders the paths-section of the Rest-Service definition
@params {Path[]} paths a list of Swagger Path-Objects
@api public
--}} --}}
<h1>Paths</h1> <h1>Paths</h1>

View File

@ -1,8 +1,11 @@
{{!-- {{!--
Renders the request-body section of an operation. Original work Copyright (c) 2015 Nils Knappmeier
@param {string[]} consumes a list of request content type eligible for this operation. https://github.com/bootprint/bootprint-openapi
@param {Parameter} body the param-Object of the `body`-parameter
@api public Renders the request-body section of an operation.
@param {string[]} consumes a list of request content type eligible for this operation.
@param {Parameter} body the param-Object of the `body`-parameter
@api public
--}} --}}
<section class="swagger-request-body"> <section class="swagger-request-body">

View File

@ -1,8 +1,11 @@
{{!-- {{!--
Display a single parameter in a table row. Original work Copyright (c) 2015 Nils Knappmeier
@param {Header} header a (Header)[https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#headerObject] object https://github.com/bootprint/bootprint-openapi
@param {string} name the name of the response header
@api public Display a single parameter in a table row.
@param {Header} header a (Header)[https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#headerObject] object
@param {string} name the name of the response header
@api public
--}} --}}
<tr class="swagger-response-header-{{htmlId name}}"> <tr class="swagger-response-header-{{htmlId name}}">
<td> <td>

View File

@ -1,8 +1,11 @@
{{!-- {{!--
Renders the responses section of an operation Original work Copyright (c) 2015 Nils Knappmeier
@param {Response[]} responses a list of Swagger-Response definitions https://github.com/bootprint/bootprint-openapi
@param {string[]} produces a list of response content types produced by the operation
@api public Renders the responses section of an operation
@param {Response[]} responses a list of Swagger-Response definitions
@param {string[]} produces a list of response content types produced by the operation
@api public
--}} --}}
{{#if responses}} {{#if responses}}

View File

@ -1,7 +1,10 @@
{{!-- {{!--
Renders the security definitions of the Rest-service. Original work Copyright (c) 2015 Nils Knappmeier
@param {Security[]} security TODO https://github.com/bootprint/bootprint-openapi
@api public
Renders the security definitions of the Rest-service.
@param {Security[]} security TODO
@api public
--}} --}}
{{#if security}} {{#if security}}
<div class="doc-row"> <div class="doc-row">

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the security-section of the HTML-page Renders the security-section of the HTML-page
TODO: Parameters TODO: Parameters
@api public @api public

View File

@ -1,4 +1,3 @@
{{! Operations sorted by tags }}
{{#each tags}} {{#each tags}}
<h1 id="tag-{{htmlId name}}" class="swagger-summary-tag" data-traverse-target="tag-{{htmlId name}}">{{name}}</h1> <h1 id="tag-{{htmlId name}}" class="swagger-summary-tag" data-traverse-target="tag-{{htmlId name}}">{{name}}</h1>
{{#if description}} {{#if description}}