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, When properties are renderered this partial renders the datatype of a property,
with a link to the type-definition (in case of a $ref). 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[]"), Depending on the input, it renders an augmented data-type (e.g. "string[]"),
the 'format'-value (e.g. "date-time") and "enum"-values. 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"> <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,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-json-schema
Renders the properties of an `object` Renders the properties of an `object`
--}} --}}
{{>json-schema/properties}} {{>json-schema/properties}}

View File

@ -1,8 +1,11 @@
{{! {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders a json.schema inside a panel. Renders a json.schema inside a panel.
@public @public
@readonly @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,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the definition-section of the HTML-page. Renders the definition-section of the HTML-page.
@param {Definition[]} definitions a list of JSON-subschemas. @param {Definition[]} definitions a list of JSON-subschemas.
@api public @api public

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,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders an array of strings as list of labels Renders an array of strings as list of labels
@param {string[]} values @param {string[]} values
--}} --}}

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,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the parameter table within a operation definition. Renders the parameter table within a operation definition.
@param {Array<Parameter>|Object<Parameter>} parameters a list of Swagger-Parameter objects @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 If this is an object, an it is expected to be the global parameter list

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

View File

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

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Display a single parameter in a table row. 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 {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 @param {string} name the name of the response header

View File

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

View File

@ -1,4 +1,7 @@
{{!-- {{!--
Original work Copyright (c) 2015 Nils Knappmeier
https://github.com/bootprint/bootprint-openapi
Renders the security definitions of the Rest-service. Renders the security definitions of the Rest-service.
@param {Security[]} security TODO @param {Security[]} security TODO
@api public @api public

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}}