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
Code from bootprint-openapi and bootprint-json-schema Copyright (c) 2015 Nils Knappmeier
MIT License

View File

@ -1,4 +1,10 @@
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) {
return {
'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) {
var data = options.data.root;
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.
--}}
<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.
}}
--}}
<section class="json-schema-allOf">
{{! Display ref (i.e. superclasses)}}
<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.
}}
--}}
<section class="json-schema-anyOf">
{{! Display ref (i.e. superclasses)}}
<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.
}}
--}}
<section class="json-schema-array-items">
{{>json-schema/datatype .}}
<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.
@param {boolean} showType whether or not to show the plain datatype for primitives
}}
--}}
{{#if 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
@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.
{{!
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)
}}
@param {boolean} discriminator true, this property is a swagger-discriminator (in which case enums are rendered as links)
--}}
<span class="json-property-type">
{{~#if $ref}}
{{~>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}}
{{#eachSorted definitions}}
{{>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
@license MIT
}}
{{!Renders json-schema object properties.}}
Renders json-schema object properties.
--}}
{{#if properties}}
<section class="json-schema-properties">
<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
@license MIT
}}
{{!Renders a reference to a subschema}}
Renders a reference to a subschema
--}}
{{#if $ref}}
<span class="{{#if type}}json-schema-ref-{{type}}{{/if}}">
<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}}
{{#if additionalProperties}}

View File

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

View File

@ -1,7 +1,10 @@
{{!--
Renders the definition-section of the HTML-page.
@param {Definition[]} definitions a list of JSON-subschemas.
@api public
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the definition-section of the HTML-page.
@param {Definition[]} definitions a list of JSON-subschemas.
@api public
--}}
{{#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).
@param {JsonSchema} model a JSON-schema definition
@param {string} title the name of the definition

View File

@ -1,5 +1,8 @@
{{!--
Renders an array of strings as list of labels
@param {string[]} values
Original work Copyright (c) 2015 Nils Knappmeier
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}}

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
(such as calling a POST on the "/pets" resource).
@param {Operation} operation a Swagger-Operation object.

View File

@ -1,10 +1,13 @@
{{!--
Renders the parameter table within a operation definition.
@param {Array<Parameter>|Object<Parameter>} parameters a list of Swagger-Parameter objects
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
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the parameter table within a operation definition.
@param {Array<Parameter>|Object<Parameter>} parameters a list of Swagger-Parameter objects
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}}

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).
@param {string} path the request path
@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
@params {Path[]} paths a list of Swagger Path-Objects
@api public
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the paths-section of the Rest-Service definition
@params {Path[]} paths a list of Swagger Path-Objects
@api public
--}}
<h1>Paths</h1>

View File

@ -1,8 +1,11 @@
{{!--
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
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
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">

View File

@ -1,8 +1,11 @@
{{!--
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
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
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}}">
<td>

View File

@ -1,8 +1,11 @@
{{!--
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
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
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}}

View File

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

View File

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