From efb832cbccc37a59ebf7f082bfae1b7b05992fd0 Mon Sep 17 00:00:00 2001 From: Carolina Wright Date: Wed, 14 Jun 2017 12:22:16 -0300 Subject: [PATCH 01/26] Display fields for form body fix --- dist/scripts/api-console.js | 135 ++++++++++-------- src/app/directives/raml-field.tpl.html | 2 +- .../directives/resource-tree/show-resource.js | 27 ++-- src/app/directives/sidebar.js | 7 - src/app/directives/sidebar.tpl.html | 43 ++---- src/common/try_it/body_content.js | 31 +++- src/common/try_it/context.js | 4 +- src/common/try_it/named_parameters.js | 1 - src/vendor/raml-validate/raml-validate.js | 20 ++- test/regression/assertions/resource.js | 17 +++ .../assets/raml/resource-bodies-10.raml | 37 ++++- test/regression/page_objects/resourcePO.js | 13 ++ test/regression/standalone/directiveSpec.js | 36 ++++- 13 files changed, 258 insertions(+), 115 deletions(-) diff --git a/dist/scripts/api-console.js b/dist/scripts/api-console.js index 08e3778ff..94e00f149 100644 --- a/dist/scripts/api-console.js +++ b/dist/scripts/api-console.js @@ -1975,7 +1975,10 @@ Object.keys(definitions).map(function (key) { if (typeof definitions[key].reset !== 'undefined') { - definitions[key].reset($scope.methodInfo.body[key].formParameters); + //Reset formParameters or properties depending on RAML version + var body = $scope.methodInfo.body[key]; + var parameters = body.formParameters ? body.formParameters : body.properties; + definitions[key].reset(parameters); } else { definitions[key].fillWithExample(); if (definitions[key].value) { @@ -2022,15 +2025,23 @@ } function expandBodyExamples($scope, methodInfo) { - if (methodInfo.body) { - Object.keys(methodInfo.body).forEach(function (key) { - var bodyType = methodInfo.body[key]; - var type = bodyType.type ? RAML.Inspector.Types.findType(bodyType.type[0], $scope.types) : undefined; - if (!bodyType.example && type && type.example) { - bodyType.example = type.example; + function expandExamples(body) { + Object.keys(body).forEach(function (key) { + var info = body[key]; + var type = info.type ? RAML.Inspector.Types.findType(info.type[0], $scope.types) : undefined; + if (!body.example && type && type.example) { + info.example = type.example; + } + + if (info.properties) { + expandExamples(info.properties); } }); } + + if (methodInfo.body) { + expandExamples(methodInfo.body); + } return methodInfo; } @@ -2048,7 +2059,7 @@ $scope.methodInfo = expandBodyExamples($scope, methodInfo); $scope.responseInfo = getResponseInfo($scope); - $scope.context = new RAML.Services.TryIt.Context($scope.raml.baseUriParameters, resource, $scope.methodInfo); + $scope.context = new RAML.Services.TryIt.Context($scope.raml.baseUriParameters, resource, $scope.methodInfo, $scope.types); $scope.requestUrl = ''; $scope.response = {}; $scope.requestOptions = {}; @@ -2976,13 +2987,6 @@ $scope.context.bodyContent.definitions[$scope.context.bodyContent.selected].value = event.files[0]; }; - $scope.hasFormParameters = $scope.context.bodyContent && $scope.context.bodyContent.selected ? $scope.methodInfo.body[$scope.context.bodyContent.selected].hasOwnProperty('formParameters') : undefined; - - $scope.getExample = function(param) { - var definitions = $scope.context.bodyContent.definitions[$scope.context.bodyContent.selected]; - var example = definitions.contentType[param.name].example; - return example ? [example] : example; - }; }] }; }; @@ -5143,7 +5147,17 @@ RAML.Inspector = (function() { var FORM_URLENCODED = 'application/x-www-form-urlencoded'; var FORM_DATA = 'multipart/form-data'; - var BodyContent = function(contentTypes) { + var BodyContent = function(contentTypes, types) { + function toObjectArray(properties) { + Object.keys(properties).forEach(function (property) { + if (!Array.isArray(properties[property])) { + properties[property].id = properties[property].name; + properties[property] = [properties[property]]; + } + }); + return properties; + } + this.contentTypes = Object.keys(contentTypes).sort(); this.selected = this.contentTypes[0]; @@ -5163,8 +5177,23 @@ RAML.Inspector = (function() { //For RAML 0.8 formParameters should be defined, but for RAML 1.0 properties node if (definition.formParameters) { definitions[contentType] = new RAML.Services.TryIt.NamedParameters(definition.formParameters); - } else if (definition.properties) { - definitions[contentType] = new RAML.Services.TryIt.BodyType(definition.properties); + } else { + var type = definition.type[0]; + var isNativeType = RAML.Inspector.Types.isNativeType(type); + + var inlineProperties; + if (definition.properties) { + inlineProperties = toObjectArray(definition.properties); + } + + var rootProperties; + if (!isNativeType && types) { + var rootType = RAML.Inspector.Types.findType(type, types); + rootProperties = rootType && rootType.properties ? toObjectArray(rootType.properties) : undefined; + } + + var properties = Object.assign({}, inlineProperties, rootProperties); + definitions[contentType] = new RAML.Services.TryIt.NamedParameters(properties); } break; default: @@ -5277,7 +5306,7 @@ RAML.Inspector = (function() { (function() { 'use strict'; - var Context = function(baseUriParameters, resource, method) { + var Context = function(baseUriParameters, resource, method, types) { this.headers = new RAML.Services.TryIt.NamedParameters(method.headers.plain, method.headers.parameterized); this.queryParameters = new RAML.Services.TryIt.NamedParameters(method.queryParameters); @@ -5296,7 +5325,7 @@ RAML.Inspector = (function() { this.uriParameters = new RAML.Services.TryIt.NamedParameters(resource.uriParametersForDocumentation); if (method.body) { - this.bodyContent = new RAML.Services.TryIt.BodyContent(method.body); + this.bodyContent = new RAML.Services.TryIt.BodyContent(method.body, types); } this.pathBuilder = new RAML.Client.PathBuilder.create(resource.pathSegments); @@ -5444,7 +5473,6 @@ RAML.Inspector = (function() { NamedParameters.prototype.remove = function(name) { delete this.plain[name]; delete this.values[name]; - return; }; NamedParameters.prototype.data = function() { @@ -6945,26 +6973,36 @@ RAML.Inspector = (function() { }; /** - * Check a string is not smaller than a minimum length. + * Check a string (or file) is not smaller than a minimum length. + * This facet can be defined for string and file * * @param {Number} min * @return {Function} */ var isMinimumLength = function (min) { return function (check) { - return check.length >= min; + if (check.constructor === File) { + return check.size <= min; + } else { + return check.length >= min; + } }; }; /** - * Check a string does not exceed a maximum length. + * Check a string (or file) does not exceed a maximum length. + * This facet can be defined for string and file * * @param {Number} max * @return {Function} */ var isMaximumLength = function (max) { return function (check) { - return check.length <= max; + if (check.constructor === File) { + return check.size <= max; + } else { + return check.length <= max; + } }; }; @@ -7002,7 +7040,7 @@ RAML.Inspector = (function() { */ var isValidFileTypes = function (values) { return function (check) { - check = check.toLowerCase(); + check = check.type; var checkInValue = values.find(function (value) { return value.toLowerCase() === check }); @@ -7827,7 +7865,7 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache) " \n" + " \n" + "\n" + - " \n" + + " \n" + "\n" + " \n" + "\n" + - "
\n" + - "
\n" + - "

\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "\n" + - " \n" + - "

\n" + - "
\n" + - "\n" + - "
\n" + - "

\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "\n" + - " \n" + - " \n" + - " \n" + - "

\n" + - "
\n" + - "
\n" + + "

\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n" + + " \n" + + "

\n" + "\n" + " \n" + " \n" + diff --git a/src/app/directives/raml-field.tpl.html b/src/app/directives/raml-field.tpl.html index 25fd825c1..47c7defbf 100644 --- a/src/app/directives/raml-field.tpl.html +++ b/src/app/directives/raml-field.tpl.html @@ -19,7 +19,7 @@ - + Body
-
-
-

- - - - - - - - -

-
- -
-

- - - - - - - - - - -

-
-
+

+ + + + + + + + +

diff --git a/src/common/try_it/body_content.js b/src/common/try_it/body_content.js index bfdb66b86..288671592 100644 --- a/src/common/try_it/body_content.js +++ b/src/common/try_it/body_content.js @@ -4,7 +4,17 @@ var FORM_URLENCODED = 'application/x-www-form-urlencoded'; var FORM_DATA = 'multipart/form-data'; - var BodyContent = function(contentTypes) { + var BodyContent = function(contentTypes, types) { + function toObjectArray(properties) { + Object.keys(properties).forEach(function (property) { + if (!Array.isArray(properties[property])) { + properties[property].id = properties[property].name; + properties[property] = [properties[property]]; + } + }); + return properties; + } + this.contentTypes = Object.keys(contentTypes).sort(); this.selected = this.contentTypes[0]; @@ -24,8 +34,23 @@ //For RAML 0.8 formParameters should be defined, but for RAML 1.0 properties node if (definition.formParameters) { definitions[contentType] = new RAML.Services.TryIt.NamedParameters(definition.formParameters); - } else if (definition.properties) { - definitions[contentType] = new RAML.Services.TryIt.BodyType(definition.properties); + } else { + var type = definition.type[0]; + var isNativeType = RAML.Inspector.Types.isNativeType(type); + + var inlineProperties; + if (definition.properties) { + inlineProperties = toObjectArray(definition.properties); + } + + var rootProperties; + if (!isNativeType && types) { + var rootType = RAML.Inspector.Types.findType(type, types); + rootProperties = rootType && rootType.properties ? toObjectArray(rootType.properties) : undefined; + } + + var properties = Object.assign({}, inlineProperties, rootProperties); + definitions[contentType] = new RAML.Services.TryIt.NamedParameters(properties); } break; default: diff --git a/src/common/try_it/context.js b/src/common/try_it/context.js index c017eabd3..325ee226a 100644 --- a/src/common/try_it/context.js +++ b/src/common/try_it/context.js @@ -1,7 +1,7 @@ (function() { 'use strict'; - var Context = function(baseUriParameters, resource, method) { + var Context = function(baseUriParameters, resource, method, types) { this.headers = new RAML.Services.TryIt.NamedParameters(method.headers.plain, method.headers.parameterized); this.queryParameters = new RAML.Services.TryIt.NamedParameters(method.queryParameters); @@ -20,7 +20,7 @@ this.uriParameters = new RAML.Services.TryIt.NamedParameters(resource.uriParametersForDocumentation); if (method.body) { - this.bodyContent = new RAML.Services.TryIt.BodyContent(method.body); + this.bodyContent = new RAML.Services.TryIt.BodyContent(method.body, types); } this.pathBuilder = new RAML.Client.PathBuilder.create(resource.pathSegments); diff --git a/src/common/try_it/named_parameters.js b/src/common/try_it/named_parameters.js index e8e7b57a8..6547483df 100644 --- a/src/common/try_it/named_parameters.js +++ b/src/common/try_it/named_parameters.js @@ -102,7 +102,6 @@ NamedParameters.prototype.remove = function(name) { delete this.plain[name]; delete this.values[name]; - return; }; NamedParameters.prototype.data = function() { diff --git a/src/vendor/raml-validate/raml-validate.js b/src/vendor/raml-validate/raml-validate.js index dd2559601..fddaa60ec 100644 --- a/src/vendor/raml-validate/raml-validate.js +++ b/src/vendor/raml-validate/raml-validate.js @@ -143,26 +143,36 @@ }; /** - * Check a string is not smaller than a minimum length. + * Check a string (or file) is not smaller than a minimum length. + * This facet can be defined for string and file * * @param {Number} min * @return {Function} */ var isMinimumLength = function (min) { return function (check) { - return check.length >= min; + if (check.constructor === File) { + return check.size <= min; + } else { + return check.length >= min; + } }; }; /** - * Check a string does not exceed a maximum length. + * Check a string (or file) does not exceed a maximum length. + * This facet can be defined for string and file * * @param {Number} max * @return {Function} */ var isMaximumLength = function (max) { return function (check) { - return check.length <= max; + if (check.constructor === File) { + return check.size <= max; + } else { + return check.length <= max; + } }; }; @@ -200,7 +210,7 @@ */ var isValidFileTypes = function (values) { return function (check) { - check = check.toLowerCase(); + check = check.type; var checkInValue = values.find(function (value) { return value.toLowerCase() === check }); diff --git a/test/regression/assertions/resource.js b/test/regression/assertions/resource.js index 39e776b43..59332d239 100644 --- a/test/regression/assertions/resource.js +++ b/test/regression/assertions/resource.js @@ -182,6 +182,23 @@ function Resource (poName) { expect(property.getText()).toContain(type); }); }; + + this.ifDisplayingPropertyExample = function (resource, property, name) { + var bodyProperty = this.po.getTryItBodyPanelParameter(resource, property); + expect(bodyProperty.getAttribute('value')).toBe(name); + }; + + this.ifDisplayingDocumentationBodyProperties = function (resource, propertiesName, propertiesType) { + var bodyProperties = this.po.getDocumentationBodyPanelParameters(resource); + + propertiesName.forEach(function (name, index) { + var property = bodyProperties.get(index + 1); + expect(property.getText()).toContain(name); + + var type = propertiesType[index]; + expect(property.getText()).toContain(type); + }); + }; } module.exports = Resource; diff --git a/test/regression/assets/raml/resource-bodies-10.raml b/test/regression/assets/raml/resource-bodies-10.raml index 89486cd24..2d904fc4b 100644 --- a/test/regression/assets/raml/resource-bodies-10.raml +++ b/test/regression/assets/raml/resource-bodies-10.raml @@ -8,7 +8,20 @@ types: fileTypes: ['image/jpeg', 'image/png'] maxLength: 307200 -/test: + userName: + type: string + example: blah + + userProperties: + properties: + one: + type: file + two: + type: string + example: blah + +/resource1: + description: Form body with properties put: body: multipart/form-data: @@ -20,10 +33,30 @@ types: required: true example: blah -/test-root-types: +/resource2: + description: Form body with properties inheriting from root types put: body: multipart/form-data: properties: one: type: userPicture + two: + type: userName + +/resource3: + description: Form body with type inheriting from root type + put: + body: + multipart/form-data: + type: userProperties + +/resource4: + description: Form body with properties and type + put: + body: + multipart/form-data: + type: userProperties + properties: + three: + type: string diff --git a/test/regression/page_objects/resourcePO.js b/test/regression/page_objects/resourcePO.js index 03cc049c6..6a6d75bc7 100644 --- a/test/regression/page_objects/resourcePO.js +++ b/test/regression/page_objects/resourcePO.js @@ -135,6 +135,19 @@ function ResourcesPO () { .element(by.css('.raml-console-sidebar-row.raml-console-body-data')) .all(by.tagName('p')); }; + + this.getTryItBodyPanelParameter = function (resource, id) { + return this.resources.get(resource + 1) + .element(by.id('sidebar-body')) + .element(by.css('.raml-console-sidebar-row.raml-console-body-data')) + .element(by.id(id)); + }; + + this.getDocumentationBodyPanelParameters = function (resource) { + return this.resources.get(resource + 1) + .element(by.css('.raml-console-documentation-body')) + .all(by.css('.raml-console-resource-param')); + }; } ResourcesPO.prototype = basePO; diff --git a/test/regression/standalone/directiveSpec.js b/test/regression/standalone/directiveSpec.js index b8146156c..0cca1c837 100644 --- a/test/regression/standalone/directiveSpec.js +++ b/test/regression/standalone/directiveSpec.js @@ -282,6 +282,8 @@ module.exports = function() { //Assert assert.ifDisplayingProperties(1, ['one', 'two'], ['file', 'string']); + assert.ifDisplayingDocumentationBodyProperties(1, ['one', 'two'], ['file', 'string']); + assert.ifDisplayingPropertyExample(1, 'two', 'blah'); }); it('should display properties inheriting from root types for raml 1.0', function () { @@ -295,7 +297,39 @@ module.exports = function() { resourcePo.toggleResourceMethod(2, 0); //Assert - assert.ifDisplayingProperties(2, ['one'], ['userPicture']); + assert.ifDisplayingProperties(2, ['one', 'two'], ['userPicture', 'userName']); + assert.ifDisplayingDocumentationBodyProperties(2, ['one', 'two'], ['userPicture', 'userName']); + assert.ifDisplayingPropertyExample(2, 'two', 'blah'); + }); + + it('should display type inheriting from root types for raml 1.0', function () { + // Arrange + var assert = assertions.create('resource'); + var resourcePo = factory.create('resource'); + + // Act + browser.get('http://localhost:9000/directive-resource-bodies-10.html'); + + resourcePo.toggleResourceMethod(3, 0); + + //Assert + assert.ifDisplayingProperties(3, ['one', 'two'], ['file', 'string']); + assert.ifDisplayingDocumentationBodyProperties(3, ['one', 'two'], ['file', 'string']); + }); + + it('should display type and properties for raml 1.0', function () { + // Arrange + var assert = assertions.create('resource'); + var resourcePo = factory.create('resource'); + + // Act + browser.get('http://localhost:9000/directive-resource-bodies-10.html'); + + resourcePo.toggleResourceMethod(4, 0); + + //Assert + assert.ifDisplayingProperties(4, ['one', 'three', 'two'], ['file', 'string', 'string']); + assert.ifDisplayingDocumentationBodyProperties(4, ['one', 'two', 'three'], ['file', 'string', 'string']); }); it('should display formParameters for raml 0.8', function () { From 832b3e31c76a066abc94e17416c3e0ea4349f6bd Mon Sep 17 00:00:00 2001 From: Pawel Psztyc Date: Thu, 6 Jul 2017 17:24:02 +0100 Subject: [PATCH 02/26] Updated spelling of the API console. --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index cc136b64e..f88f903a1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "api-console", - "description": "The API Console used in RAML platform.", + "description": "The API console used in RAML platform.", "authors": [ "The Advanced REST client authors " ], diff --git a/package.json b/package.json index 80225dee2..d28d57ccd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "api-console", "version": "4.0.0-beta", "license": "CPAL-1.0", - "description": "The API Console used in RAML platform.", + "description": "The API console used in RAML platform.", "devDependencies": { "polymer-cli": "^0.17.0" }, From e2e899bd788dce19f7a1d9f9647fdacf73f42521 Mon Sep 17 00:00:00 2001 From: Pawel Psztyc Date: Thu, 6 Jul 2017 17:24:33 +0100 Subject: [PATCH 03/26] Updated version number after stable release. --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index f88f903a1..4cc14dbef 100644 --- a/bower.json +++ b/bower.json @@ -71,5 +71,5 @@ "demo", "docs" ], - "version": "4.0.0-beta" + "version": "4.0.0" } diff --git a/package.json b/package.json index d28d57ccd..dcec134e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "api-console", - "version": "4.0.0-beta", + "version": "4.0.0", "license": "CPAL-1.0", "description": "The API console used in RAML platform.", "devDependencies": { From c97608ca9c7517d1bea774c87978092dbad087d3 Mon Sep 17 00:00:00 2001 From: Pawel Psztyc Date: Thu, 6 Jul 2017 17:24:57 +0100 Subject: [PATCH 04/26] Removing unused file from ignored list. --- bower.json | 1 - 1 file changed, 1 deletion(-) diff --git a/bower.json b/bower.json index 4cc14dbef..387f8c2fa 100644 --- a/bower.json +++ b/bower.json @@ -63,7 +63,6 @@ }, "ignore": [ "**/.*", - "dependencyci.yml", "node_modules", "bower_components", "test", From ea4375b7d31eb346075a40786e52a1c4c0174180 Mon Sep 17 00:00:00 2001 From: Pawel Psztyc Date: Thu, 6 Jul 2017 17:25:11 +0100 Subject: [PATCH 05/26] Updated repository URL --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 387f8c2fa..e68c84fab 100644 --- a/bower.json +++ b/bower.json @@ -16,7 +16,7 @@ "main": "api-console.html", "repository": { "type": "git", - "url": "git@github.com:advanced-rest-client/api-console.git" + "url": "git@github.com:mulesoft/api-console.git" }, "dependencies": { "polymer": "Polymer/polymer#^1.6.0", From 38f905d410900e733396c0fe6ebfb5778f006807 Mon Sep 17 00:00:00 2001 From: Pawel Psztyc Date: Thu, 6 Jul 2017 17:28:43 +0100 Subject: [PATCH 06/26] Removed v3 source files. --- .npmignore | 1 - Dockerfile | 22 - Gruntfile.js | 366 - LICENSE | 497 - dist/authentication/oauth1.html | 33 - dist/authentication/oauth2.html | 11 - dist/examples/array.raml | 58 - dist/examples/box.raml | 8473 -- dist/examples/discriminator.raml | 33 - dist/examples/documentation.raml | 19 - dist/examples/example.json | 1 - dist/examples/example.raml | 13 - dist/examples/examples.raml | 30 - dist/examples/extensions.raml | 4 - dist/examples/facets.raml | 38 - dist/examples/github.raml | 21655 ----- dist/examples/includes.raml | 48 - dist/examples/inline-schema.raml | 47 - dist/examples/instagram.raml | 3369 - dist/examples/leagues.raml | 709 - dist/examples/libraries/another-types.raml | 10 - dist/examples/libraries/file-type.raml | 31 - dist/examples/libraries/person-schema.raml | 12 - dist/examples/libraries/security.raml | 19 - dist/examples/libraries/type.raml | 7 - dist/examples/library-security.raml | 12 - dist/examples/library.raml | 34 - dist/examples/linkedin.raml | 2671 - dist/examples/mini-library.raml | 12 - dist/examples/person.json | 18 - dist/examples/properties-08.raml | 35 - dist/examples/properties.raml | 169 - dist/examples/simple.raml | 232 - dist/examples/stripe.raml | 12226 --- dist/examples/twitter.raml | 34279 -------- dist/examples/types.raml | 98 - dist/favicon.ico | Bin 6518 -> 0 bytes dist/fonts/Lato-Black.woff2 | Bin 2824 -> 0 bytes dist/fonts/Lato-Black2.woff2 | Bin 16340 -> 0 bytes dist/fonts/Lato-BlackItalic.woff2 | Bin 2860 -> 0 bytes dist/fonts/Lato-BlackItalic2.woff2 | Bin 16872 -> 0 bytes dist/fonts/Lato-Blak.woff2 | Bin 2824 -> 0 bytes dist/fonts/Lato-Blak2.woff2 | Bin 16340 -> 0 bytes dist/fonts/Lato-Bold.woff2 | Bin 2808 -> 0 bytes dist/fonts/Lato-Bold2.woff2 | Bin 16392 -> 0 bytes dist/fonts/Lato-BoldItalic.woff2 | Bin 2884 -> 0 bytes dist/fonts/Lato-BoldItalic2.woff2 | Bin 17168 -> 0 bytes dist/fonts/Lato-Hairline-Italic.woff2 | Bin 2724 -> 0 bytes dist/fonts/Lato-Hairline-Italic2.woff2 | Bin 16456 -> 0 bytes dist/fonts/Lato-Hairline.woff2 | Bin 3272 -> 0 bytes dist/fonts/Lato-Hairline2.woff2 | Bin 18268 -> 0 bytes dist/fonts/Lato-Italic.woff2 | Bin 2836 -> 0 bytes dist/fonts/Lato-Italic2.woff2 | Bin 16896 -> 0 bytes dist/fonts/Lato-Light.woff2 | Bin 3380 -> 0 bytes dist/fonts/Lato-Light2.woff2 | Bin 18908 -> 0 bytes dist/fonts/Lato-LightItalic.woff2 | Bin 2840 -> 0 bytes dist/fonts/Lato-LightItalic2.woff2 | Bin 17036 -> 0 bytes dist/fonts/Lato-Regular.woff2 | Bin 2768 -> 0 bytes dist/fonts/Lato-Regular2.woff2 | Bin 16436 -> 0 bytes dist/fonts/Source-Code-Pro-2.woff2 | Bin 9528 -> 0 bytes dist/fonts/Source-Code-Pro.woff2 | Bin 8572 -> 0 bytes dist/img/spinner.gif | Bin 2608 -> 0 bytes dist/index.html | 17 - dist/scripts/api-console-vendor.js | 72443 ---------------- dist/scripts/api-console-vendor.min.js | 87 - dist/scripts/api-console.js | 8562 -- dist/scripts/api-console.min.js | 7 - dist/styles/api-console-dark-theme.css | 5003 -- dist/styles/api-console-light-theme.css | 5001 -- src/app/app.js | 65 - src/app/directives/array-field.js | 53 - src/app/directives/array-field.tpl.html | 1 - src/app/directives/click-outside.js | 27 - src/app/directives/documentation.js | 279 - src/app/directives/documentation.tpl.html | 191 - src/app/directives/dynamic-name.js | 16 - src/app/directives/examples.js | 58 - src/app/directives/examples.tpl.html | 17 - src/app/directives/markdown.js | 29 - src/app/directives/named-parameters.js | 123 - src/app/directives/named-parameters.tpl.html | 36 - src/app/directives/properties.js | 214 - src/app/directives/properties.tpl.html | 47 - src/app/directives/raml-body.js | 116 - src/app/directives/raml-body.tpl.html | 10 - src/app/directives/raml-client-generator.js | 36 - .../directives/raml-client-generator.tpl.html | 14 - src/app/directives/raml-console-loader.js | 70 - .../directives/raml-console-loader.tpl.html | 28 - src/app/directives/raml-console-spinner.js | 13 - .../directives/raml-console-spinner.tpl.html | 7 - src/app/directives/raml-console.js | 271 - src/app/directives/raml-console.tpl.html | 49 - src/app/directives/raml-field.js | 156 - src/app/directives/raml-field.tpl.html | 61 - src/app/directives/raml-initializer.js | 116 - src/app/directives/raml-initializer.tpl.html | 43 - src/app/directives/resource-panel.js | 14 - src/app/directives/resource-panel.tpl.html | 33 - .../directives/resource-tree/id-generator.js | 11 - .../resource-tree/is-current-resource.js | 10 - .../resource-tree/resource-heading.js | 23 - .../resource-tree/resource-heading.tpl.html | 1 - .../directives/resource-tree/resource-id.js | 10 - .../directives/resource-tree/resource-list.js | 168 - .../resource-tree/resource-list.tpl.html | 1 - .../resource-tree/resource-tree-root.js | 38 - .../resource-tree/resource-tree-root.tpl.html | 138 - .../directives/resource-tree/show-resource.js | 187 - src/app/directives/resource-type.js | 21 - src/app/directives/resource-type.tpl.html | 1 - src/app/directives/root-documentation.js | 108 - .../directives/root-documentation.tpl.html | 52 - src/app/directives/root-types.js | 30 - src/app/directives/root-types.tpl.html | 15 - src/app/directives/sidebar.js | 703 - src/app/directives/sidebar.tpl.html | 243 - src/app/directives/spinner.js | 23 - src/app/directives/spinner.tpl.html | 1 - src/app/directives/theme-switcher.js | 39 - src/app/directives/theme-switcher.tpl.html | 3 - src/app/directives/type-properties.js | 24 - src/app/directives/type-properties.tpl.html | 3 - src/app/directives/type.js | 67 - src/app/directives/type.tpl.html | 25 - src/app/directives/validate.js | 85 - src/app/factories/js-traverse.js | 9 - src/app/factories/raml-expander.js | 117 - src/app/factories/ramlParser.js | 96 - src/app/security/basic_auth.js | 22 - src/app/security/basic_auth.tpl.html | 13 - src/app/security/oauth1.js | 22 - src/app/security/oauth1.tpl.html | 13 - src/app/security/oauth2.js | 84 - src/app/security/oauth2.tpl.html | 41 - src/app/services/recursion-helper.js | 44 - src/assets/authentication/oauth1.html | 33 - src/assets/authentication/oauth2.html | 11 - src/assets/examples/array.raml | 58 - src/assets/examples/box.raml | 8473 -- src/assets/examples/discriminator.raml | 33 - src/assets/examples/documentation.raml | 19 - src/assets/examples/example.json | 1 - src/assets/examples/example.raml | 13 - src/assets/examples/examples.raml | 30 - src/assets/examples/extensions.raml | 4 - src/assets/examples/facets.raml | 38 - src/assets/examples/github.raml | 21655 ----- src/assets/examples/includes.raml | 48 - src/assets/examples/inline-schema.raml | 47 - src/assets/examples/instagram.raml | 3369 - src/assets/examples/leagues.raml | 709 - .../examples/libraries/another-types.raml | 10 - src/assets/examples/libraries/file-type.raml | 31 - .../examples/libraries/person-schema.raml | 12 - src/assets/examples/libraries/security.raml | 19 - src/assets/examples/libraries/type.raml | 7 - src/assets/examples/library-security.raml | 12 - src/assets/examples/library.raml | 34 - src/assets/examples/linkedin.raml | 2671 - src/assets/examples/mini-library.raml | 12 - src/assets/examples/person.json | 18 - src/assets/examples/properties-08.raml | 35 - src/assets/examples/properties.raml | 169 - src/assets/examples/simple.raml | 232 - src/assets/examples/stripe.raml | 12226 --- src/assets/examples/twitter.raml | 34279 -------- src/assets/examples/types.raml | 98 - src/assets/favicon.ico | Bin 6518 -> 0 bytes src/assets/fonts/Lato-Black.woff2 | Bin 2824 -> 0 bytes src/assets/fonts/Lato-Black2.woff2 | Bin 16340 -> 0 bytes src/assets/fonts/Lato-BlackItalic.woff2 | Bin 2860 -> 0 bytes src/assets/fonts/Lato-BlackItalic2.woff2 | Bin 16872 -> 0 bytes src/assets/fonts/Lato-Blak.woff2 | Bin 2824 -> 0 bytes src/assets/fonts/Lato-Blak2.woff2 | Bin 16340 -> 0 bytes src/assets/fonts/Lato-Bold.woff2 | Bin 2808 -> 0 bytes src/assets/fonts/Lato-Bold2.woff2 | Bin 16392 -> 0 bytes src/assets/fonts/Lato-BoldItalic.woff2 | Bin 2884 -> 0 bytes src/assets/fonts/Lato-BoldItalic2.woff2 | Bin 17168 -> 0 bytes src/assets/fonts/Lato-Hairline-Italic.woff2 | Bin 2724 -> 0 bytes src/assets/fonts/Lato-Hairline-Italic2.woff2 | Bin 16456 -> 0 bytes src/assets/fonts/Lato-Hairline.woff2 | Bin 3272 -> 0 bytes src/assets/fonts/Lato-Hairline2.woff2 | Bin 18268 -> 0 bytes src/assets/fonts/Lato-Italic.woff2 | Bin 2836 -> 0 bytes src/assets/fonts/Lato-Italic2.woff2 | Bin 16896 -> 0 bytes src/assets/fonts/Lato-Light.woff2 | Bin 3380 -> 0 bytes src/assets/fonts/Lato-Light2.woff2 | Bin 18908 -> 0 bytes src/assets/fonts/Lato-LightItalic.woff2 | Bin 2840 -> 0 bytes src/assets/fonts/Lato-LightItalic2.woff2 | Bin 17036 -> 0 bytes src/assets/fonts/Lato-Regular.woff2 | Bin 2768 -> 0 bytes src/assets/fonts/Lato-Regular2.woff2 | Bin 16436 -> 0 bytes src/assets/fonts/Source-Code-Pro-2.woff2 | Bin 9528 -> 0 bytes src/assets/fonts/Source-Code-Pro.woff2 | Bin 8572 -> 0 bytes src/assets/img/spinner.gif | Bin 2608 -> 0 bytes src/assets/styles/error.css | 187 - src/assets/styles/fonts.css | 176 - src/assets/styles/vendor/codemirror-dark.css | 144 - src/assets/styles/vendor/codemirror-light.css | 142 - src/assets/styles/vendor/codemirror.css | 417 - src/common/client.js | 48 - src/common/client/auth_strategies.js | 28 - .../client/auth_strategies/anonymous.js | 22 - .../client/auth_strategies/basic_auth.js | 26 - src/common/client/auth_strategies/oauth1.js | 27 - .../oauth1/request_authorization.js | 20 - .../oauth1/request_temporary_credentials.js | 22 - .../oauth1/request_token_credentials.js | 21 - .../client/auth_strategies/oauth1/signer.js | 55 - .../auth_strategies/oauth1/signer/hmac.js | 99 - .../oauth1/signer/plaintext.js | 38 - src/common/client/auth_strategies/oauth2.js | 88 - src/common/client/parameterized_string.js | 61 - src/common/client/path_builder.js | 15 - src/common/client/request.js | 111 - src/common/client/validator.js | 175 - .../filters/name_from_parameterizable.js | 15 - src/common/inspector.js | 103 - src/common/inspector/method.js | 141 - src/common/inspector/parameterized_header.js | 35 - src/common/inspector/properties.js | 52 - src/common/inspector/types.js | 227 - src/common/linter/yaml.js | 18 - src/common/loader_utils.js | 31 - src/common/try_it/body_content.js | 97 - src/common/try_it/body_type.js | 38 - src/common/try_it/context.js | 46 - src/common/try_it/named_parameter.js | 18 - src/common/try_it/named_parameters.js | 133 - src/common/utils.js | 43 - src/index.html | 17 - src/scss/_base.scss | 66 - src/scss/_colors-apidesigner-dark.scss | 171 - src/scss/_colors-original.scss | 159 - src/scss/_documentation.scss | 204 - src/scss/_error.scss | 101 - src/scss/_header.scss | 96 - src/scss/_highlight-dark.scss | 117 - src/scss/_highlight.scss | 117 - src/scss/_initializer.scss | 129 - src/scss/_layout.scss | 13 - src/scss/_main.scss | 17 - src/scss/_marked.scss | 230 - src/scss/_normalize.scss | 425 - src/scss/_panel.scss | 434 - src/scss/_resource.scss | 483 - src/scss/_sidebar.scss | 1176 - src/scss/_spinner.scss | 158 - src/scss/_tab.scss | 318 - src/scss/_toggle.scss | 107 - src/scss/_utility.scss | 72 - src/scss/_variables.scss | 8 - src/scss/_vertical-alignment.scss | 67 - src/scss/dark-theme.scss | 3 - src/scss/light-theme.scss | 3 - src/vendor/client-oauth2/client-oauth2.js | 902 - src/vendor/raml-sanitize/raml-sanitize.js | 378 - src/vendor/raml-validate/raml-validate.js | 561 - test/regression/assertions/displaySettings.js | 43 - test/regression/assertions/error.js | 33 - test/regression/assertions/index.js | 7 - test/regression/assertions/resource.js | 187 - .../assets/directive-all-methods.html | 17 - test/regression/assets/directive-minimum.html | 17 - .../assets/directive-query-parameters.html | 17 - .../assets/directive-resource-bodies-08.html | 17 - .../assets/directive-resource-bodies-10.html | 17 - .../assets/directive-resources.html | 17 - ...directive-security-schema-pass-though.html | 17 - .../directive-security-schema-resource.html | 17 - .../directive-security-schemes-basic.html | 17 - .../assets/directive-security-schemes.html | 17 - .../assets/directive-single-view.html | 17 - test/regression/assets/directive-types.html | 17 - .../directive-with-reponse-examples.html | 17 - .../directive-with-resource-collapsed.html | 17 - ...directive-without-download-api-client.html | 17 - .../directive-without-meta-button-group.html | 17 - .../directive-without-theme-switcher.html | 17 - .../assets/directive-without-title.html | 17 - test/regression/assets/directive-wrong.html | 17 - test/regression/assets/raml/all-methods.raml | 13 - test/regression/assets/raml/minimum.raml | 3 - .../assets/raml/query-parameters.raml | 27 - .../assets/raml/resource-bodies-08.raml | 15 - .../assets/raml/resource-bodies-10.raml | 29 - test/regression/assets/raml/resources.raml | 14 - .../assets/raml/response-examples.raml | 16 - .../raml/security-schema-pass-though.raml | 28 - .../assets/raml/security-schema-resource.raml | 24 - .../assets/raml/security-schemes-basic.raml | 12 - .../assets/raml/security-schemes.raml | 23 - test/regression/assets/raml/types.raml | 10 - test/regression/assets/raml/wrong.raml | 3 - test/regression/local.protractor.conf.js | 31 - test/regression/page_objects/basePO.js | 19 - .../page_objects/displaySettingsPO.js | 33 - test/regression/page_objects/errorPO.js | 29 - test/regression/page_objects/index.js | 7 - test/regression/page_objects/initializerPO.js | 32 - test/regression/page_objects/resourcePO.js | 142 - test/regression/standalone/directiveSpec.js | 315 - test/regression/standalone/initializerSpec.js | 198 - test/regression/standalone/standaloneSuite.js | 7 - test/regression/standalone/uriParamSpec.js | 55 - 304 files changed, 276631 deletions(-) delete mode 100644 .npmignore delete mode 100644 Dockerfile delete mode 100644 Gruntfile.js delete mode 100644 LICENSE delete mode 100644 dist/authentication/oauth1.html delete mode 100644 dist/authentication/oauth2.html delete mode 100644 dist/examples/array.raml delete mode 100644 dist/examples/box.raml delete mode 100644 dist/examples/discriminator.raml delete mode 100644 dist/examples/documentation.raml delete mode 100644 dist/examples/example.json delete mode 100644 dist/examples/example.raml delete mode 100644 dist/examples/examples.raml delete mode 100644 dist/examples/extensions.raml delete mode 100644 dist/examples/facets.raml delete mode 100644 dist/examples/github.raml delete mode 100644 dist/examples/includes.raml delete mode 100644 dist/examples/inline-schema.raml delete mode 100644 dist/examples/instagram.raml delete mode 100644 dist/examples/leagues.raml delete mode 100644 dist/examples/libraries/another-types.raml delete mode 100644 dist/examples/libraries/file-type.raml delete mode 100644 dist/examples/libraries/person-schema.raml delete mode 100644 dist/examples/libraries/security.raml delete mode 100644 dist/examples/libraries/type.raml delete mode 100644 dist/examples/library-security.raml delete mode 100644 dist/examples/library.raml delete mode 100644 dist/examples/linkedin.raml delete mode 100644 dist/examples/mini-library.raml delete mode 100644 dist/examples/person.json delete mode 100644 dist/examples/properties-08.raml delete mode 100644 dist/examples/properties.raml delete mode 100644 dist/examples/simple.raml delete mode 100644 dist/examples/stripe.raml delete mode 100644 dist/examples/twitter.raml delete mode 100644 dist/examples/types.raml delete mode 100644 dist/favicon.ico delete mode 100644 dist/fonts/Lato-Black.woff2 delete mode 100644 dist/fonts/Lato-Black2.woff2 delete mode 100644 dist/fonts/Lato-BlackItalic.woff2 delete mode 100644 dist/fonts/Lato-BlackItalic2.woff2 delete mode 100644 dist/fonts/Lato-Blak.woff2 delete mode 100644 dist/fonts/Lato-Blak2.woff2 delete mode 100644 dist/fonts/Lato-Bold.woff2 delete mode 100644 dist/fonts/Lato-Bold2.woff2 delete mode 100644 dist/fonts/Lato-BoldItalic.woff2 delete mode 100644 dist/fonts/Lato-BoldItalic2.woff2 delete mode 100644 dist/fonts/Lato-Hairline-Italic.woff2 delete mode 100644 dist/fonts/Lato-Hairline-Italic2.woff2 delete mode 100644 dist/fonts/Lato-Hairline.woff2 delete mode 100644 dist/fonts/Lato-Hairline2.woff2 delete mode 100644 dist/fonts/Lato-Italic.woff2 delete mode 100644 dist/fonts/Lato-Italic2.woff2 delete mode 100644 dist/fonts/Lato-Light.woff2 delete mode 100644 dist/fonts/Lato-Light2.woff2 delete mode 100644 dist/fonts/Lato-LightItalic.woff2 delete mode 100644 dist/fonts/Lato-LightItalic2.woff2 delete mode 100644 dist/fonts/Lato-Regular.woff2 delete mode 100644 dist/fonts/Lato-Regular2.woff2 delete mode 100644 dist/fonts/Source-Code-Pro-2.woff2 delete mode 100644 dist/fonts/Source-Code-Pro.woff2 delete mode 100644 dist/img/spinner.gif delete mode 100644 dist/index.html delete mode 100644 dist/scripts/api-console-vendor.js delete mode 100644 dist/scripts/api-console-vendor.min.js delete mode 100644 dist/scripts/api-console.js delete mode 100644 dist/scripts/api-console.min.js delete mode 100644 dist/styles/api-console-dark-theme.css delete mode 100644 dist/styles/api-console-light-theme.css delete mode 100644 src/app/app.js delete mode 100644 src/app/directives/array-field.js delete mode 100644 src/app/directives/array-field.tpl.html delete mode 100644 src/app/directives/click-outside.js delete mode 100644 src/app/directives/documentation.js delete mode 100644 src/app/directives/documentation.tpl.html delete mode 100644 src/app/directives/dynamic-name.js delete mode 100644 src/app/directives/examples.js delete mode 100644 src/app/directives/examples.tpl.html delete mode 100644 src/app/directives/markdown.js delete mode 100644 src/app/directives/named-parameters.js delete mode 100644 src/app/directives/named-parameters.tpl.html delete mode 100644 src/app/directives/properties.js delete mode 100644 src/app/directives/properties.tpl.html delete mode 100644 src/app/directives/raml-body.js delete mode 100644 src/app/directives/raml-body.tpl.html delete mode 100644 src/app/directives/raml-client-generator.js delete mode 100644 src/app/directives/raml-client-generator.tpl.html delete mode 100644 src/app/directives/raml-console-loader.js delete mode 100644 src/app/directives/raml-console-loader.tpl.html delete mode 100644 src/app/directives/raml-console-spinner.js delete mode 100644 src/app/directives/raml-console-spinner.tpl.html delete mode 100644 src/app/directives/raml-console.js delete mode 100644 src/app/directives/raml-console.tpl.html delete mode 100644 src/app/directives/raml-field.js delete mode 100644 src/app/directives/raml-field.tpl.html delete mode 100644 src/app/directives/raml-initializer.js delete mode 100644 src/app/directives/raml-initializer.tpl.html delete mode 100644 src/app/directives/resource-panel.js delete mode 100644 src/app/directives/resource-panel.tpl.html delete mode 100644 src/app/directives/resource-tree/id-generator.js delete mode 100644 src/app/directives/resource-tree/is-current-resource.js delete mode 100644 src/app/directives/resource-tree/resource-heading.js delete mode 100644 src/app/directives/resource-tree/resource-heading.tpl.html delete mode 100644 src/app/directives/resource-tree/resource-id.js delete mode 100644 src/app/directives/resource-tree/resource-list.js delete mode 100644 src/app/directives/resource-tree/resource-list.tpl.html delete mode 100644 src/app/directives/resource-tree/resource-tree-root.js delete mode 100644 src/app/directives/resource-tree/resource-tree-root.tpl.html delete mode 100644 src/app/directives/resource-tree/show-resource.js delete mode 100644 src/app/directives/resource-type.js delete mode 100644 src/app/directives/resource-type.tpl.html delete mode 100644 src/app/directives/root-documentation.js delete mode 100644 src/app/directives/root-documentation.tpl.html delete mode 100644 src/app/directives/root-types.js delete mode 100644 src/app/directives/root-types.tpl.html delete mode 100644 src/app/directives/sidebar.js delete mode 100644 src/app/directives/sidebar.tpl.html delete mode 100644 src/app/directives/spinner.js delete mode 100644 src/app/directives/spinner.tpl.html delete mode 100644 src/app/directives/theme-switcher.js delete mode 100644 src/app/directives/theme-switcher.tpl.html delete mode 100644 src/app/directives/type-properties.js delete mode 100644 src/app/directives/type-properties.tpl.html delete mode 100644 src/app/directives/type.js delete mode 100644 src/app/directives/type.tpl.html delete mode 100644 src/app/directives/validate.js delete mode 100644 src/app/factories/js-traverse.js delete mode 100644 src/app/factories/raml-expander.js delete mode 100644 src/app/factories/ramlParser.js delete mode 100644 src/app/security/basic_auth.js delete mode 100644 src/app/security/basic_auth.tpl.html delete mode 100644 src/app/security/oauth1.js delete mode 100644 src/app/security/oauth1.tpl.html delete mode 100644 src/app/security/oauth2.js delete mode 100644 src/app/security/oauth2.tpl.html delete mode 100644 src/app/services/recursion-helper.js delete mode 100644 src/assets/authentication/oauth1.html delete mode 100644 src/assets/authentication/oauth2.html delete mode 100644 src/assets/examples/array.raml delete mode 100644 src/assets/examples/box.raml delete mode 100644 src/assets/examples/discriminator.raml delete mode 100644 src/assets/examples/documentation.raml delete mode 100644 src/assets/examples/example.json delete mode 100644 src/assets/examples/example.raml delete mode 100644 src/assets/examples/examples.raml delete mode 100644 src/assets/examples/extensions.raml delete mode 100644 src/assets/examples/facets.raml delete mode 100644 src/assets/examples/github.raml delete mode 100644 src/assets/examples/includes.raml delete mode 100644 src/assets/examples/inline-schema.raml delete mode 100644 src/assets/examples/instagram.raml delete mode 100644 src/assets/examples/leagues.raml delete mode 100644 src/assets/examples/libraries/another-types.raml delete mode 100644 src/assets/examples/libraries/file-type.raml delete mode 100644 src/assets/examples/libraries/person-schema.raml delete mode 100644 src/assets/examples/libraries/security.raml delete mode 100644 src/assets/examples/libraries/type.raml delete mode 100644 src/assets/examples/library-security.raml delete mode 100644 src/assets/examples/library.raml delete mode 100644 src/assets/examples/linkedin.raml delete mode 100644 src/assets/examples/mini-library.raml delete mode 100644 src/assets/examples/person.json delete mode 100644 src/assets/examples/properties-08.raml delete mode 100644 src/assets/examples/properties.raml delete mode 100644 src/assets/examples/simple.raml delete mode 100644 src/assets/examples/stripe.raml delete mode 100644 src/assets/examples/twitter.raml delete mode 100644 src/assets/examples/types.raml delete mode 100644 src/assets/favicon.ico delete mode 100644 src/assets/fonts/Lato-Black.woff2 delete mode 100644 src/assets/fonts/Lato-Black2.woff2 delete mode 100644 src/assets/fonts/Lato-BlackItalic.woff2 delete mode 100644 src/assets/fonts/Lato-BlackItalic2.woff2 delete mode 100644 src/assets/fonts/Lato-Blak.woff2 delete mode 100644 src/assets/fonts/Lato-Blak2.woff2 delete mode 100644 src/assets/fonts/Lato-Bold.woff2 delete mode 100644 src/assets/fonts/Lato-Bold2.woff2 delete mode 100644 src/assets/fonts/Lato-BoldItalic.woff2 delete mode 100644 src/assets/fonts/Lato-BoldItalic2.woff2 delete mode 100644 src/assets/fonts/Lato-Hairline-Italic.woff2 delete mode 100644 src/assets/fonts/Lato-Hairline-Italic2.woff2 delete mode 100644 src/assets/fonts/Lato-Hairline.woff2 delete mode 100644 src/assets/fonts/Lato-Hairline2.woff2 delete mode 100644 src/assets/fonts/Lato-Italic.woff2 delete mode 100644 src/assets/fonts/Lato-Italic2.woff2 delete mode 100644 src/assets/fonts/Lato-Light.woff2 delete mode 100644 src/assets/fonts/Lato-Light2.woff2 delete mode 100644 src/assets/fonts/Lato-LightItalic.woff2 delete mode 100644 src/assets/fonts/Lato-LightItalic2.woff2 delete mode 100644 src/assets/fonts/Lato-Regular.woff2 delete mode 100644 src/assets/fonts/Lato-Regular2.woff2 delete mode 100644 src/assets/fonts/Source-Code-Pro-2.woff2 delete mode 100644 src/assets/fonts/Source-Code-Pro.woff2 delete mode 100644 src/assets/img/spinner.gif delete mode 100644 src/assets/styles/error.css delete mode 100644 src/assets/styles/fonts.css delete mode 100644 src/assets/styles/vendor/codemirror-dark.css delete mode 100644 src/assets/styles/vendor/codemirror-light.css delete mode 100644 src/assets/styles/vendor/codemirror.css delete mode 100644 src/common/client.js delete mode 100644 src/common/client/auth_strategies.js delete mode 100644 src/common/client/auth_strategies/anonymous.js delete mode 100644 src/common/client/auth_strategies/basic_auth.js delete mode 100644 src/common/client/auth_strategies/oauth1.js delete mode 100644 src/common/client/auth_strategies/oauth1/request_authorization.js delete mode 100644 src/common/client/auth_strategies/oauth1/request_temporary_credentials.js delete mode 100644 src/common/client/auth_strategies/oauth1/request_token_credentials.js delete mode 100644 src/common/client/auth_strategies/oauth1/signer.js delete mode 100644 src/common/client/auth_strategies/oauth1/signer/hmac.js delete mode 100644 src/common/client/auth_strategies/oauth1/signer/plaintext.js delete mode 100644 src/common/client/auth_strategies/oauth2.js delete mode 100644 src/common/client/parameterized_string.js delete mode 100644 src/common/client/path_builder.js delete mode 100644 src/common/client/request.js delete mode 100644 src/common/client/validator.js delete mode 100644 src/common/filters/name_from_parameterizable.js delete mode 100644 src/common/inspector.js delete mode 100644 src/common/inspector/method.js delete mode 100644 src/common/inspector/parameterized_header.js delete mode 100644 src/common/inspector/properties.js delete mode 100644 src/common/inspector/types.js delete mode 100644 src/common/linter/yaml.js delete mode 100644 src/common/loader_utils.js delete mode 100644 src/common/try_it/body_content.js delete mode 100644 src/common/try_it/body_type.js delete mode 100644 src/common/try_it/context.js delete mode 100644 src/common/try_it/named_parameter.js delete mode 100644 src/common/try_it/named_parameters.js delete mode 100644 src/common/utils.js delete mode 100644 src/index.html delete mode 100644 src/scss/_base.scss delete mode 100644 src/scss/_colors-apidesigner-dark.scss delete mode 100644 src/scss/_colors-original.scss delete mode 100644 src/scss/_documentation.scss delete mode 100644 src/scss/_error.scss delete mode 100644 src/scss/_header.scss delete mode 100644 src/scss/_highlight-dark.scss delete mode 100644 src/scss/_highlight.scss delete mode 100644 src/scss/_initializer.scss delete mode 100644 src/scss/_layout.scss delete mode 100644 src/scss/_main.scss delete mode 100644 src/scss/_marked.scss delete mode 100644 src/scss/_normalize.scss delete mode 100644 src/scss/_panel.scss delete mode 100644 src/scss/_resource.scss delete mode 100644 src/scss/_sidebar.scss delete mode 100644 src/scss/_spinner.scss delete mode 100644 src/scss/_tab.scss delete mode 100644 src/scss/_toggle.scss delete mode 100644 src/scss/_utility.scss delete mode 100644 src/scss/_variables.scss delete mode 100644 src/scss/_vertical-alignment.scss delete mode 100644 src/scss/dark-theme.scss delete mode 100644 src/scss/light-theme.scss delete mode 100644 src/vendor/client-oauth2/client-oauth2.js delete mode 100644 src/vendor/raml-sanitize/raml-sanitize.js delete mode 100644 src/vendor/raml-validate/raml-validate.js delete mode 100644 test/regression/assertions/displaySettings.js delete mode 100644 test/regression/assertions/error.js delete mode 100644 test/regression/assertions/index.js delete mode 100644 test/regression/assertions/resource.js delete mode 100644 test/regression/assets/directive-all-methods.html delete mode 100644 test/regression/assets/directive-minimum.html delete mode 100644 test/regression/assets/directive-query-parameters.html delete mode 100644 test/regression/assets/directive-resource-bodies-08.html delete mode 100644 test/regression/assets/directive-resource-bodies-10.html delete mode 100644 test/regression/assets/directive-resources.html delete mode 100644 test/regression/assets/directive-security-schema-pass-though.html delete mode 100644 test/regression/assets/directive-security-schema-resource.html delete mode 100644 test/regression/assets/directive-security-schemes-basic.html delete mode 100644 test/regression/assets/directive-security-schemes.html delete mode 100644 test/regression/assets/directive-single-view.html delete mode 100644 test/regression/assets/directive-types.html delete mode 100644 test/regression/assets/directive-with-reponse-examples.html delete mode 100644 test/regression/assets/directive-with-resource-collapsed.html delete mode 100644 test/regression/assets/directive-without-download-api-client.html delete mode 100644 test/regression/assets/directive-without-meta-button-group.html delete mode 100644 test/regression/assets/directive-without-theme-switcher.html delete mode 100644 test/regression/assets/directive-without-title.html delete mode 100644 test/regression/assets/directive-wrong.html delete mode 100644 test/regression/assets/raml/all-methods.raml delete mode 100644 test/regression/assets/raml/minimum.raml delete mode 100644 test/regression/assets/raml/query-parameters.raml delete mode 100644 test/regression/assets/raml/resource-bodies-08.raml delete mode 100644 test/regression/assets/raml/resource-bodies-10.raml delete mode 100644 test/regression/assets/raml/resources.raml delete mode 100644 test/regression/assets/raml/response-examples.raml delete mode 100644 test/regression/assets/raml/security-schema-pass-though.raml delete mode 100644 test/regression/assets/raml/security-schema-resource.raml delete mode 100644 test/regression/assets/raml/security-schemes-basic.raml delete mode 100644 test/regression/assets/raml/security-schemes.raml delete mode 100644 test/regression/assets/raml/types.raml delete mode 100644 test/regression/assets/raml/wrong.raml delete mode 100644 test/regression/local.protractor.conf.js delete mode 100644 test/regression/page_objects/basePO.js delete mode 100644 test/regression/page_objects/displaySettingsPO.js delete mode 100644 test/regression/page_objects/errorPO.js delete mode 100644 test/regression/page_objects/index.js delete mode 100644 test/regression/page_objects/initializerPO.js delete mode 100644 test/regression/page_objects/resourcePO.js delete mode 100644 test/regression/standalone/directiveSpec.js delete mode 100644 test/regression/standalone/initializerSpec.js delete mode 100644 test/regression/standalone/standaloneSuite.js delete mode 100644 test/regression/standalone/uriParamSpec.js diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 1d1fe94df..000000000 --- a/.npmignore +++ /dev/null @@ -1 +0,0 @@ -Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c9cd143c0..000000000 --- a/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM node:4.7 - -# Install Ruby (for Gem) -RUN apt-get update \ - && apt-get install -y ruby \ - && rm -rf /var/lib/apt/lists/* - -# Install Bower, Grunt & SASS -RUN npm install -g bower grunt-cli \ - && gem install sass - -# Define working directory. -WORKDIR /data - -COPY . /data - -RUN npm install && bower --allow-root install - -EXPOSE 9000 - -ENTRYPOINT ["/usr/local/bin/grunt"] -CMD ["default"] \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 9f841abea..000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,366 +0,0 @@ -'use strict'; - -module.exports = function (grunt) { - require('load-grunt-tasks')(grunt); - - grunt.initConfig({ - tempdir: '.tmp', - distdir: 'dist', - pkg: grunt.file.readJSON('package.json'), - src: { - js: ['src/**/*.js'], - jsVendor: [ - 'bower_components/marked/lib/marked.js', - 'bower_components/raml-1-parser/raml-1-parser.js', - 'bower_components/highlightjs/highlight.pack.js', - 'bower_components/vkbeautify/vkbeautify.js', - 'bower_components/jquery/dist/jquery.js', - 'bower_components/velocity/velocity.js', - 'bower_components/crypto-js/rollups/hmac-sha1.js', - 'bower_components/crypto-js/components/enc-base64.js', - 'bower_components/codemirror/lib/codemirror.js', - 'bower_components/codemirror/mode/javascript/javascript.js', - 'bower_components/codemirror/mode/xml/xml.js', - 'bower_components/codemirror/mode/yaml/yaml.js', - 'bower_components/codemirror/addon/dialog/dialog.js', - 'bower_components/codemirror/addon/search/search.js', - 'bower_components/codemirror/addon/search/searchcursor.js', - 'bower_components/codemirror/addon/lint/lint.js', - 'bower_components/angular/angular.js', - 'bower_components/angular-ui-codemirror/ui-codemirror.js', - 'bower_components/angular-marked/angular-marked.js', - 'bower_components/angular-highlightjs/angular-highlightjs.js', - 'bower_components/angular-sanitize/angular-sanitize.js', - 'bower_components/jszip/jszip.js', - 'bower_components/slug/slug.js', - 'bower_components/FileSaver/FileSaver.js', - 'bower_components/raml-client-generator/dist/raml-client-generator.js', - 'bower_components/resolve-url/resolve-url.js', - 'bower_components/js-traverse/traverse.js' - ], - html: ['src/index.html'], - scss: ['src/scss/light-theme.scss', 'src/scss/dark-theme.scss'], - scssWatch: ['src/scss/**/*.scss'], - test: ['test/**/*.js'] - }, - - connect: { - options: { - hostname: '0.0.0.0', - port: grunt.option('port') || 9000 - }, - - livereload: { - options: { - livereload: true, - open: true, - middleware: function (connect) { - return [ - connect.static('dist') - ]; - } - } - }, - - regression: { - options: { - livereload: true, - open: false, - middleware: function (connect) { - return [ - connect.static('dist'), - connect.static('test/regression/assets'), - ]; - } - } - } - }, - - clean: { - build: [ - '<%= tempdir %>', - '<%= distdir %>' - ] - }, - - copy: { - assets: { - files: [{ - dest: '<%= distdir %>', - cwd: 'src/assets/', - expand: true, - src: [ - '**', - '!styles/**/*' - ] - }] - } - }, - - ngtemplates: { - ramlConsole: { - options: { - module: 'ramlConsoleApp' - }, - - cwd: 'src/app', - src: '**/*.tpl.html', - dest: '<%= tempdir %>/templates/app.js' - } - }, - - concat: { - app: { - dest: '<%= distdir %>/scripts/<%= pkg.name %>.js', - src: [ - '<%= src.js %>', - '<%= ngtemplates.ramlConsole.dest %>' - ] - }, - - index: { - options: { - process: true - }, - - dest: '<%= distdir %>/index.html', - src: 'src/index.html' - }, - - darkTheme: { - options: { - process: function process(value) { - return value.replace(/\.raml-console-CodeMirror/g, '.CodeMirror'); - } - }, - - dest: '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css', - src: [ - 'src/assets/styles/vendor/codemirror.css', - 'src/assets/styles/fonts.css', - 'src/assets/styles/error.css', - '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css', - 'src/assets/styles/vendor/codemirror-dark.css' - ] - }, - - lightTheme: { - options: { - process: function process(value) { - return value.replace(/\.raml-console-CodeMirror/g, '.CodeMirror'); - } - }, - - dest: '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css', - src: [ - 'src/assets/styles/vendor/codemirror.css', - 'src/assets/styles/fonts.css', - 'src/assets/styles/error.css', - '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css', - 'src/assets/styles/vendor/codemirror-light.css' - ] - }, - - vendor: { - src: '<%= src.jsVendor %>', - dest: '<%= distdir %>/scripts/<%= pkg.name %>-vendor.js' - } - }, - - concurrent: { - build: [ - 'build:scripts', - 'concat:vendor', - 'concat:index', - 'copy:assets', - 'build:styles' - ], - - dist: [ - 'build:scripts:dist', - 'concat:vendor', - 'concat:index', - 'copy:assets', - 'build:styles' - ], - - themes: [ - 'concat:darkTheme', - 'concat:lightTheme' - ] - }, - - sass: { - build: { - options: { - sourcemap: 'none', - style: 'expanded', - defaultEncoding: 'UTF-8' - }, - - files: { - '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css': 'src/scss/light-theme.scss', - '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css': 'src/scss/dark-theme.scss' - } - }, - - min: { - options: { - sourcemap: 'none', - style: 'compressed', - defaultEncoding: 'UTF-8' - }, - - files: { - '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css': 'src/scss/light-theme.scss', - '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css': 'src/scss/dark-theme.scss' - } - } - }, - - watch: { - dist: { - options: { - livereload: true - }, - - tasks: [], - files: [ - '<%= distdir %>/**/*' - ] - }, - - scripts: { - tasks: ['build:scripts'], - files: [ - '<%= ngtemplates.ramlConsole.src %>', - '<%= src.js %>' - ] - }, - - vendor: { - tasks: ['concat:scripts'], - files: [ - '<%= concat.vendor.src %>' - ] - }, - - index: { - tasks: ['concat:index'], - files: [ - '<%= concat.index.src %>' - ] - }, - - styles: { - tasks: ['build:styles'], - files: [ - 'src/scss/**/*.scss' - ] - }, - - assets: { - tasks: ['copy:assets'], - files: [ - 'src/assets/**/*', - '!src/assets/styles/**/*' - ] - } - }, - - /*jshint camelcase: false */ - css_prefix: { - prefix: { - options: { - prefix: 'raml-console-', - processName: 'trim' - }, - - files: { - '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css': '<%= distdir %>/styles/<%= pkg.name %>-light-theme.css', - '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css': '<%= distdir %>/styles/<%= pkg.name %>-dark-theme.css' - } - } - }, - /*jshint camelcase: true */ - - jshint: { - options: { - jshintrc: true, - reporterOutput: '' - }, - - files: [ - 'Gruntfile.js', - '<%= src.js %>', - '<%= src.test %>', - '!src/vendor/**/*.js' - ] - }, - - uglify: { - options: { - mangle: false, - compress: true - }, - min: { - files: { - '<%= distdir %>/scripts/<%= pkg.name %>.min.js': ['<%= distdir %>/scripts/<%= pkg.name %>.js'], - '<%= distdir %>/scripts/<%= pkg.name %>-vendor.min.js': ['<%= distdir %>/scripts/<%= pkg.name %>-vendor.js'] - } - } - }, - - protractor: { - options: { - keepAlive: false - }, - - local: { - options: { - configFile: 'test/regression/local.protractor.conf.js' - } - } - } - }); - - grunt.registerTask('default', [ - 'build', - 'connect:livereload', - 'watch' - ]); - - grunt.registerTask('build', [ - 'jshint', - 'clean', - 'concurrent:build' - ]); - - grunt.registerTask('dist', [ - 'jshint', - 'clean', - 'concurrent:dist' - ]); - - grunt.registerTask('build:scripts', [ - 'ngtemplates', - 'concat:app' - ]); - - grunt.registerTask('build:scripts:dist', [ - 'ngtemplates', - 'concat:app', - 'uglify:min' - ]); - - grunt.registerTask('build:styles', [ - 'sass:build', - 'css_prefix:prefix', - 'concurrent:themes' - ]); - - grunt.registerTask('regression', [ - 'connect:regression', - 'protractor:local' - ]); -}; diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 815f6d4af..000000000 --- a/LICENSE +++ /dev/null @@ -1,497 +0,0 @@ -RAML Tools License - -Common Public Attribution License Version 1.0 (CPAL-1.0) - -1. “Definitions” - -1.0.1 “Commercial Use” means distribution or otherwise making the Covered Code -available to a third party. - -1.1 “Contributor” means each entity that creates or contributes to the creation -of Modifications. - -1.2 “Contributor Version” means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that -particular Contributor. - -1.3 “Covered Code” means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. - -1.4 “Electronic Distribution Mechanism” means a mechanism generally accepted in -the software development community for the electronic transfer of data. - -1.5 “Executable” means Covered Code in any form other than Source Code. - -1.6 “Initial Developer” means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. - -1.7 “Larger Work” means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. - -1.8 “License” means this document. - -1.8.1 “Licensable” means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, any -and all of the rights conveyed herein. - -1.9 “Modifications” means any addition to or deletion from the substance or -structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. - -B. Any new file that contains any part of the Original Code or previous -Modifications. - -1.10 “Original Code” means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, and -which, at the time of its release under this License is not already Covered Code -governed by this License. - -1.10.1 “Patent Claims” means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11 “Source Code” means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor’s -choice. The Source Code can be in a compressed or archival form, provided the -appropriate decompression or de-archiving software is widely available for no -charge. - -1.12 “You” (or “Your”) means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, “You” includes any -entity which controls, is controlled by, or is under common control with You. -For purposes of this definition, “control” means (a) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (b) ownership of more than fifty percent (50%) of the -outstanding shares or beneficial ownership of such entity. - -2. Source Code License. - -2.1 The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) -Licensable by Initial Developer to use, reproduce, modify, display, perform, -sublicense and distribute the Original Code (or portions thereof) with or -without Modifications, and/or as part of a Larger Work; and - -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of this -License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for -code that You delete from the Original Code; 2) separate from the Original Code; -or 3) for infringements caused by: i) the modification of the Original Code or -ii) the combination of the Original Code with other software or devices. - -2.2 Contributor Grant. - -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) -Licensable by Contributor, to use, reproduce, modify, display, perform, -sublicense and distribute the Modifications created by such Contributor (or -portions thereof) either on an unmodified basis, with other Modifications, as -Covered Code and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of -Modifications made by that Contributor either alone and/or in combination with -its Contributor Version (or portions of such combination), to make, use, sell, -offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by -that Contributor (or portions thereof); and 2) the combination of Modifications -made by that Contributor with its Contributor Version (or portions of such -combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for -any code that Contributor has deleted from the Contributor Version; 2) separate -from the Contributor Version; 3) for infringements caused by: i) third party -modifications of Contributor Version or ii) the combination of Modifications -made by that Contributor with other software (except as part of the Contributor -Version) or other devices; or 4) under Patent Claims infringed by Covered Code -in the absence of Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1 Application of License. - -The Modifications which You create or to which You contribute are governed by -the terms of this License, including without limitation Section 2.2. The Source -Code version of Covered Code may be distributed only under the terms of this -License or a future version of this License released under Section 6.1, and You -must include a copy of this License with every copy of the Source Code You -distribute. You may not offer or impose any terms on any Source Code version -that alters or restricts the applicable version of this License or the -recipients’ rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - -3.2 Availability of Source Code. - -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the same -media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and if -made available via Electronic Distribution Mechanism, must remain available for -at least twelve (12) months after the date it initially became available, or at -least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic -Distribution Mechanism is maintained by a third party. - -3.3 Description of Modifications. - -You must cause all Covered Code to which You contribute to contain a file -documenting the changes You made to create that Covered Code and the date of any -change. You must include a prominent statement that the Modification is derived, -directly or indirectly, from Original Code provided by the Initial Developer and -including the name of the Initial Developer in (a) the Source Code, and (b) in -any notice in an Executable version or related documentation in which You -describe the origin or ownership of the Covered Code. - -3.4 Intellectual Property Matters - -(a) Third Party Claims. - -If Contributor has knowledge that a license under a third party’s intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must include a text file with the Source -Code distribution titled “LEGAL” which describes the claim and the party making -the claim in sufficient detail that a recipient will know whom to contact. If -Contributor obtains such knowledge after the Modification is made available as -described in Section 3.2, Contributor shall promptly modify the LEGAL file in -all copies Contributor makes available thereafter and shall take other steps -(such as notifying appropriate mailing lists or newsgroups) reasonably -calculated to inform those who received the Covered Code that new knowledge has -been obtained. - -(b) Contributor APIs. - -If Contributor’s Modifications include an application programming interface and -Contributor has knowledge of patent licenses which are reasonably necessary to -implement that API, Contributor must also include this information in the LEGAL -file. - -(c) Representations. - -Contributor represents that, except as disclosed pursuant to Section 3.4(a) -above, Contributor believes that Contributor’s Modifications are Contributor’s -original creation(s) and/or Contributor has sufficient rights to grant the -rights conveyed by this License. - -3.5 Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code. If -it is not possible to put such notice in a particular Source Code file due to -its structure, then You must include such notice in a location (such as a -relevant directory) where a user would be likely to look for such a notice. If -You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License in -any documentation for the Source Code where You describe recipients’ rights or -ownership rights relating to Covered Code. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to one -or more recipients of Covered Code. However, You may do so only on Your own -behalf, and not on behalf of the Initial Developer or any Contributor. You must -make it absolutely clear than any such warranty, support, indemnity or liability -obligation is offered by You alone, and You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. - -3.6 Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements of -Section 3.1-3.5 have been met for that Covered Code, and if You include a notice -stating that the Source Code version of the Covered Code is available under the -terms of this License, including a description of how and where You have -fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients’ rights relating to the Covered -Code. You may distribute the Executable version of Covered Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit or -alter the recipient’s rights in the Source Code version from the rights set -forth in this License. If You distribute the Executable version under a -different license You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer, -Original Developer or any Contributor. You hereby agree to indemnify the Initial -Developer, Original Developer and every Contributor for any liability incurred -by the Initial Developer, Original Developer or such Contributor as a result of -any such terms You offer. - -3.7 Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License with -respect to some or all of the Covered Code due to statute, judicial order, or -regulation then You must: (a) comply with the terms of this License to the -maximum extent possible; and (b) describe the limitations and the code they -affect. Such description must be included in the LEGAL file described in Section -3.4 and must be included with all distributions of the Source Code. Except to -the extent prohibited by statute or regulation, such description must be -sufficiently detailed for a recipient of ordinary skill to be able to understand -it. - -5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - -6.1 New Versions. - -Socialtext, Inc. (“Socialtext”) may publish revised and/or new versions of the -License from time to time. Each version will be given a distinguishing version -number. - -6.2 Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may also -choose to use such Covered Code under the terms of any subsequent version of the -License published by Socialtext. No one other than Socialtext has the right to -modify the terms applicable to Covered Code created under this License. - -6.3 Derivative Works. - -If You create or use a modified version of this License (which you may only do -in order to apply it to code which is not already Covered Code governed by this -License), You must (a) rename Your license so that the phrases “Socialtext”, -“CPAL” or any confusingly similar phrase do not appear in your license (except -to note that your license differs from this License) and (b) otherwise make it -clear that Your version of the license contains terms which differ from the -CPAL. (Filling in the name of the Initial Developer, Original Developer, -Original Code or Contributor in the notice described in Exhibit A shall not of -themselves be deemed to be modifications of this License.) - -7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, -FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL -DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, -REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART -OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -THIS DISCLAIMER. - -8. TERMINATION. - -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within 30 -days of becoming aware of the breach. All sublicenses to the Covered Code which -are properly granted shall survive any termination of this License. Provisions -which, by their nature, must remain in effect beyond the termination of this -License shall survive. - -8.2 If You initiate litigation by asserting a patent infringement claim -(excluding declatory judgment actions) against Initial Developer, Original -Developer or a Contributor (the Initial Developer, Original Developer or -Contributor against whom You file such action is referred to as “Participant”) -alleging that: - -(a) such Participant’s Contributor Version directly or indirectly infringes any -patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from -Participant terminate prospectively, unless if within 60 days after receipt of -notice You either: (i) agree in writing to pay Participant a mutually agreeable -reasonable royalty for Your past and future use of Modifications made by such -Participant, or (ii) withdraw Your litigation claim with respect to the -Contributor Version against such Participant. If within 60 days of notice, a -reasonable royalty and payment arrangement are not mutually agreed upon in -writing by the parties or the litigation claim is not withdrawn, the rights -granted by Participant to You under Sections 2.1 and/or 2.2 automatically -terminate at the expiration of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant’s -Contributor Version, directly or indirectly infringes any patent, then any -rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are -revoked effective as of the date You first made, used, sold, distributed, or had -made, Modifications made by that Participant. - -8.3 If You assert a patent infringement claim against Participant alleging that -such Participant’s Contributor Version directly or indirectly infringes any -patent where such claim is resolved (such as by license or settlement) prior to -the initiation of patent infringement litigation, then the reasonable value of -the licenses granted by such Participant under Sections 2.1 or 2.2 shall be -taken into account in determining the amount or value of any payment or license. - -8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user -license agreements (excluding distributors and resellers) which have been -validly granted by You or any distributor hereunder prior to termination shall -survive termination. - -9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN -IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS -LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND -LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - -The Covered Code is a “commercial item,” as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of “commercial computer software” and “commercial -computer software documentation,” as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with -only those rights set forth herein. - -11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States of -America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, with -venue lying in Santa Clara County, California, with the losing party responsible -for costs, including without limitation, court costs and reasonable attorneys’ -fees and expenses. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. Any law or regulation -which provides that the language of a contract shall be construed against the -drafter shall not apply to this License. - -12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer, Original Developer and the Contributors, each -party is responsible for claims and damages arising, directly or indirectly, out -of its utilization of rights under this License and You agree to work with -Initial Developer, Original Developer and Contributors to distribute such -responsibility on an equitable basis. Nothing herein is intended or shall be -deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as -Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits -you to utilize portions of the Covered Code under Your choice of the CPAL or the -alternative licenses, if any, specified by the Initial Developer in the file -described in Exhibit A. - -14. ADDITIONAL TERM: ATTRIBUTION - -(a) As a modest attribution to the organizer of the development of the Original -Code (“Original Developer”), in the hope that its promotional value may help -justify the time, money and effort invested in writing the Original Code, the -Original Developer may include in Exhibit B (“Attribution Information”) a -requirement that each time an Executable and Source Code or a Larger Work is -launched or initially run (which includes initiating a session), a prominent -display of the Original Developer’s Attribution Information (as defined below) -must occur on the graphic user interface employed by the end user to access such -Covered Code (which may include display on a splash screen), if any. The size of -the graphic image should be consistent with the size of the other elements of -the Attribution Information. If the access by the end user to the Executable and -Source Code does not create a graphic user interface for access to the Covered -Code, this obligation shall not apply. If the Original Code displays such -Attribution Information in a particular form (such as in the form of a splash -screen, notice at login, an “about” display, or dedicated attribution area on -user interface screens), continued use of such form for that Attribution -Information is one way of meeting this requirement for notice. - -(b) Attribution information may only include a copyright notice, a brief -phrase, graphic image and a URL (“Attribution Information”) and is subject to -the Attribution Limits as defined below. For these purposes, prominent shall -mean display for sufficient duration to give reasonable notice to the user of -the identity of the Original Developer and that if You include Attribution -Information or similar information for other parties, You must ensure that the -Attribution Information for the Original Developer shall be no less prominent -than such Attribution Information or similar information for the other party. -For greater certainty, the Original Developer may choose to specify in Exhibit B -below that the above attribution requirement only applies to an Executable and -Source Code resulting from the Original Code or any Modification, but not a -Larger Work. The intent is to provide for reasonably modest attribution, -therefore the Original Developer cannot require that You display, at any time, -more than the following information as Attribution Information: (a) a copyright -notice including the name of the Original Developer; (b) a word or one phrase -(not exceeding 10 words); (c) one graphic image provided by the Original -Developer; and (d) a URL (collectively, the “Attribution Limits”). - -(c) If Exhibit B does not include any Attribution Information, then there are -no requirements for You to display any Attribution Information of the Original -Developer. - -(d) You acknowledge that all trademarks, service marks and/or trade names -contained within the Attribution Information distributed with the Covered Code -are the exclusive property of their owners and may only be used with the -permission of their owners, or under circumstances otherwise permitted by law or -as expressly set out in this License. - -15. ADDITIONAL TERM: NETWORK USE. - -The term “External Deployment” means the use, distribution, or communication of -the Original Code or Modifications in any way such that the Original Code or -Modifications may be used by anyone other than You, whether those works are -distributed or communicated to those persons or made available as an application -intended for use over a network. As an express condition for the grants of -license hereunder, You must treat any External Deployment by You of the Original -Code or Modifications as a distribution under section 3.1 and make Source Code -available under Section 3.2. - -EXHIBIT A - -“The contents of this file are subject to the Common Public Attribution License -Version 1.0 (the “License”); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -https://github.com/raml-org. The License is based on the Mozilla Public License -Version 1.1 but Sections 14 and 15 have been added to cover use of software over -a computer network and provide for limited attribution for the Original -Developer. In addition, Exhibit A has been modified to be consistent with -Exhibit B. - -Software distributed under the License is distributed on an “AS IS” basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -specific language governing rights and limitations under the License. - -The Original Code is the JSNotebook, API Designer, and API Console. - -The Initial Developer of the Original Code is MuleSoft. Copyright (c) 2013 -MuleSoft. All Rights Reserved. - - - -EXHIBIT B. Attribution Information Attribution Copyright Notice: Copyright (c) -2013 MuleSoft, Inc. - -Attribution Phrase (not exceeding 10 words): Powered by MuleSoft for RAML. -Attribution URL: http://www.MuleSoft.org - -Graphic Image provided in the Covered Code as file: - -http://www.mulesoft.com/sites/all/themes/mulesoft/images/elements/powered-by-mulesoft.png diff --git a/dist/authentication/oauth1.html b/dist/authentication/oauth1.html deleted file mode 100644 index a40176c75..000000000 --- a/dist/authentication/oauth1.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - diff --git a/dist/authentication/oauth2.html b/dist/authentication/oauth2.html deleted file mode 100644 index f48fc1c52..000000000 --- a/dist/authentication/oauth2.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/dist/examples/array.raml b/dist/examples/array.raml deleted file mode 100644 index c617b801b..000000000 --- a/dist/examples/array.raml +++ /dev/null @@ -1,58 +0,0 @@ -#%RAML 1.0 -#baseUri: http://www.tshirt.com/api -baseUri: http://mocksvc.mulesoft.com/mocks/a2126894-176f-4892-b21a-0cd998bcdcdb/api -title: T-Shirt Ordering Service -version: 1.0.development -mediaType: [application/json] -types: - Shirts: - type: array - items: shirt - shirt: - type: object - properties: - size: number - productCode: string - description: string - -/orders: - displayName: Orders - description: Orders collection resource used to create new orders. - get: - description: lists all orders of a specific user - queryParameters: - userId: - type: string - description: use to query all orders of a user - required: true - example: 1964401a-a8b3-40c1-b86e-d8b9f75b5842 - size: - description: the amount of elements of each result page - type: integer - required: false - example: 10 - page: - description: the page number - type: integer - required: false - example: 0 - responses: - 200: - body: - application/json: - type: object - properties: - orders: - type: array - items: - type: object - properties: - order_id: string - creation_date: string - items: - type: array - items: - type: object - properties: - product_id: string - quantity: integer diff --git a/dist/examples/box.raml b/dist/examples/box.raml deleted file mode 100644 index eb59e3378..000000000 --- a/dist/examples/box.raml +++ /dev/null @@ -1,8473 +0,0 @@ -#%RAML 0.8 ---- -title: Box.com API -version: "2.0" -baseUri: https://api.box.com/{version} -securitySchemes: - - oauth_2_0: - description: | - The Box API uses OAuth 2 for authentication. An authorization header containing - a valid access_token must be included in every request. - type: OAuth 2.0 - describedBy: - headers: - Authorization: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "access_token" query string parameter. - type: string - settings: - authorizationUri: https://www.box.com/api/oauth2/authorize - accessTokenUri: https://www.box.com/api/oauth2/token - authorizationGrants: [ code, token ] -securedBy: [ oauth_2_0 ] -mediaType: application/json -resourceTypes: - - base: - get?: - headers: - If-None-Match?: - description: | - If-None-Match headers ensure that you don'''t retrieve unnecessary data - if you already have the most current version on-hand. - type: string - On-Behalf-Of?: - description: | - Used for enterprise administrators to make API calls on behalf of their - managed users. To enable this functionality, please contact us with your - API key. - type: string - responses: - 200?: - description: | - The request has succeeded. The information returned with the response - is dependent on the method used in the request. - 202?: - description: | - The request has been accepted for processing, but the processing has - not been completed. - 302?: - description: "Found. The requested resource resides temporarily under a different URI." - 304?: - description: | - Not Modified. If the client has performed a conditional GET request - and access is allowed, but the document has not been modified - 400: - description: | - Bad Request. The request could not be understood by the server due - to malformed syntax. - 401: - description: "Unauthorized. The request requires user authentication." - 404: - description: "Not Found. The server has not found anything matching the Request-URI." - 429: - description: "Your application is sending too many simultaneous requests." - 500: - description: "We couldn't return the representation due to an internal server error." - 507: - description: | - Insufficient Storage. The server is unable to store the representation - needed to complete the request - post?: - headers: - If-Match?: - description: | - If-Match header let you ensure that your app only alters files/folders - on Box if you have the current version. - type: string - Content-MD5: - description: The SHA1 hash of the file. - type: string - responses: - 201?: - description: | - The request has been fulfilled and resulted in a new resource being - created. - 403: - description: | - Forbidden. The server understood the request, but is refusing to - fulfill it. - 405: - description: | - Method Not Allowed. The method specified in the Request-Line is not - allowed for the resource identified by the Request-URI. - 409: - description: | - Conflict. The request could not be completed due to a conflict with - the current state of the resource. Often happened because of file - names duplication. - 429: - description: "Your application is sending too many simultaneous requests." - put?: - headers: - If-Match?: - description: | - If-Match header let you ensure that your app only alters files/folders - on Box if you have the current version. - type: string - responses: - 200?: - description: | - The request has succeeded. The information returned with the response - is dependent on the method used in the request. - 429: - description: "Your application is sending too many simultaneous requests." - delete?: - headers: - If-Match?: - description: | - If-Match header let you ensure that your app only alters files/folders - on Box if you have the current version. - type: string - responses: - 204?: - description: | - "No Content. The server has fulfilled the request but does not need to - return an entity-body, and might want to return updated metainformation." - 404: - description: "The file is not in the trash." - 412: - description: | - Precondition Failed. The precondition given in one or more of the - request-header fields evaluated to false when it was tested on the - server. - 429: - description: "Your application is sending too many simultaneous requests." -/folders: - type: base - post: - description: | - Used to create a new empty folder. The new folder will be created - inside of the specified parent folder - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "The desired name for the folder.", - "type": "string" - }, - "parent": { - "description": "The parent folder.", - "type": "object" - }, - "id": { - "description": "The ID of the parent folder.", - "type": "string" - } - }, - "required": [ "name", "parent", "id" ] - } - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 0, - "entries": [], - "offset": 0, - "limit": 100 - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For folders is 'folder'.", - "type": "string" - }, - "id": { - "description": "The folder'''s ID.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this folder.", - "type": "string" - }, - "name": { - "description": "The name of the folder.", - "type": "string" - }, - "created_at": { - "description": "The time the folder was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time the folder or its contents were last modified.", - "type": "timestamp" - }, - "description": { - "description": "The description of the folder.", - "type": "string" - }, - "size": { - "description": "The folder size in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "Array of paths.", - "type": "array" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this folder.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last modified this folder.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this folder.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link for this folder.", - "type": "object" - }, - "folder_upload_email": { - "properties": { - "access": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "description": "The upload email address for this folder.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder that contains this one.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "item_collection": { - "items": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries", - "type": "array" - }, - "type": "object" - }, - "description": "A collection of mini file and folder objects contained in this folder.", - "type": "array" - }, - "sync_state": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "enum": [ "synced", "not_synced", "partially_synced" ] - }, - "has_collaborations": { - "description": "Whether this folder has any collaborators.", - "required": false, - "type": "boolean" - } - }, - "type": "object" - } - /{folderId}: - type: base - uriParameters: - folderId: - description: | - The ID of the parent folder - type: string - get: - description: | - Retrieves the full metadata about a folder, including information about - when it was last updated as well as the files and folders contained in it. - The root folder of a Box account is always represented by the id "0". - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 1, - "entries": [ - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg" - } - ], - "offset": 0, - "limit": 100 - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - put: - description: | - Used to update information about the folder. To move a folder, update the ID - of its parent. To enable an email address that can be used to upload files - to this folder, update the folder_upload_email attribute. An optional - If-Match header can be included to ensure that client only updates the folder - if it knows about the latest version. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "The desired name for the folder.", - "type": "string" - }, - "parent": { - "description": "The parent folder.", - "type": "object" - }, - "id": { - "description": "The ID of the parent folder.", - "type": "string" - }, - "description": { - "description": "The description of the folder.", - "type": "string" - }, - "shared_link": { - "description": "An object representing this item'''s shared link and associated permissions.", - "type": "object" - }, - "access": { - "description": "The level of access required for this shared link.", - "type": [ "open", "company", "collaborators"] - }, - "unshared_at": { - "description": "The day that this link should be disabled at. Timestamps are rounded off to the given day.", - "type": "timestamp" - } - }, - "required": [ "name", "parent", "id"] - } - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "New Folder Name!", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 1, - "entries": [ - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg" - } - ], - "offset": 0, - "limit": 100 - } - } - delete: - description: | - Used to delete a folder. A recursive parameter must be included in order to - delete folders that have items inside of them. An optional If-Match header - can be included to ensure that client only deletes the folder if it knows - about the latest version. - queryParameters: - recursive: - description: Whether to delete this folder if it has items inside of it. - type: boolean - responses: - 204: - description: Folder removed. - post: - description: | - Restores an item that has been moved to the trash. Default behavior is to - restore the item to the folder it was in before it was moved to the trash. - If that parent folder no longer exists or if there is now an item with the - same name in that parent folder, the new parent folder and/or new name - will need to be included in the request. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "The new name for this item.", - "type": "string" - }, - "parent": { - "description": "The new parent folder for this item.", - "type": "object" - }, - "id": { - "description": "The id of the new parent folder.", - "type": "string" - } - } - } - responses: - 201: - description: Item was succesfully created. - body: - example: | - { - "type": "folder", - "id": "588970022", - "sequence_id": "2", - "etag": "2", - "name": "heloo world", - "created_at": "2013-01-15T16:15:27-08:00", - "modified_at": "2013-02-07T13:26:00-08:00", - "description": "", - "size": 0, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "modified_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "trashed_at": null, - "purged_at": null, - "content_created_at": "2013-01-15T16:15:27-08:00", - "content_modified_at": "2013-02-07T13:26:00-08:00", - "owned_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "shared_link": null, - "folder_upload_email": null, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - /copy: - type: base - post: - description: | - Used to create a copy of a folder in another folder. The original version - of the folder will not be altered. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "An optional new name for the folder.", - "type": "string" - }, - "parent": { - "description": "Object representing the new location of the folder.", - "type": "string" - }, - "id": { - "description": "The ID of the destination folder.", - "type": "string" - } - }, - "required": [ "parent", "id" ] - } - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 1, - "entries": [ - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg" - } - ], - "offset": 0, - "limit": 100 - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For folders is 'folder'.", - "type": "string" - }, - "id": { - "description": "The folder'''s ID.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this folder.", - "type": "string" - }, - "name": { - "description": "The name of the folder.", - "type": "string" - }, - "created_at": { - "description": "The time the folder was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time the folder or its contents were last modified.", - "type": "timestamp" - }, - "description": { - "description": "The description of the folder.", - "type": "string" - }, - "size": { - "description": "The folder size in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "Array of paths.", - "type": "array" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this folder.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last modified this folder.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this folder.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link for this folder.", - "type": "object" - }, - "folder_upload_email": { - "properties": { - "access": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "description": "The upload email address for this folder.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder that contains this one.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "item_collection": { - "items": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries", - "type": "array" - }, - "type": "object" - }, - "description": "A collection of mini file and folder objects contained in this folder.", - "type": "array" - }, - "sync_state": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "enum": [ "synced", "not_synced", "partially_synced" ] - }, - "has_collaborations": { - "description": "Whether this folder has any collaborators.", - "required": false, - "type": "boolean" - } - }, - "type": "object" - } - /trash: - type: base - get: - description: | - Retrieves an item that has been moved to the trash. The full item will be - returned, including information about when the it was moved to the trash. - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "588970022", - "sequence_id": "1", - "etag": "1", - "name": "heloo world", - "created_at": "2013-01-15T16:15:27-08:00", - "modified_at": "2013-01-17T13:48:23-08:00", - "description": "", - "size": 0, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "1", - "sequence_id": null, - "etag": null, - "name": "Trash" - } - ] - }, - "created_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "modified_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "trashed_at": "2013-02-07T12:53:32-08:00", - "purged_at": "2013-03-09T12:53:32-08:00", - "content_created_at": "2013-01-15T16:15:27-08:00", - "content_modified_at": "2013-01-17T13:48:23-08:00", - "owned_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "shared_link": null, - "folder_upload_email": null, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "trashed" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - delete: - description: | - Permanently deletes an item that is in the trash. The item will no longer - exist in Box. This action cannot be undone. - responses: - 204: - description: Item successfully removed. - /items: - type: base - get: - description: | - Retrieves the files and/or folders contained within this folder - without any other metadata about the folder. - queryParameters: - fields: - description: Attribute(s) to include in the response - type: string - limit: - description: The number of items to return - type: integer - default: 100 - maximum: 1000 - offset: - description: The item at which to begin the response - type: integer - default: 0 - responses: - 200: - body: - example: | - { - "total_count": 24, - "entries": [ - { - "type": "folder", - "id": "192429928", - "sequence_id": "1", - "etag": "1", - "name": "Stephen Curry Three Pointers" - }, - { - "type": "file", - "id": "818853862", - "sequence_id": "0", - "etag": "0", - "name": "Warriors.jpg" - } - ], - "offset": 0, - "limit": 2, - "order": [ - { - "by": "type", - "direction": "ASC" - }, - { - "by": "name", - "direction": "ASC" - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - ], - "type": "array", - "offset": { - "type": "integer" - }, - "limit": { - "type": "integer" - }, - "order": { - "ord": { - "properties": { - "by": { - "type": "string" - }, - "direction": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array", - "required": "no" - } - } - } - /collaborations: - type: base - get: - description: | - Use this to get a list of all the collaborations on a folder i.e. all of - the users that have access to that folder. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "collaboration", - "id": "14176246", - "created_by": { - "type": "user", - "id": "4276790", - "name": "David Lee", - "login": "david@box.com" - }, - "created_at": "2011-11-29T12:56:35-08:00", - "modified_at": "2012-09-11T15:12:32-07:00", - "expires_at": null, - "status": "accepted", - "accessible_by": { - "type": "user", - "id": "755492", - "name": "Simon Tan", - "login": "simon@box.net" - }, - "role": "editor", - "acknowledged_at": "2011-11-29T12:59:40-08:00", - "item": null - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "modified_at": { - "type": "timestamp" - }, - "expires_at": { - "type": "timestamp" - }, - "status": { - "type": "string" - }, - "accessible_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "role": { - "type": "string" - }, - "acknowledged_at": { - "type": "timestamp" - }, - "item": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - /trash/items: - type: base - get: - description: | - Retrieves the files and/or folders that have been moved to the trash. Any - attribute in the full files or folders objects can be passed in with the - fields parameter to get specific attributes, and only those specific - attributes back; otherwise, the mini format is returned for each item by - default. Multiple attributes can be passed in separated by commas e.g. - fields=name,created_at. Paginated results can be retrieved using the limit - and offset parameters. - queryParameters: - fields: - description: Attribute(s) to include in the response - type: string - limit: - description: The number of items to return - type: integer - default: 100 - maximum: 1000 - offset: - description: The item at which to begin the response - type: integer - default: 0 - responses: - 200: - body: - example: | - { - "total_count": 49542, - "entries": [ - { - "type": "file", - "id": "2701979016", - "sequence_id": "1", - "etag": "1", - "sha1": "9d976863fc849f6061ecf9736710bd9c2bce488c", - "name": "file Tue Jul 24 145436 2012KWPX5S.csv" - }, - { - "type": "file", - "id": "2698211586", - "sequence_id": "1", - "etag": "1", - "sha1": "09b0e2e9760caf7448c702db34ea001f356f1197", - "name": "file Tue Jul 24 010055 20129Z6GS3.csv" - } - ], - "offset": 0, - "limit": 2 - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - ], - "type": "array", - "offset": { - "type": "integer" - }, - "limit": { - "type": "integer" - }, - "order": { - "ord": { - "properties": { - "by": { - "type": "string" - }, - "direction": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array", - "required": "no" - } - } - } -/files/{fileId}: - type: base - uriParameters: - fileId: - description: Box'''s unique string identifying this file. - type: string - get: - description: Used to retrieve the metadata about a file. - responses: - 200: - body: - example: | - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg", - "description": "a picture of tigers", - "size": 629644, - "path_collection": { - "total_count": 2, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - } - ] - }, - "created_at": "2012-12-12T10:55:30-08:00", - "modified_at": "2012-12-12T11:04:26-08:00", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/rh935iit6ewrmw0unyul", - "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "parent": { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - }, - "item_status": "active" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - put: - description: | - Used to update individual or multiple fields in the file object, including - renaming the file, changing it'''s description, and creating a shared link - for the file. To move a file, change the ID of its parent folder. An optional - If-Match header can be included to ensure that client only updates the file - if it knows about the latest version. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "The new name for the file.", - "type": "string" - }, - "description": { - "description": "The new description for the file.", - "type": "string" - }, - "parent": { - "description": "The parent folder of this file.", - "type": "object" - }, - "id": { - "description": "The ID of the parent folder.", - "type": "string" - }, - "shared_link": { - "description": "An object representing this item'''s shared link and associated permissions.", - "type": "object" - }, - "access": { - "description": "The level of access required for this shared link.", - "type": ["open", "company", "collaborators" ] - }, - "unshared_at": { - "description": "The day that this link should be disabled at. Timestamps are rounded off to the given day.", - "type": "timestamp" - }, - "permissions": { - "description": "The set of permissions that apply to this link.", - "type": "object" - }, - "permissions.download": { - "description": "Whether this link allows downloads.", - "type": "boolean" - }, - "permissions.preview": { - "description": "Whether this link allows previews.", - "type": "boolean" - } - } - } - responses: - 200: - body: - example: | - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "new name.jpg", - "description": "a picture of tigers", - "size": 629644, - "path_collection": { - "total_count": 2, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - } - ] - }, - "created_at": "2012-12-12T10:55:30-08:00", - "modified_at": "2012-12-12T11:04:26-08:00", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/rh935iit6ewrmw0unyul", - "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "parent": { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - }, - "item_status": "active" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - delete: - description: | - Discards a file to the trash. The 'etag' of the file can be included as an - 'If-Match' header to prevent race conditions. - Trash: Depending on the enterprise settings for this user, the item will - either be actually deleted from Box or moved to the trash. - responses: - 204: - description: Confirm deletion. - 412: - description: If the 'If-Match' header is sent and fails. - post: - description: | - Restores an item that has been moved to the trash. Default behavior is to - restore the item to the folder it was in before it was moved to the trash. - If that parent folder no longer exists or if there is now an item with the - same name in that parent folder, the new parent folder and/or new name will - need to be included in the request. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "name": { - "description": "The new name for this item.", - "type": "string" - }, - "parent": { - "description": "The new parent folder for this item.", - "type": "object" - }, - "id": { - "description": "The id of the new parent folder.", - "type": "string" - } - } - } - responses: - 201: - body: - example: | - { - "type": "file", - "id": "5859258256", - "sequence_id": "3", - "etag": "3", - "sha1": "4bd9e98652799fc57cf9423e13629c151152ce6c", - "name": "Screenshot_1_30_13_6_37_PM.png", - "description": "", - "size": 163265, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_at": "2013-01-30T18:43:56-08:00", - "modified_at": "2013-02-07T10:56:58-08:00", - "trashed_at": null, - "purged_at": null, - "content_created_at": "2013-01-30T18:43:56-08:00", - "content_modified_at": "2013-02-07T10:56:58-08:00", - "created_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "modified_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "owned_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "shared_link": { - "url": "https://seanrose.box.com/s/ebgti08mtmhbpb4vlp55", - "download_url": "https://seanrose.box.com/shared/static/ebgti08mtmhbpb4vlp55.png", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 4, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - /content: - type: base - get: - description: | - Retrieves the actual data of the file. An optional version parameter can be - set to download a previous version of the file. - queryParameters: - version: - description: The ID specific version of this file to download. - type: string - responses: - 302: - description: Found - 202: - description: | - If the file is not ready to be downloaded (i.e. in the case where the - file was uploaded immediately before the download request), a response - with an HTTP status of 202 Accepted will be returned with a 'Retry-After' - header indicating the time in seconds after which the file will be - available for the client to download. - /versions: - type: base - get: - description: | - If there are previous versions of this file, this method can be used to - retrieve metadata about the older versions. - ALERT: Versions are only tracked for Box users with premium accounts. - responses: - 200: - description: | - An array of version objects are returned. If there are no previous - versions of this file, then an empty array will be returned. - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "file_version", - "id": "672259576", - "sha1": "359c6c1ed98081b9a69eb3513b9deced59c957f9", - "name": "Dragons.js", - "size": 92556, - "created_at": "2012-08-20T10:20:30-07:00", - "modified_at": "2012-11-28T13:14:58-08:00", - "modified_by": { - "type": "user", - "id": "183732129", - "name": "sean rose", - "login": "sean+apitest@box.com" - } - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "created_at": { - "type": "timestamp" - }, - "modified_at": { - "type": "timestamp" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - /copy: - type: base - post: - description: | - Used to create a copy of a file in another folder. The original version of - the file will not be altered. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "parent": { - "description": "Folder object representing the new location of the file.", - "type": "string" - }, - "id": { - "description": "The ID of the destination folder.", - "type": "string" - }, - "name": { - "description": "An optional new name for the file", - "type": "string" - } - }, - "required": [ "parent", "id"] - } - responses: - 200: - body: - example: | - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg", - "description": "a picture of tigers", - "size": 629644, - "path_collection": { - "total_count": 2, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - } - ] - }, - "created_at": "2012-12-12T10:55:30-08:00", - "modified_at": "2012-12-12T11:04:26-08:00", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/rh935iit6ewrmw0unyul", - "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "parent": { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures" - }, - "item_status": "active" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - 409: - description: | - Will be returned if the intended destination folder is the same, as this - will cause a name collision. - /thumbnail.extension: - type: base - get: - description: | - Retrieves a thumbnail, or smaller image representation, of this file. Sizes - of 32x32, 64x64, 128x128, and 256x256 can be returned. Currently thumbnails - are only available in .png format and will only be generated for image file - formats. - There are three success cases that your application needs to account for: - - If the thumbnail isn'''t available yet, a 202 Accepted HTTP status will - be returned, including a 'Location' header pointing to a placeholder - graphic that can be used until the thumbnail is returned. A 'Retry-After' - header will also be returned, indicating the time in seconds after which - the thumbnail will be available. Your application should only attempt to - get the thumbnail again after Retry-After time. - - If Box can'''t generate a thumbnail for this file type, a 302 Found - response will be returned, redirecting to a placeholder graphic in the - requested size for this particular file type. - - If the thumbnail is available, a 200 OK response will be returned with - the contents of the thumbnail in the body. - - If Box is unable to generate a thumbnail for this particular file, a - 404 'Not Found' response will be returned with a code of - preview_cannot_be_generated. If there are any bad parameters sent in, a - standard 400 'Bad Request' will be returned. - queryParameters: - min_height: - description: The minimum height of the thumbnail. - type: integer - min_width: - description: The minimum width of the thumbnail. - type: integer - max_height: - description: The maximum height of the thumbnail - type: integer - max_width: - description: The maximum width of the thumbnail - type: integer - /trash: - type: base - get: - description: | - Retrieves an item that has been moved to the trash. The full item will be - returned, including information about when the it was moved to the trash. - responses: - 200: - body: - example: | - { - "type": "file", - "id": "5859258256", - "sequence_id": "2", - "etag": "2", - "sha1": "4bd9e98652799fc57cf9423e13629c151152ce6c", - "name": "Screenshot_1_30_13_6_37_PM.png", - "description": "", - "size": 163265, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "1", - "sequence_id": null, - "etag": null, - "name": "Trash" - } - ] - }, - "created_at": "2013-01-30T18:43:56-08:00", - "modified_at": "2013-01-30T18:44:00-08:00", - "trashed_at": "2013-02-07T10:49:34-08:00", - "purged_at": "2013-03-09T10:49:34-08:00", - "content_created_at": "2013-01-30T18:43:56-08:00", - "content_modified_at": "2013-01-30T18:44:00-08:00", - "created_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "modified_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "owned_by": { - "type": "user", - "id": "181757341", - "name": "sean test", - "login": "sean+test@box.com" - }, - "shared_link": { - "url": null, - "download_url": null, - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "trashed" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - delete: - description: | - Permanently deletes an item that is in the trash. The item will no longer - exist in Box. This action cannot be undone. - responses: - 204: - description: Item removed. - /comments: - type: base - get: - description: | - Retrieves the comments on a particular file, if any exist. A collection of - comment objects are returned. If there are no comments on the file, an empty - comments array is returned. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "comment", - "id": "191969", - "is_reply_comment": false, - "message": "These tigers are cool!", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T11:25:01-08:00", - "item": { - "id": "5000948880", - "type": "file" - }, - "modified_at": "2012-12-12T11:25:01-08:00" - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_reply_comment": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "item": { - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "file" - } - }, - "type": "object" - }, - "modified_at": { - "type": "timestamp" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - /tasks: - type: base - get: - description: | - Retrieves all of the tasks for given file. A collection of mini task objects - is returned. If there are no tasks, an empty collection will be returned. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "task", - "id": "1786931", - "item": { - "type": "file", - "id": "7026335894", - "sequence_id": "6", - "etag": "6", - "sha1": "81cc829fb8366fcfc108aa6c5a9bde01a6a10c16", - "name": "API - Persist On-Behalf-Of information.docx" - }, - "due_at": null - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "due_at": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } -/shared_items: - type: base - get: - description: | - Used to retrieve the metadata about a shared item when only given a shared - link. Because of varying permission levels for shared links, a password may - be required to retrieve the shared item. Once the item has been retrieved, - you can make API requests against the actual resource '/files/{id}' or - '/folders/{id}' as long as the shared link and optional password are in the - header. - A full file or folder object is returned if the shared link is valid and the - user has access to it. An error may be returned if the link is invalid, if a - password is required, or if the user does not have access to the file. - queryParameters: - BoxApi: - required: true - enum: - - 0 - - 1 - - true - - false - - t - - f - type: string - shared_link: - description: The shared link for this item - required: true - enum: - - 0 - - 1 - - true - - false - - t - - f - type: string - shared_link_password: - description: The password for this shared link - type: string - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 1, - "entries": [ - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg" - } - ], - "offset": 0, - "limit": 100 - } - } -/comments: - type: base - post: - description: | - Used to add a comment by the user to a specific file or comment (i.e. as a - reply comment). - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "item": { - "description": "The item that this comment will be placed on.", - "type": "object" - }, - "type": { - "description": "The type of the item that this comment will be placed on.", - "type": [ "file", "comment" ] - }, - "id": { - "description": "The id of the item that this comment will be placed on.", - "type": "string" - }, - "message": { - "description": "The text body of the comment.", - "type": "string" - } - }, - "required": [ "item" ] - } - responses: - 200: - body: - example: | - { - "type": "comment", - "id": "191969", - "is_reply_comment": false, - "message": "These tigers are cool!", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T11:25:01-08:00", - "item": { - "id": "5000948880", - "type": "file" - }, - "modified_at": "2012-12-12T11:25:01-08:00" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "description": "For comments is 'comment'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this comment.", - "type": "string" - }, - "is_reply_comment": { - "description": "Whether or not this comment is a reply to another comment.", - "type": "boolean" - }, - "message": { - "description": "The comment text that the user typed.", - "type": "string" - }, - "tagged_message": { - "description": "The string representing the comment text with @mentions included.", - "required": false, - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "A mini user object representing the author of the comment.", - "type": "object" - }, - "dcreated_at": { - "description": "The time this comment was created.", - "type": "timestamp" - }, - "item": { - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "description": "The object this comment was placed on.", - "type": "object" - }, - "modified_at": { - "description": "The time this comment was last modified.", - "type": "timestamp" - } - }, - "required": false, - "type": "object" - } - /{commentId}: - type: base - uriParameters: - commentId: - description: Box'''s unique string identifying this comment. - put: - description: | - Used to update the message of the comment. The full updated comment object - is returned if the ID is valid and if the user has access to the comment. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "message": { - "description": "The desired text for the comment message.", - "type": "string" - } - }, - "required": [ "message" ] - } - responses: - 200: - body: - example: | - { - "type": "comment", - "id": "191969", - "is_reply_comment": false, - "message": "These tigers are cool!", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T11:25:01-08:00", - "item": { - "id": "5000948880", - "type": "file" - }, - "modified_at": "2012-12-12T11:25:01-08:00" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "description": "For comments is 'comment'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this comment.", - "type": "string" - }, - "is_reply_comment": { - "description": "Whether or not this comment is a reply to another comment.", - "type": "boolean" - }, - "message": { - "description": "The comment text that the user typed.", - "type": "string" - }, - "tagged_message": { - "description": "The string representing the comment text with @mentions included.", - "required": false, - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "A mini user object representing the author of the comment.", - "type": "object" - }, - "dcreated_at": { - "description": "The time this comment was created.", - "type": "timestamp" - }, - "item": { - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "description": "The object this comment was placed on.", - "type": "object" - }, - "modified_at": { - "description": "The time this comment was last modified.", - "type": "timestamp" - } - }, - "required": false, - "type": "object" - } - get: - description: | - Used to retrieve the message and metadata about a specific comment. - Information about the user who created the comment is also included. - responses: - 200: - body: - example: | - { - "type": "comment", - "id": "191969", - "is_reply_comment": false, - "message": "These tigers are cool!", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T11:25:01-08:00", - "item": { - "id": "5000948880", - "type": "file" - }, - "modified_at": "2012-12-12T11:25:01-08:00" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "description": "For comments is 'comment'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this comment.", - "type": "string" - }, - "is_reply_comment": { - "description": "Whether or not this comment is a reply to another comment.", - "type": "boolean" - }, - "message": { - "description": "The comment text that the user typed.", - "type": "string" - }, - "tagged_message": { - "description": "The string representing the comment text with @mentions included.", - "required": false, - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "A mini user object representing the author of the comment.", - "type": "object" - }, - "dcreated_at": { - "description": "The time this comment was created.", - "type": "timestamp" - }, - "item": { - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "description": "The object this comment was placed on.", - "type": "object" - }, - "modified_at": { - "description": "The time this comment was last modified.", - "type": "timestamp" - } - }, - "required": false, - "type": "object" - } - delete: - description: | - Permanently deletes a comment. An empty 200 response is returned to confirm - deletion of the comment. Errors can be thrown if the ID is invalid or if the - user is not authorized to delete this particular comment. - responses: - 200: - description: Confirm deletion of the comment. -/collaborations: - type: base - post: - description: | - Used to add a collaboration for a single user to a folder. Either an email - address or a user ID can be used to create the collaboration. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "item": { - "description": "The item to add the collaboration on.", - "type": "object" - }, - "id": { - "description": "The ID of the item to add the collaboration on.", - "type": "string" - }, - "type": { - "description": "Must be 'folder'.", - "type": "string" - }, - "accessible_by": { - "description": "The user who this collaboration applies to.", - "type": "object" - }, - "role": { - "description": "The access level of this collaboration.", - "type": ["editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ] - }, - "id": { - "description": "The ID of this user.", - "type": "string" - }, - "login": { - "description": "An email address (does not need to be a Box user).", - "type": "string" - } - }, - "required": [ "description", "id", "type", "accessible_by", "role" ] - } - responses: - 200: - body: - example: | - { - "type": "collaboration", - "id": "791293", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T10:54:37-08:00", - "modified_at": "2012-12-12T11:30:43-08:00", - "expires_at": null, - "status": "accepted", - "accessible_by": { - "type": "user", - "id": "18203124", - "name": "sean", - "login": "sean+test@box.com" - }, - "role": "editor", - "acknowledged_at": "2012-12-12T11:30:43-08:00", - "item": { - "type": "folder", - "id": "11446500", - "sequence_id": "0", - "etag": "0", - "name": "Shared Pictures" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For collaborations is 'collaboration'", - "type": "string" - }, - "id": { - "description": "A unique string identifying this collaboration.", - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this collaboration.", - "type": "object" - }, - "created_at": { - "description": "The time this collaboration was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this collaboration was last modified.", - "type": "timestamp" - }, - "expires_at": { - "description": "The time this collaboration will expire.", - "type": "timestamp" - }, - "status": { - "description": "The status of this collab.", - "enum": [ "accepted", "pending", "rejected" ] - }, - "accecible_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who the collaboration applies to.", - "type": "object" - }, - "role": { - "description": "The level of access this user has.", - "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ] - }, - "acknowledged_at": { - "description": "When the 'status' of this collab was changed.", - "type": "timestamp" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this collaboration is related to", - "type": "object" - } - } - } - /{collabId}: - type: base - uriParameters: - collabId: - description: Box'''s unique string identifying this collaboration. - type: string - put: - description: | - Used to edit an existing collaboration. The updated collaboration object - is returned. Errors may occur if the IDs are invalid or if the user does - not have permissions to edit the collaboration. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "role": { - "description": "The access level of this collaboration", - "enum": ["editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ] - }, - "status": { - "description": "Whether this collaboration has been accepted.", - "enum": ["accepted", "pending", "rejected" ] - } - - } - } - responses: - 200: - body: - example: | - { - "type": "collaboration", - "id": "791293", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T10:54:37-08:00", - "modified_at": "2012-12-12T11:30:43-08:00", - "expires_at": null, - "status": "accepted", - "accessible_by": { - "type": "user", - "id": "18203124", - "name": "sean", - "login": "sean+test@box.com" - }, - "role": "viewer", - "acknowledged_at": "2012-12-12T11:30:43-08:00", - "item": { - "type": "folder", - "id": "11446500", - "sequence_id": "0", - "etag": "0", - "name": "Shared Pictures" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For collaborations is 'collaboration'", - "type": "string" - }, - "id": { - "description": "A unique string identifying this collaboration.", - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this collaboration.", - "type": "object" - }, - "created_at": { - "description": "The time this collaboration was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this collaboration was last modified.", - "type": "timestamp" - }, - "expires_at": { - "description": "The time this collaboration will expire.", - "type": "timestamp" - }, - "status": { - "description": "The status of this collab.", - "enum": [ "accepted", "pending", "rejected" ] - }, - "accecible_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who the collaboration applies to.", - "type": "object" - }, - "role": { - "description": "The level of access this user has.", - "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ] - }, - "acknowledged_at": { - "description": "When the 'status' of this collab was changed.", - "type": "timestamp" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this collaboration is related to", - "type": "object" - } - } - } - delete: - description: | - Used to delete a single collaboration. A blank 200 response is returned if - the ID is valid, and the user has permissions to remove the collaboration. - responses: - 200: - description: User removed. - get: - description: | - Used to get information about a single collaboration. All collaborations - for a single folder can be retrieved through - 'GET /folders/{id}/collaborations'. - The collaboration object is returned. Errors may occur if the IDs are - invalid or if the user does not have permissions to see the collaboration. - queryParameters: - status: - description: Can only be 'pending'. - enum: [ "pending" ] - responses: - 200: - body: - example: | - { - "type": "collaboration", - "id": "791293", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T10:54:37-08:00", - "modified_at": "2012-12-12T11:30:43-08:00", - "expires_at": null, - "status": "accepted", - "accessible_by": { - "type": "user", - "id": "18203124", - "name": "sean", - "login": "sean+test@box.com" - }, - "role": "editor", - "acknowledged_at": "2012-12-12T11:30:43-08:00", - "item": { - "type": "folder", - "id": "11446500", - "sequence_id": "0", - "etag": "0", - "name": "Shared Pictures" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For collaborations is 'collaboration'", - "type": "string" - }, - "id": { - "description": "A unique string identifying this collaboration.", - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this collaboration.", - "type": "object" - }, - "created_at": { - "description": "The time this collaboration was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this collaboration was last modified.", - "type": "timestamp" - }, - "expires_at": { - "description": "The time this collaboration will expire.", - "type": "timestamp" - }, - "status": { - "description": "The status of this collab.", - "enum": [ "accepted", "pending", "rejected" ] - }, - "accecible_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who the collaboration applies to.", - "type": "object" - }, - "role": { - "description": "The level of access this user has.", - "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ] - }, - "acknowledged_at": { - "description": "When the 'status' of this collab was changed.", - "type": "timestamp" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this collaboration is related to", - "type": "object" - } - } - } -/search: - type: base - get: - description: | - Searching a User'''s Account. The search endpoint provides a simple way of - finding items that are accessible in a given user'''s Box account. - A collection of search results is returned. If there are no matching search - results, the entries array will be empty. - queryParameters: - query: - description: | - The string to search for; can be matched against item names, descriptions, - text content of a file, and other fields of the different item types. - required: true - enum: - - 0 - - 1 - - true - - false - - t - - f - type: string - limit: - description: Number of search results to return - type: integer - default: 30 - maximum: 200 - offset: - description: The search result at which to start the response. - type: integer - default: 0 - responses: - 200: - body: - example: | - { - "total_count": 4, - "entries": [ - { - "type": "file", - "id": "1874102965", - "sequence_id": "0", - "etag": "0", - "sha1": "63a112a4567fb556f5269735102a2f24f2cbea56", - "name": "football.jpg", - "description": "", - "size": 260271, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_at": "2012-03-22T18:25:07-07:00", - "modified_at": "2012-10-25T14:40:05-07:00", - "created_by": { - "type": "user", - "id": "175065494", - "name": "Andrew Luck", - "login": "aluck@colts.com" - }, - "modified_by": { - "type": "user", - "id": "175065494", - "name": "Andrew Luck", - "login": "aluck@colts.com" - }, - "owned_by": { - "type": "user", - "id": "175065494", - "name": "Andrew Luck", - "login": "aluck@colts.com" - }, - "shared_link": null, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active" - } - ], - "offset": 0, - "limit": 1 - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "description": "For files is 'file'", - "type": "string" - }, - "id": { - "description": "Box'''s unique string identifying this file.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this file.", - "type": "string" - }, - "sha1": { - "description": "The sha1 hash of this file.", - "type": "string" - }, - "name": { - "description": "The name of this file.", - "type": "string" - }, - "description": { - "description": "The description of this file.", - "type": "string" - }, - "size": { - "description": "Size of this file in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "The path of folders to this item, starting at the root.", - "type": "array" - }, - "created_at": { - "description": "When this file was created on Box'''s servers.", - "type": "timestamp" - }, - "modified_at": { - "description": "When this file was last updated on the Box servers.", - "type": "timestamp" - }, - "trashed_at": { - "description": "When this file was last moved to the trash.", - "type": "timestamp" - }, - "purged_at": { - "description": "When this file will be permanently deleted.", - "type": "timestamp" - }, - "content_created_at": { - "description": "When the content of this file was created.", - "type": "timestamp" - }, - "content_modified_at": { - "description": "When the content of this file was last modified.", - "type": "timestamp" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who first created file.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last updated this file.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this file.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link object for this file.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder this file is contained in.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "version_number": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "type": "string" - }, - "comment_count": { - "description": "The number of comments on a file", - "required": false, - "type": "integer" - } - }, - "type": "object" - } - ], - "type": "array" - } - } -/events: - type: base - get: - description: | - Use this to get events for a given user. A chunk of event objects is - returned for the user based on the parameters passed in. Parameters - indicating how many chunks are left as well as the next stream_position - are also returned. - queryParameters: - stream_position: - description: | - The location in the event stream at which you want to start receiving - events. Can specify special case `now` to get 0 events and the latest - stream position for initialization. A collection of events is returned. - type: string - default: 0 - stream_type: - description: Limits the type of events returned - enum: [ "all", "chages", "sync" ] - default: all - limit: - description: Limits the number of events returned - type: integer - default: 100 - responses: - 200: - body: - example: | - { - "chunk_size": 1, - "next_stream_position": 1348790499819, - "entries": [ - { - "type": "event", - "event_id": "f82c3ba03e41f7e8a7608363cc6c0390183c3f83", - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "created_at": "2012-12-12T10:53:43-08:00", - "recorded_at": "2012-12-12T10:53:48-08:00", - "event_type": "ITEM_CREATE", - "session_id": "70090280850c8d2a1933c1", - "source": { - "type": "folder", - "id": "11446498", - "sequence_id": "0", - "etag": "0", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T10:53:43-08:00", - "description": null, - "size": 0, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": null, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "synced": false - } - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "chunk_size": { - "type": "integer" - }, - "next_stream_position": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "event_id": { - "type": "string" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "recorded_at": { - "type": "timestamp" - }, - "event_type": { - "enum": [ - "ITEM_CREATE", - "ITEM_UPLOAD", - "COMMENT_CREATE", - "ITEM_DOWNLOAD", - "ITEM_PREVIEW", - "ITEM_MOVE", - "ITEM_COPY", - "TASK_ASSIGNMENT_CREATE", - "LOCK_CREATE", - "LOCK_DESTROY", - "ITEM_TRASH", - "ITEM_UNDELETE_VIA_TRASH", - "COLLAB_ADD_COLLABORATOR", - "COLLAB_INVITE_COLLABORATOR", - "ITEM_SYNC", - "ITEM_UNSYNC", - "ITEM_RENAME", - "ITEM_SHARED_CREATE", - "ITEM_SHARED_UNSHARE", - "ITEM_SHARED", - "TAG_ITEM_CREATE", - "ADD_LOGIN_ACTIVITY_DEVICE", - "REMOVE_LOGIN_ACTIVITY_DEVICE", - "CHANGE_ADMIN_ROLE" - ] - }, - "session_id": { - "type": "string" - }, - "source": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "created_at": { - "type": "timestamp" - }, - "modified_at": { - "type": "timestamp" - }, - "description": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "shared_link": { - "type": "string" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "item_status": { - "type": "string" - }, - "synced": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - options: - description: | - Long polling. To get real-time notification of activity in a Box account, - use the long poll feature of the /events API. To do so, first call the - /events API with an OPTIONS call to retrieve the long poll URL to use. Next, - make a GET request to the provided URL to begin listening for events. If an - event occurs within an account you are monitoring, you will receive a - response with the value new_change. It's important to note that this response - will not come with any other details, but should serve as a prompt to take - further action such as calling the /events endpoint with your last known - stream_position. After sending this response, the server will close the - connection and you will need to repeat the long poll process to begin - listening for events again. - If no events occur for a period of time after you make the GET request to - the long poll URL, you will receive a response with the value reconnect. When - you receive this response, you'll make another OPTIONS call to the /events - endpoint and repeat the long poll process. - responses: - 200: - body: - example: | - { - "chunk_size":1, - "entries":[ - { - "type":"realtime_server", - "url":"http:\/\/2.realtime.services.box.net\/subscribe?channel=cc807c9c4869ffb1c81a&stream_type=all", - "ttl":"10", - "max_retries":"10", - "retry_timeout":610 - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "chunk_size": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "ttl": { - "type": "string" - }, - "max_retries": { - "type": "string" - }, - "retry_timeout": { - "type": "integer" - } - }, - "type": "object" - } - ], - "type": "array" - } - } -/users: - type: base - get: - description: | - Get All Users in an Enterprise. Returns a list of all users for the - Enterprise along with their user_id, public_name, and login. - queryParameters: - filter_term: - description: | - A string used to filter the results to only users starting with the - filter_term in either the name or the login - type: string - limit: - description: The number of records to return. - type: integer - default: 100 - maximum: 1000 - offset: - description: The record at which to start - type: integer - default: 0 - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "user", - "id": "181216415", - "name": "sean rose", - "login": "sean+awesome@box.com", - "created_at": "2012-05-03T21:39:11-07:00", - "modified_at": "2012-08-23T14:57:48-07:00", - "role": "user", - "language": "en", - "space_amount": 5368709120, - "space_used": 52947, - "max_upload_size": 104857600, - "tracking_codes": [], - "see_managed_users": false, - "sync_enabled": true, - "status": "active", - "job_title": "", - "phone": "5555551374", - "address": "10 Cloud Way Los Altos CA", - "avatar_url": "https://api.box.com/api/avatar/large/181216415" - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "description": "For users is 'user'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this user.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "login": { - "description": "The email address this user uses to login.", - "type": "string" - }, - "created_at": { - "description": "The time this user was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this user was last modified.", - "type": "timestamp" - }, - "role": { - "description": "This user'''s enterprise role.", - "enum": [ "admin", "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in bytes.", - "type": "integer" - }, - "space_used": { - "description": "The amount of space in use by the user.", - "type": "integer" - }, - "max_upload_size": { - "description": "The maximum individual file size in bytes this user can have.", - "type": "integer" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync", - "type": "boolean" - }, - "status": { - "description": "Can be active or inactive.", - "enum": [ "active", "inactive" ] - }, - "job_title": { - "description": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "avatar_url": { - "description": "URL of this user'''s avatar image.", - "type": "string" - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - }, - "enterprise": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise", - "type": "object" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - post: - description: | - Used to provision a new user in an enterprise. This method only works - for enterprise admins. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "login": { - "description": "The email address this user uses to login.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "role": { - "description": "This user'''s enterprise role.", - "type": [ "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string", - "maxLength": 2 - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync.", - "type": "boolean" - }, - "job_title": { - "properties": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in bytes.", - "type": "number" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "status": { - "description": "Can be 'active' or 'inactive'", - "type": [ "active", "inactive" ] - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - } - }, - "required": [ "login", "name" ] - } - responses: - 201: - body: - example: | - { - "type": "user", - "id": "187273718", - "name": "Ned Stark", - "login": "eddard@box.com", - "created_at": "2012-11-15T16:34:28-08:00", - "modified_at": "2012-11-15T16:34:29-08:00", - "role": "user", - "language": "en", - "space_amount": 5368709120, - "space_used": 0, - "max_upload_size": 2147483648, - "tracking_codes": [], - "can_see_managed_users": true, - "is_sync_enabled": true, - "status": "active", - "job_title": "", - "phone": "555-555-5555", - "address": "555 Box Lane", - "avatar_url": "https://www.box.com/api/avatar/large/187273718", - "is_exempt_from_device_limits": false, - "is_exempt_from_login_verification": false - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For users is 'user'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this user.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "login": { - "description": "The email address this user uses to login.", - "type": "string" - }, - "created_at": { - "description": "The time this user was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this user was last modified.", - "type": "timestamp" - }, - "role": { - "description": "This user'''s enterprise role.", - "enum": [ "admin", "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in bytes.", - "type": "integer" - }, - "space_used": { - "description": "The amount of space in use by the user.", - "type": "integer" - }, - "max_upload_size": { - "description": "The maximum individual file size in bytes this user can have.", - "type": "integer" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync", - "type": "boolean" - }, - "status": { - "description": "Can be active or inactive.", - "enum": [ "actibe", "inactive" ] - }, - "job_title": { - "description": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "avatar_url": { - "description": "URL of this user'''s avatar image.", - "type": "string" - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - }, - "enterprise": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise", - "type": "object" - } - } - } - /me: - type: base - get: - description: | - Get the Current User'''s Information. Retrieves information about the user who - is currently logged in i.e. the user for whom this auth token was generated. - Returns a single complete user object. An error is returned if a valid auth - token is not included in the API request. - responses: - 200: - body: - example: | - { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com", - "created_at": "2012-03-26T15:43:07-07:00", - "modified_at": "2012-12-12T11:34:29-08:00", - "language": "en", - "space_amount": 5368709120, - "space_used": 2377016, - "max_upload_size": 262144000, - "status": "active", - "job_title": "Employee", - "phone": "5555555555", - "address": "555 Office Drive", - "avatar_url": "https://www.box.com/api/avatar/large/17738362" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For users is 'user'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this user.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "login": { - "description": "The email address this user uses to login.", - "type": "string" - }, - "created_at": { - "description": "The time this user was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this user was last modified.", - "type": "timestamp" - }, - "role": { - "description": "This user'''s enterprise role.", - "enum": [ "admin", "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in bytes.", - "type": "integer" - }, - "space_used": { - "description": "The amount of space in use by the user.", - "type": "integer" - }, - "max_upload_size": { - "description": "The maximum individual file size in bytes this user can have.", - "type": "integer" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync", - "type": "boolean" - }, - "status": { - "description": "Can be active or inactive.", - "enum": [ "actibe", "inactive" ] - }, - "job_title": { - "description": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "avatar_url": { - "description": "URL of this user'''s avatar image.", - "type": "string" - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - }, - "enterprise": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise", - "type": "object" - } - } - } - /{userId}: - type: base - uriParameters: - userId: - description: Box'''s unique string identifying this user. - type: string - put: - description: | - Update a User'''s Information. Used to edit the settings and information about - a user. This method only works for enterprise admins. To roll a user out of - the enterprise (and convert them to a standalone free user), update the - special 'enterprise' attribute to be 'null'. - Returns the a full user object for the updated user. Errors may be thrown when - the fields are invalid or this API call is made from a non-admin account. - queryParameters: - notify: - description: | - Whether the user should receive an email when they are rolled out of an - enterprise - type: string - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "enterprise": { - "description": "Setting this to 'null' will roll the user out of the enterprise and make them a free user.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "role": { - "description": "This user'''s enterprise role. Can be 'coadmin' or 'user'.", - "type": [ "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string", - "maxLength": 2 - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync.", - "type": "boolean" - }, - "job_title": { - "description": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in byte. A value of '-1' grants unlimited storage.", - "type": "number" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "status": { - "description": "Can be 'active' or 'inactive'.", - "type": [ "active", "inactive" ] - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - }, - "is_password_reset_required": { - "description": "Whether or not the user is required to reset password.", - "type": "boolean" - } - } - } - responses: - 200: - body: - example: | - { - "type": "user", - "id": "181216415", - "name": "sean", - "login": "sean+awesome@box.com", - "created_at": "2012-05-03T21:39:11-07:00", - "modified_at": "2012-12-06T18:17:16-08:00", - "role": "admin", - "language": "en", - "space_amount": 5368709120, - "space_used": 1237179286, - "max_upload_size": 2147483648, - "tracking_codes": [], - "can_see_managed_users": true, - "is_sync_enabled": true, - "status": "active", - "job_title": "", - "phone": "6509241374", - "address": "", - "avatar_url": "https://www.box.com/api/avatar/large/181216415", - "is_exempt_from_device_limits": false, - "is_exempt_from_login_verification": false - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For users is 'user'.", - "type": "string" - }, - "id": { - "description": "A unique string identifying this user.", - "type": "string" - }, - "name": { - "description": "The name of this user.", - "type": "string" - }, - "login": { - "description": "The email address this user uses to login.", - "type": "string" - }, - "created_at": { - "description": "The time this user was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time this user was last modified.", - "type": "timestamp" - }, - "role": { - "description": "This user'''s enterprise role.", - "enum": [ "admin", "coadmin", "user" ] - }, - "language": { - "description": "The language of this user. ISO 639-1 Language Code.", - "type": "string" - }, - "space_amount": { - "description": "The user'''s total available space amount in bytes.", - "type": "integer" - }, - "space_used": { - "description": "The amount of space in use by the user.", - "type": "integer" - }, - "max_upload_size": { - "description": "The maximum individual file size in bytes this user can have.", - "type": "integer" - }, - "tracking_codes": { - "description": "An array of key/value pairs set by the user'''s admin.", - "type": "array" - }, - "can_see_managed_users": { - "description": "Whether this user can see other enterprise users in its contact list.", - "type": "boolean" - }, - "is_sync_enabled": { - "description": "Whether or not this user can use Box Sync", - "type": "boolean" - }, - "status": { - "description": "Can be active or inactive.", - "enum": [ "actibe", "inactive" ] - }, - "job_title": { - "description": "The user'''s job title.", - "type": "string" - }, - "phone": { - "description": "The user'''s phone number.", - "type": "string" - }, - "address": { - "description": "The user'''s address.", - "type": "string" - }, - "avatar_url": { - "description": "URL of this user'''s avatar image.", - "type": "string" - }, - "is_exempt_from_device_limits": { - "description": "Whether to exempt this user from Enterprise device limits.", - "type": "boolean" - }, - "is_exempt_from_login_verification": { - "description": "Whether or not this user must use two-factor authentication.", - "type": "boolean" - }, - "enterprise": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise", - "type": "object" - } - } - } - delete: - description: | - Deletes a user in an enterprise account. An empty 200 response is sent to - confirm deletion of the user. If the user still has files in their account - and the ???force''' parameter is not sent, an error is returned. - queryParameters: - notify: - description: | - Determines if the destination user should receive email notification of - the transfer. - type: string - force: - description: | - Whether or not the user should be deleted even if this user still own files. - type: string - responses: - 200: - description: Confirm deletion of the user. - /folders/{folderId}: - type: base - uriParameters: - folderId: - type: string - put: - description: | - Move Folder into Another User'''s Folder. - Moves all of the content from within one user'''s folder into a new folder in - another user'''s account. You can move folders across users as long as the you - have administrative permissions. To move everything from the root folder, - use "0" which always represents the root folder of a Box account. - Returns the information for the newly created destination folder. An error - is thrown if you do not have the necessary permissions to move the folder. - Alert: folder_id: Currently only moving of the root folder (0) is supported. - queryParameters: - notify: - description: | - Determines if the destination user should receive email notification of - the transfer. - type: string - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "owned_by": { - "description": "The user who the folder will be transferred to.", - "type": "string" - }, - "id": { - "description": "The ID of the user who the folder will be transferred to.", - "type": "string" - } - }, - "required": [ "owned_by", "id" ] - } - responses: - 200: - body: - example: | - { - "type": "folder", - "id": "11446498", - "sequence_id": "1", - "etag": "1", - "name": "Pictures", - "created_at": "2012-12-12T10:53:43-08:00", - "modified_at": "2012-12-12T11:15:04-08:00", - "description": "Some pictures I took", - "size": 629644, - "path_collection": { - "total_count": 1, - "entries": [ - { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - } - ] - }, - "created_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "modified_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "owned_by": { - "type": "user", - "id": "17738362", - "name": "sean rose", - "login": "sean@box.com" - }, - "shared_link": { - "url": "https://www.box.com/s/vspke7y05sb214wjokpk", - "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk", - "vanity_url": null, - "is_password_enabled": false, - "unshared_at": null, - "download_count": 0, - "preview_count": 0, - "access": "open", - "permissions": { - "can_download": true, - "can_preview": true - } - }, - "folder_upload_email": { - "access": "open", - "email": "upload.Picture.k13sdz1@u.box.com" - }, - "parent": { - "type": "folder", - "id": "0", - "sequence_id": null, - "etag": null, - "name": "All Files" - }, - "item_status": "active", - "item_collection": { - "total_count": 1, - "entries": [ - { - "type": "file", - "id": "5000948880", - "sequence_id": "3", - "etag": "3", - "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc", - "name": "tigers.jpeg" - } - ], - "offset": 0, - "limit": 100 - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "description": "For folders is 'folder'.", - "type": "string" - }, - "id": { - "description": "The folder'''s ID.", - "type": "string" - }, - "sequence_id": { - "description": "A unique ID for use with the /events endpoint.", - "type": "string" - }, - "etag": { - "description": "A unique string identifying the version of this folder.", - "type": "string" - }, - "name": { - "description": "The name of the folder.", - "type": "string" - }, - "created_at": { - "description": "The time the folder was created.", - "type": "timestamp" - }, - "modified_at": { - "description": "The time the folder or its contents were last modified.", - "type": "timestamp" - }, - "description": { - "description": "The description of the folder.", - "type": "string" - }, - "size": { - "description": "The folder size in bytes.", - "type": "integer" - }, - "path_collection": { - "paths": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries.", - "type": "array" - }, - "type": "object" - }, - "description": "Array of paths.", - "type": "array" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who created this folder.", - "type": "object" - }, - "modified_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who last modified this folder.", - "type": "object" - }, - "owned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "description": "The user who owns this folder.", - "type": "object" - }, - "shared_link": { - "properties": { - "url": { - "type": "string" - }, - "download_url": { - "type": "string" - }, - "vanity_url": { - "type": "string" - }, - "is_password_enabled": { - "type": "boolean" - }, - "unshared_at": { - "type": "string" - }, - "download_count": { - "type": "integer" - }, - "preview_count": { - "type": "integer" - }, - "access": { - "type": "string" - }, - "permissions": { - "properties": { - "can_download": { - "type": "boolean" - }, - "can_preview": { - "type": "boolean" - } - } - } - }, - "description": "The shared link for this folder.", - "type": "object" - }, - "folder_upload_email": { - "properties": { - "access": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "description": "The upload email address for this folder.", - "type": "object" - }, - "parent": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "description": "The folder that contains this one.", - "type": "object" - }, - "item_status": { - "description": "Whether this item is deleted or not.", - "type": "string" - }, - "item_collection": { - "items": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "description": "Array of entries", - "type": "array" - }, - "type": "object" - }, - "description": "A collection of mini file and folder objects contained in this folder.", - "type": "array" - }, - "sync_state": { - "description": "Whether this folder will be synced by the Box sync clients or not.", - "required": false, - "enum": [ "synced", "not_synced", "partially_synced" ] - }, - "has_collaborations": { - "description": "Whether this folder has any collaborators.", - "required": false, - "type": "boolean" - } - }, - "type": "object" - } - /email_aliases: - type: base - get: - description: | - Get All Email Aliases for a User. - Retrieves all email aliases for this user. The collection of email aliases - does not include the primary login for the user; use GET /users/USER_ID to - retrieve the login email address. - If the user_id is valid a collection of email aliases will be returned. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "email_alias", - "id": "1234", - "is_confirmed": true, - "email": "dglover2@box.com" - }, - { - "type": "email_alias", - "id": "1235", - "is_confirmed": true, - "email": "dglover3@box.com" - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_confirmed": { - "type": "boolean" - }, - "email": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - post: - description: | - Add an Email Alias for a User. - Adds a new email alias to the given user'''s account. - Returns the newly created email_alias object. Errors will be thrown if the - user_id is not valid or the particular user'''s email alias cannot be modified. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "email": { - "description": "The email address to add to the account as an alias.", - "type": "string" - } - }, - "required": [ "email" ] - } - responses: - 201: - body: - example: | - { - "type":"email_alias", - "id":"1234", - "is_confirmed":true, - "email": "dglover2@box.com" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "is_confirmed": { - "type": "boolean" - }, - "email": { - "type": "string" - } - } - } - /{emailAliasId}: - type: base - delete: - description: | - Removes an email alias from a user. If the user has permission to remove - this email alias, an empty 204 No Content response will be returned to - confirm deletion. - responses: - 204: - description: Email alias removed. -/tasks: - type: base - post: - description: | - Create a Task. Used to create a single task for single user on a single file. - A new task object will be returned upon success. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "item": { - "description": "The item this task is for.", - "type": "object" - }, - "type": { - "description": "The type of the item this task is for (currently only 'file' is supported).", - "type": "string" - }, - "id": { - "description": "The ID of the item this task is for.", - "type": "string" - }, - "action": { - "description": "The action the task assignee will be prompted to do. Must be 'review'.", - "type": [ "review" ] - }, - "message": { - "description": "An optional message to include with the task.", - "type": "string" - }, - "due_at": { - "description": "The day at which this task is due.", - "type": "timestamp" - } - }, - "required": [ "item", "type", "id", "action" ] - } - responses: - 200: - body: - example: | - { - "type": "task", - "id": "1839355", - "item": { - "type": "file", - "id": "7287087200", - "sequence_id": "0", - "etag": "0", - "sha1": "0bbd79a105c504f99573e3799756debba4c760cd", - "name": "box-logo.png" - }, - "due_at": "2014-04-03T11:09:43-07:00", - "action": "review", - "message": "REVIEW PLZ K THX", - "task_assignment_collection": { - "total_count": 0, - "entries": [] - }, - "is_completed": false, - "created_by": { - "type": "user", - "id": "11993747", - "name": "??? sean ???", - "login": "sean@box.com" - }, - "created_at": "2013-04-03T11:12:54-07:00" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "descriptipon": "For tasks is 'task'.", - "type": "string" - }, - "id": { - "descriptipon": "The unique ID of this task.", - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "descriptipon": "The file associated with this task.", - "type": "object" - }, - "due_at": { - "descriptipon": "The date at which this task is due.", - "type": "timestamp" - }, - "action": { - "descriptipon": "The action the task assignee will be prompted to do. Must be 'review'", - "type": "string" - }, - "message": { - "descriptipon": "A message that will be included with this task.", - "type": "string" - }, - "task_assignment_collection": { - "tasks": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "type": "array" - }, - "is_completed": { - "type": "boolean" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - } - } - } - /{taskId}: - type: base - get: - description: Fetches a specific task. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "task_assignment", - "id": "2485961", - "item": { - "type": "file", - "id": "7287087200", - "sequence_id": "0", - "etag": "0", - "sha1": "0bbd79a105c504f99573e3799756debba4c760cd", - "name": "box-logo.png" - }, - "assigned_to": { - "type": "user", - "id": "193425559", - "name": "Rhaegar Targaryen", - "login": "rhaegar@box.com" - } - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "descriptipon": "For tasks is 'task'.", - "type": "string" - }, - "id": { - "descriptipon": "The unique ID of this task.", - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "descriptipon": "The file associated with this task.", - "type": "object" - }, - "due_at": { - "descriptipon": "The date at which this task is due.", - "type": "timestamp" - }, - "action": { - "descriptipon": "The action the task assignee will be prompted to do. Must be 'review'", - "type": "string" - }, - "message": { - "descriptipon": "A message that will be included with this task.", - "type": "string" - }, - "task_assignment_collection": { - "tasks": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "type": "array" - }, - "is_completed": { - "type": "boolean" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - } - } - } - put: - description: Updates a specific task. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "action": { - "description": "The action the task assignee will be prompted to do. Can be 'review'.", - "type": "string" - }, - "message": { - "description": "An optional message to include with the task.", - "type": "string" - }, - "due_at": { - "description": "The day at which this task is due.", - "type": "timestamp" - } - } - } - responses: - 200: - body: - example: | - { - "type": "task", - "id": "1839355", - "item": { - "type": "file", - "id": "7287087200", - "sequence_id": "0", - "etag": "0", - "sha1": "0bbd79a105c504f99573e3799756debba4c760cd", - "name": "box-logo.png" - }, - "due_at": "2014-04-03T11:09:43-07:00", - "action": "review", - "message": "REVIEW PLZ K THX", - "task_assignment_collection": { - "total_count": 0, - "entries": [] - }, - "is_completed": false, - "created_by": { - "type": "user", - "id": "11993747", - "name": "??? sean ???", - "login": "sean@box.com" - }, - "created_at": "2013-04-03T11:12:54-07:00" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "descriptipon": "For tasks is 'task'.", - "type": "string" - }, - "id": { - "descriptipon": "The unique ID of this task.", - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "descriptipon": "The file associated with this task.", - "type": "object" - }, - "due_at": { - "descriptipon": "The date at which this task is due.", - "type": "timestamp" - }, - "action": { - "descriptipon": "The action the task assignee will be prompted to do. Must be 'review'", - "type": "string" - }, - "message": { - "descriptipon": "A message that will be included with this task.", - "type": "string" - }, - "task_assignment_collection": { - "tasks": { - "properties": { - "total_count": { - "type": "integer" - }, - "entries": [ - { - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "type": "array" - }, - "is_completed": { - "type": "boolean" - }, - "created_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - } - } - } - delete: - description: | - Permanently deletes a specific task. An empty 204 response will be - returned upon success. - responses: - 204: - description: Task deleted. - /assignments: - type: base - get: - description: | - Retrieves all of the assignments for a given task. - A collection of task assignment mini objects will be returned upon success. - responses: - 200: - body: - example: | - { - "total_count": 1, - "entries": [ - { - "type": "task_assignment", - "id": "2485961", - "item": { - "type": "file", - "id": "7287087200", - "sequence_id": "0", - "etag": "0", - "sha1": "0bbd79a105c504f99573e3799756debba4c760cd", - "name": "box-logo.png" - }, - "assigned_to": { - "type": "user", - "id": "193425559", - "name": "Rhaegar Targaryen", - "login": "rhaegar@box.com" - } - } - ] - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "string" - }, - "entries": [ - { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "assigned_to": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ], - "type": "array" - } - } -/task_assignments: - type: base - post: - description: | - Used to assign a task to a single user. There can be multiple assignments - on a given task. - A new task assignment object will be returned upon success. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "task": { - "description": "The task this assignment is for.", - "type": "object" - }, - "type": { - "description": "Must be 'task'", - "type": [ "task" ] - }, - "id": { - "description": "The ID of the task this assignment is for.", - "type": "string" - }, - "assign_to": { - "description": "The user this assignment is for. At least one of 'id' or 'login' is required in this object.", - "type": "object" - }, - "id": { - "description": "The ID of the user this assignment is for.", - "type": "string" - }, - "login": { - "description": "The login email address for the user this assignment is for.", - "type": "string" - } - }, - "required": [ "task", "id", "assign_to" ] - } - responses: - 200: - body: - example: | - { - "type": "task_assignment", - "id": "2698512", - "item": { - "type": "file", - "id": "8018809384", - "sequence_id": "0", - "etag": "0", - "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96", - "name": "scrumworksToTrello.js" - }, - "assigned_to": { - "type": "user", - "id": "1992432", - "name": "rhaegar@box.com", - "login": "rhaegar@box.com" - }, - "message": null, - "completed_at": null, - "assigned_at": "2013-05-10T11:43:41-07:00", - "reminded_at": null, - "resolution_state": "incomplete", - "assigned_by": { - "type": "user", - "id": "11993747", - "name": "??? sean ???", - "login": "sean@box.com" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "assigned_to": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "completed_at": { - "type": "timestamp" - }, - "assigned_at": { - "type": "timestamp" - }, - "reminded_at": { - "type": "string" - }, - "resolution_state": { - "type": "string" - }, - "assigned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - } - } - /{id}: - type: base - get: - description: | - Fetches a specific task assignment. - The specified task assignment object will be returned upon success. - responses: - 200: - body: - example: | - { - "type": "task_assignment", - "id": "2698512", - "item": { - "type": "file", - "id": "8018809384", - "sequence_id": "0", - "etag": "0", - "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96", - "name": "scrumworksToTrello.js" - }, - "assigned_to": { - "type": "user", - "id": "1992432", - "name": "rhaegar@box.com", - "login": "rhaegar@box.com" - }, - "message": null, - "completed_at": null, - "assigned_at": "2013-05-10T11:43:41-07:00", - "reminded_at": null, - "resolution_state": "incomplete", - "assigned_by": { - "type": "user", - "id": "11993747", - "name": "??? sean ???", - "login": "sean@box.com" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "assigned_to": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "completed_at": { - "type": "timestamp" - }, - "assigned_at": { - "type": "timestamp" - }, - "reminded_at": { - "type": "string" - }, - "resolution_state": { - "type": "string" - }, - "assigned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - } - } - delete: - description: | - Deletes a specific task assignment. - An empty '204 No Content' response will be returned upon success. - responses: - 204: - description: Task deleted. - put: - description: | - Used to update a task assignment. - A new task assignment object will be returned upon success. - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "message": { - "description": "A message from the assignee about this task.", - "type": "string" - }, - "resolution_state": { - "description": "Can be 'completed', 'incomplete', 'approved', or 'rejected'.", - "type": [ - "completed", - "incomplete", - "approved", - "rejected" - ] - } - } - } - responses: - 200: - body: - example: | - { - "type": "task_assignment", - "id": "2698512", - "item": { - "type": "file", - "id": "8018809384", - "sequence_id": "0", - "etag": "0", - "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96", - "name": "scrumworksToTrello.js" - }, - "assigned_to": { - "type": "user", - "id": "1992432", - "name": "rhaegar@box.com", - "login": "rhaegar@box.com" - }, - "message": "hello!!!", - "completed_at": null, - "assigned_at": "2013-05-10T11:43:41-07:00", - "reminded_at": null, - "resolution_state": "incomplete", - "assigned_by": { - "type": "user", - "id": "11993747", - "name": "??? sean ???", - "login": "sean@box.com" - } - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object" , - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "item": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "sequence_id": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "sha1": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "assigned_to": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "completed_at": { - "type": "timestamp" - }, - "assigned_at": { - "type": "timestamp" - }, - "reminded_at": { - "type": "string" - }, - "resolution_state": { - "type": "string" - }, - "assigned_by": { - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - } - } diff --git a/dist/examples/discriminator.raml b/dist/examples/discriminator.raml deleted file mode 100644 index d6a48b1bc..000000000 --- a/dist/examples/discriminator.raml +++ /dev/null @@ -1,33 +0,0 @@ -#%RAML 1.0 -title: My API With Types -baseUri: http://google.com -types: - Person: - type: object - discriminator: kind # refers to the `kind` property of object `Person` - properties: - kind: string # contains name of the kind of a `Person` instance - name: string - Employee: # kind may equal to `Employee; default value for `discriminatorValue` - type: Person - properties: - employeeId: string - User: # kind may equal to `User`; default value for `discriminatorValue` - type: Person - properties: - userId: string - -/testing: - get: - body: - application/json: - type: User - example: - userId: usser123 - name: nicolas - kind: juan -/resourceEmployee: - get: - body: - application/json: - type: Employee diff --git a/dist/examples/documentation.raml b/dist/examples/documentation.raml deleted file mode 100644 index 9db7c63a6..000000000 --- a/dist/examples/documentation.raml +++ /dev/null @@ -1,19 +0,0 @@ -#%RAML 1.0 -title: ZEncoder API -baseUri: https://app.zencoder.com/api -documentation: - - title: Home - content: | - Welcome to the _Zencoder API_ Documentation. The _Zencoder API_ - allows you to connect your application to our encoding service - and encode videos without going through the web interface. You - may also benefit from one of our - [integration libraries](https://app.zencoder.com/docs/faq/basics/libraries) - for different languages. - - title: Legal - content: | - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text - ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived - not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the - 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like - Aldus PageMaker including versions of Lorem Ipsum. diff --git a/dist/examples/example.json b/dist/examples/example.json deleted file mode 100644 index ab28add36..000000000 --- a/dist/examples/example.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"jane"} diff --git a/dist/examples/example.raml b/dist/examples/example.raml deleted file mode 100644 index b370ec45a..000000000 --- a/dist/examples/example.raml +++ /dev/null @@ -1,13 +0,0 @@ -#%RAML 1.0 ---- -title: Leagues API -version: v1 -baseUri: http://localhost/api -/user: - displayName: User - get: - responses: - 200: - body: - application/json: - example: !include example.json diff --git a/dist/examples/examples.raml b/dist/examples/examples.raml deleted file mode 100644 index e973374cd..000000000 --- a/dist/examples/examples.raml +++ /dev/null @@ -1,30 +0,0 @@ -#%RAML 1.0 -title: API with Library -version: 1 - -types: - Player: - type: object - properties: - firstName: string - lastName: string - age: integer - -/test: - get: - responses: - 200: - body: - application/xml: - type: Player - examples: - football: - value: - firstName: Juan - lastName: Perez - age: 31 - tennis: - value: - firstName: Pepe - lastName: Gomez - age: 24 diff --git a/dist/examples/extensions.raml b/dist/examples/extensions.raml deleted file mode 100644 index 870a8f611..000000000 --- a/dist/examples/extensions.raml +++ /dev/null @@ -1,4 +0,0 @@ -#%RAML 1.0 Extension -usage: The location of the public instance of the Piedmont library API -extends: mini-library.raml -baseUri: http://new diff --git a/dist/examples/facets.raml b/dist/examples/facets.raml deleted file mode 100644 index bafd98e08..000000000 --- a/dist/examples/facets.raml +++ /dev/null @@ -1,38 +0,0 @@ -#%RAML 1.0 -title: goasdad -types: - Email: - type: object - properties: - name: - type: string - Emails: - type: array - items: Email - minItems: 1 - uniqueItems: true - birthday: - type: date-only # no implications about time or offset - example: 2015-05-23 - lunchtime: - type: time-only # no implications about date or offset - example: 12:30:00 - fireworks: - type: datetime-only # no implications about offset - example: 2015-07-04T21:00:00 - created: - type: datetime - example: 2016-02-28T16:41:41.090Z - format: rfc3339 # the default, so no need to specify - If-Modified-Since: - type: datetime - example: Sun, 28 Feb 2016 16:41:41 GMT - format: rfc2616 # this time it's required, otherwise, the example format is invalid - -/resourceeeee: - get: - responses: - 200: - body: - application/json: - type: date-only diff --git a/dist/examples/github.raml b/dist/examples/github.raml deleted file mode 100644 index bf2d935bb..000000000 --- a/dist/examples/github.raml +++ /dev/null @@ -1,21655 +0,0 @@ -#%RAML 0.8 ---- -title: GitHub API -version: v3 -baseUri: https://api.github.com/ -securitySchemes: - - basic: - type: Basic Authentication - - oauth_2_0: - description: | - OAuth2 is a protocol that lets external apps request authorization to private - details in a user's GitHub account without getting their password. This is - preferred over Basic Authentication because tokens can be limited to specific - types of data, and can be revoked by users at any time. - type: OAuth 2.0 - describedBy: - headers: - Authorization: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "access_token" query string parameter. - type: string - queryParameters: - access_token: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "Authorization" header - type: string - responses: - 404: - description: Unauthorized - settings: - authorizationUri: https://github.com/login/oauth/authorize - accessTokenUri: https://github.com/login/oauth/access_token - authorizationGrants: [ code ] - scopes: - - "user" - - "user:email" - - "user:follow" - - "public_repo" - - "repo" - - "repo:status" - - "delete_repo" - - "notifications" - - "gist" -securedBy: [ null, oauth_2_0, basic ] -mediaType: application/json -resourceTypes: - - base: - get?: &common - headers: - X-GitHub-Media-Type: - description: | - You can check the current version of media type in responses. - type: string - Accept: - description: Is used to set specified media type. - type: string - X-RateLimit-Limit: - type: integer - X-RateLimit-Remaining: - type: integer - X-RateLimit-Reset: - type: integer - X-GitHub-Request-Id: - type: integer - responses: - 403: - description: | - API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting - for details. - post?: *common - patch?: *common - put?: *common - delete?: *common - - item: - type: base - get?: - post?: - patch?: - put?: - delete?: - responses: - 204: - description: Item removed. - - collection: - type: base - get?: - post?: -traits: - - historical: - queryParameters: - since: - description: | - Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. - Only gists updated at or after this time are returned. - type: string - - filterable: - queryParameters: - filter: - description: | - Issues assigned to you / created by you / mentioning you / you're - subscribed to updates for / All issues the authenticated user can see - enum: - - assigned - - created - - mentioned - - subscribed - - all - default: all - required: true - state: - enum: - - open - - closed - default: open - required: true - labels: - description: String list of comma separated Label names. Example - bug,ui,@high. - type: string - required: true - sort: - enum: - - created - - updated - - comments - default: created - required: true - direction: - enum: - - asc - - desc - default: desc - required: true - since: - description: | - Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. - Only issues updated at or after this time are returned. - type: string -# Search -/search: - /repositories: - type: collection - get: - is: [filterable] - description: Search repositories. - queryParameters: - q: - description: | - The search terms. This can be any combination of the supported repository - search parameters: - 'Search In' Qualifies which fields are searched. With this qualifier you - can restrict the search to just the repository name, description, readme, - or any combination of these. - 'Size' Finds repositories that match a certain size (in kilobytes). - 'Forks' Filters repositories based on the number of forks, and/or whether - forked repositories should be included in the results at all. - 'Created' and 'Last Updated' Filters repositories based on times of - creation, or when they were last updated. - 'Users or Repositories' Limits searches to a specific user or repository. - 'Languages' Searches repositories based on the language they're written in. - 'Stars' Searches repositories based on the number of stars. - type: string - required: true - sort: - description: If not provided, results are sorted by best match. - enum: - - stars - - forks - - updated - order: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "items": [ - { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "received_events_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "private": { - "type": "boolean" - }, - "html_url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "homepage": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "forks_count": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "forks": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "default_branch": { - "type": "string" - }, - "score": { - "type": "number" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "total_count": 40, - "items": [ - { - "id": 3081286, - "name": "Tetris", - "full_name": "dtrupenn/Tetris", - "owner": { - "login": "dtrupenn", - "id": 872147, - "avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", - "gravatar_id": "e7956084e75f239de85d3a31bc172ace", - "url": "https://api.github.com/users/dtrupenn", - "received_events_url": "https://api.github.com/users/dtrupenn/received_events", - "type": "User" - }, - "private": false, - "html_url": "https://github.com/dtrupenn/Tetris", - "description": "A C implementation of Tetris using Pennsim through LC4", - "fork": false, - "url": "https://api.github.com/repos/dtrupenn/Tetris", - "created_at": "2012-01-01T00:31:50Z", - "updated_at": "2013-01-05T17:58:47Z", - "pushed_at": "2012-01-01T00:37:02Z", - "homepage": "", - "size": 524, - "watchers_count": 1, - "language": "Assembly", - "forks_count": 0, - "open_issues_count": 0, - "forks": 0, - "open_issues": 0, - "watchers": 1, - "master_branch": "master", - "default_branch": "master", - "score": 10.309712 - } - ] - } - /code: - type: collection - get: - description: Search code. - queryParameters: - q: - description: | - The search terms. This can be any combination of the supported code - search parameters: - 'Search In' Qualifies which fields are searched. With this qualifier - you can restrict the search to just the file contents, the file path, - or both. - 'Languages' Searches code based on the language it's written in. - 'Forks' Filters repositories based on the number of forks, and/or - whether code from forked repositories should be included in the results - at all. - 'Size' Finds files that match a certain size (in bytes). - 'Path' Specifies the path that the resulting file must be at. - 'Extension' Matches files with a certain extension. - 'Users' or 'Repositories' Limits searches to a specific user or repository. - type: string - required: true - sort: - description: | - Can only be 'indexed', which indicates how recently a file has been indexed - by the GitHub search infrastructure. If not provided, results are sorted - by best match. - enum: - - indexed - order: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "items": [ - { - "properties": { - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "repository": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "followers_url": { - "type": "string" - }, - "following_url": { - "type": "string" - }, - "gists_url": { - "type": "string" - }, - "starred_url": { - "type": "string" - }, - "subscriptions_url": { - "type": "string" - }, - "organizations_url": { - "type": "string" - }, - "repos_url": { - "type": "string" - }, - "events_url": { - "type": "string" - }, - "received_events_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "private": { - "type": "boolean" - }, - "html_url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "forks_url": { - "type": "string" - }, - "keys_url": { - "type": "string" - }, - "collaborators_url": { - "type": "string" - }, - "teams_url": { - "type": "string" - }, - "hooks_url": { - "type": "string" - }, - "issue_events_url": { - "type": "string" - }, - "events_url": { - "type": "string" - }, - "assignees_url": { - "type": "string" - }, - "branches_url": { - "type": "string" - }, - "tags_url": { - "type": "string" - }, - "blobs_url": { - "type": "string" - }, - "git_tags_url": { - "type": "string" - }, - "git_refs_url": { - "type": "string" - }, - "trees_url": { - "type": "string" - }, - "statuses_url": { - "type": "string" - }, - "languages_url": { - "type": "string" - }, - "stargazers_url": { - "type": "string" - }, - "contributors_url": { - "type": "string" - }, - "subscribers_url": { - "type": "string" - }, - "subscription_url": { - "type": "string" - }, - "commits_url": { - "type": "string" - }, - "git_commits_url": { - "type": "string" - }, - "comments_url": { - "type": "string" - }, - "issue_comment_url": { - "type": "string" - }, - "contents_url": { - "type": "string" - }, - "compare_url": { - "type": "string" - }, - "merges_url": { - "type": "string" - }, - "archive_url": { - "type": "string" - }, - "downloads_url": { - "type": "string" - }, - "issues_url": { - "type": "string" - }, - "pulls_url": { - "type": "string" - }, - "milestones_url": { - "type": "string" - }, - "notifications_url": { - "type": "string" - }, - "labels_url": { - "type": "string" - } - }, - "type": "object" - }, - "score": { - "type": "number" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "total_count": 104, - "items": [ - { - "name": "github-issue-importer.gemspec", - "path": "github-issue-importer.gemspec", - "sha": "394508202991504d8a0771ae027454facaaa045a", - "url": "https://api.github.com/repositories/1586630/contents/github-issue-importer.gemspec?ref=aa22a4be513163c73531e96bd99f4b49d6ded8a6", - "git_url": "https://api.github.com/repositories/1586630/git/blobs/394508202991504d8a0771ae027454facaaa045a", - "html_url": "https://github.com/johnf/github-issue-importer/blob/aa22a4be513163c73531e96bd99f4b49d6ded8a6/github-issue-importer.gemspec", - "repository": { - "id": 1586630, - "name": "github-issue-importer", - "full_name": "johnf/github-issue-importer", - "owner": { - "login": "johnf", - "id": 42590, - "avatar_url": "https://secure.gravatar.com/avatar/ab4d879ba3233a270aa14f447c795505?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", - "gravatar_id": "ab4d879ba3233a270aa14f447c795505", - "url": "https://api.github.com/users/johnf", - "html_url": "https://github.com/johnf", - "followers_url": "https://api.github.com/users/johnf/followers", - "following_url": "https://api.github.com/users/johnf/following{/other_user}", - "gists_url": "https://api.github.com/users/johnf/gists{/gist_id}", - "starred_url": "https://api.github.com/users/johnf/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/johnf/subscriptions", - "organizations_url": "https://api.github.com/users/johnf/orgs", - "repos_url": "https://api.github.com/users/johnf/repos", - "events_url": "https://api.github.com/users/johnf/events{/privacy}", - "received_events_url": "https://api.github.com/users/johnf/received_events", - "type": "User" - }, - "private": false, - "html_url": "https://github.com/johnf/github-issue-importer", - "description": "Import Issues from Launchpad (for now) into github", - "fork": false, - "url": "https://api.github.com/repos/johnf/github-issue-importer", - "forks_url": "https://api.github.com/repos/johnf/github-issue-importer/forks", - "keys_url": "https://api.github.com/repos/johnf/github-issue-importer/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/johnf/github-issue-importer/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/johnf/github-issue-importer/teams", - "hooks_url": "https://api.github.com/repos/johnf/github-issue-importer/hooks", - "issue_events_url": "https://api.github.com/repos/johnf/github-issue-importer/issues/events{/number}", - "events_url": "https://api.github.com/repos/johnf/github-issue-importer/events", - "assignees_url": "https://api.github.com/repos/johnf/github-issue-importer/assignees{/user}", - "branches_url": "https://api.github.com/repos/johnf/github-issue-importer/branches{/branch}", - "tags_url": "https://api.github.com/repos/johnf/github-issue-importer/tags", - "blobs_url": "https://api.github.com/repos/johnf/github-issue-importer/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/johnf/github-issue-importer/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/johnf/github-issue-importer/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/johnf/github-issue-importer/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/johnf/github-issue-importer/statuses/{sha}", - "languages_url": "https://api.github.com/repos/johnf/github-issue-importer/languages", - "stargazers_url": "https://api.github.com/repos/johnf/github-issue-importer/stargazers", - "contributors_url": "https://api.github.com/repos/johnf/github-issue-importer/contributors", - "subscribers_url": "https://api.github.com/repos/johnf/github-issue-importer/subscribers", - "subscription_url": "https://api.github.com/repos/johnf/github-issue-importer/subscription", - "commits_url": "https://api.github.com/repos/johnf/github-issue-importer/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/johnf/github-issue-importer/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/johnf/github-issue-importer/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/johnf/github-issue-importer/issues/comments/{number}", - "contents_url": "https://api.github.com/repos/johnf/github-issue-importer/contents/{+path}", - "compare_url": "https://api.github.com/repos/johnf/github-issue-importer/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/johnf/github-issue-importer/merges", - "archive_url": "https://api.github.com/repos/johnf/github-issue-importer/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/johnf/github-issue-importer/downloads", - "issues_url": "https://api.github.com/repos/johnf/github-issue-importer/issues{/number}", - "pulls_url": "https://api.github.com/repos/johnf/github-issue-importer/pulls{/number}", - "milestones_url": "https://api.github.com/repos/johnf/github-issue-importer/milestones{/number}", - "notifications_url": "https://api.github.com/repos/johnf/github-issue-importer/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/johnf/github-issue-importer/labels{/name}" - }, - "score": 0.96691436 - } - ] - } - /users: - type: collection - get: - description: Search users. - queryParameters: - q: - description: | - The search terms. This can be any combination of the supported user - search parameters: - 'Search In' Qualifies which fields are searched. With this qualifier you - can restrict the search to just the username, public email, full name, - location, or any combination of these. - 'Repository count' Filters users based on the number of repositories they - have. - 'Location' Filter users by the location indicated in their profile. - 'Language' Search for users that have repositories that match a certain - language. - 'Created' Filter users based on when they joined. - 'Followers' Filter users based on the number of followers they have. - type: string - required: true - sort: - description: If not provided, results are sorted by best match. - enum: - - followers - - repositories - - joined - order: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "total_count": { - "type": "integer" - }, - "items": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "followers_url": { - "type": "string" - }, - "subscriptions_url": { - "type": "string" - }, - "organizations_url": { - "type": "string" - }, - "repos_url": { - "type": "string" - }, - "received_events_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "score": { - "type": "number" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "total_count": 12, - "items": [ - { - "login": "mojombo", - "id": 1, - "avatar_url": "https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png", - "gravatar_id": "25c7c18223fb42a4c6ae1c8db6f50f9b", - "url": "https://api.github.com/users/mojombo", - "html_url": "https://github.com/mojombo", - "followers_url": "https://api.github.com/users/mojombo/followers", - "subscriptions_url": "https://api.github.com/users/mojombo/subscriptions", - "organizations_url": "https://api.github.com/users/mojombo/orgs", - "repos_url": "https://api.github.com/users/mojombo/repos", - "received_events_url": "https://api.github.com/users/mojombo/received_events", - "type": "User", - "score": 105.47857 - } - ] - } -# Events -/events: - type: collection - is: [filterable] - get: - is: [filterable, historical] - description: List public events. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] -# Feeds -/feeds: - type: collection - get: - description: | - List Feeds. - GitHub provides several timeline resources in Atom format. The Feeds API - lists all the feeds available to the authenticating user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "timeline_url": { - "type": "string" - }, - "user_url": { - "type": "string" - }, - "current_user_public": { - "type": "string" - }, - "current_user_url": { - "type": "string" - }, - "current_user_actor_url": { - "type": "string" - }, - "current_user_organization_url": { - "type": "string" - }, - "_links": { - "properties": { - "timeline": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "user": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "current_user_public": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "current_user": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "current_user_actor": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "current_user_organization": { - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - } - } - } - } - } - example: | - { - "timeline_url": "https://github.com/timeline", - "user_url": "https://github.com/{user}", - "current_user_public": "https://github.com/defunkt", - "current_user_url": "https://github.com/defunkt.private?token=abc123", - "current_user_actor_url": "https://github.com/defunkt.private.actor?token=abc123", - "current_user_organization_url": "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123", - "_links": { - "timeline": { - "href": "https://github.com/timeline", - "type": "application/atom+xml" - }, - "user": { - "href": "https://github.com/{user}", - "type": "application/atom+xml" - }, - "current_user_public": { - "href": "https://github.com/defunkt", - "type": "application/atom+xml" - }, - "current_user": { - "href": "https://github.com/defunkt.private?token=abc123", - "type": "application/atom+xml" - }, - "current_user_actor": { - "href": "https://github.com/defunkt.private.actor?token=abc123", - "type": "application/atom+xml" - }, - "current_user_organization": { - "href": "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123", - "type": "application/atom+xml" - } - } - } -# Meta -/meta: - type: collection - get: - description: This gives some information about GitHub.com, the service. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "hooks": [ - { - "description": "An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from.", - "type": "string" - } - ], - "type": "array", - "git": [ - { - "description": "An Array of IP addresses in CIDR format specifying the Git servers at GitHub.", - "type": "string" - } - ] - } - } - example: | - { - "hooks": [ - "127.0.0.1/32" - ], - "git": [ - "127.0.0.1/32" - ] - } -# Rate limit -/rate_limit: - type: collection - get: - description: | - Get your current rate limit status - Note: Accessing this endpoint does not count against your rate limit. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "rate": { - "properties": { - "limit": { - "type": "integer" - }, - "remaining": { - "type": "integer" - }, - "reset": { - "type": "integer" - } - } - } - } - } - example: | - { - "rate": { - "limit": 5000, - "remaining": 4999, - "reset": 1372700873 - } - } -# Issues -/issues: - type: item - get: - is: [ filterable ] - description: | - List issues. - List all issues across all the authenticated user's visible repositories. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "issues": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - ] -# Other -/notifications: - type: collection - get: - description: | - List your notifications. - List all notifications for the current user, grouped by repository. - queryParameters: - all: - description: True to show notifications marked as read. - type: string - participating: - description: | - True to show only notifications in which the user is directly participating - or mentioned. - type: string - since: - description: | - Time filters out any notifications updated before the given time. The - time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. - Example: "2012-10-09T23:39:01Z". - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "id": { - "type": "integer" - }, - "repository": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "type": "object" - }, - "subject": { - "properties": { - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "latest_comment_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "reason": { - "type": "string" - }, - "unread": { - "type": "boolean" - }, - "updated_at": { - "type": "string" - }, - "last_read_at": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "repository": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World" - }, - "subject": { - "title": "Greetings", - "url": "https://api.github.com/repos/pengwynn/octokit/issues/123", - "latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123", - "type": "Issue" - }, - "reason": "subscribed", - "unread": true, - "updated_at": "2012-09-25T07:54:41-07:00", - "last_read_at": "2012-09-25T07:54:41-07:00", - "url": "https://api.github.com/notifications/threads/1" - } - ] - put: - description: | - Mark as read. - Marking a notification as "read" removes it from the default view on GitHub.com. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "last_read_at": { - "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now.", - "type": "string" - } - } - } - responses: - 205: - description: Marked as read. - /threads/{id}: - uriParameters: - id: - description: Id of a thread. - type: integer - type: item - get: - description: View a single thread. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "id": { - "type": "integer" - }, - "repository": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "type": "object" - }, - "subject": { - "properties": { - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "latest_comment_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "reason": { - "type": "string" - }, - "unread": { - "type": "boolean" - }, - "updated_at": { - "type": "string" - }, - "last_read_at": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "repository": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World" - }, - "subject": { - "title": "Greetings", - "url": "https://api.github.com/repos/pengwynn/octokit/issues/123", - "latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123", - "type": "Issue" - }, - "reason": "subscribed", - "unread": true, - "updated_at": "2012-09-25T07:54:41-07:00", - "last_read_at": "2012-09-25T07:54:41-07:00", - "url": "https://api.github.com/notifications/threads/1" - } - ] - patch: - responses: - 205: - description: Thread marked as read. - /subscription: - type: item - get: - description: Get a Thread Subscription. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed":{ - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "reason": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "url": { - "type": "string" - }, - "thread_url": { - "type": "string" - } - } - } - example: | - { - "subscribed": true, - "ignored": false, - "reason": null, - "created_at": "2012-10-06T21:34:12Z", - "url": "https://api.github.com/notifications/threads/1/subscription", - "thread_url": "https://api.github.com/notifications/threads/1" - } - put: - description: | - Set a Thread Subscription. - This lets you subscribe to a thread, or ignore it. Subscribing to a thread - is unnecessary if the user is already subscribed to the repository. Ignoring - a thread will mute all future notifications (until you comment or get @mentioned). - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed": { - "description": "Determines if notifications should be received from this thread.", - "type": "boolean" - }, - "ignored": { - "description": "Determines if all notifications should be blocked from this thread.", - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed":{ - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "reason": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "url": { - "type": "string" - }, - "thread_url": { - "type": "string" - } - } - } - example: | - { - "subscribed": true, - "ignored": false, - "reason": null, - "created_at": "2012-10-06T21:34:12Z", - "url": "https://api.github.com/notifications/threads/1/subscription", - "thread_url": "https://api.github.com/notifications/threads/1" - } - delete: - description: Delete a Thread Subscription. -/gists: - securedBy: [ null, oauth_2_0 ] - type: collection - get: - is: [ historical ] - description: | - List the authenticated user's gists or if called anonymously, this will - return all public gists. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "gists": [ - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "type": "string" - } - } - } - ] - } - example: | - [ - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z" - } - ] - post: - description: Create a gist. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "files": { - "description": "Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameter 'content'.", - "type": "string" - }, - "content": { - "description": "File contents.", - "type": "string" - } - }, - "required": [ "public", "files", "content" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "forks": [ - { - "properties": { - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "history": [ - { - "properties": { - "url": { - "type": "string" - }, - "version": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "change_status": { - "properties": { - "deletions": { - "type": "integer" - }, - "additions": { - "type": "integer" - }, - "total": { - "type": "integer" - } - }, - "type": "object" - }, - "committed_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "type": "object" - } - } - ] - } - } - example: | - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z", - "forks": [ - { - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "url": "https://api.github.com/gists/d39d0d37fb24f12e2045", - "created_at": "2011-04-14T16:00:49Z" - } - ], - "history": [ - { - "url": "https://api.github.com/gists/3a8bdc16d2e39d809469", - "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "change_status": { - "deletions": 0, - "additions": 180, - "total": 180 - }, - "committed_at": "2010-04-14T02:15:15Z" - } - ] - } - # Public - /public: - securedBy: [ null, oauth_2_0 ] - type: collection - get: - is: [ historical ] - description: List all public gists. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "gists": [ - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "type": "string" - } - } - } - ] - } - example: | - [ - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z" - } - ] - # Starred - /starred: - securedBy: [ null, oauth_2_0 ] - type: collection - get: - is: [ historical ] - description: List the authenticated user's starred gists. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "gists": [ - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "type": "string" - } - } - } - ] - } - example: | - [ - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z" - } - ] - # ID - /{id}: - uriParameters: - id: - description: Id of a thread. - type: integer - type: item - get: - description: Get a single gist. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "forks": [ - { - "properties": { - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "history": [ - { - "properties": { - "url": { - "type": "string" - }, - "version": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "change_status": { - "properties": { - "deletions": { - "type": "integer" - }, - "additions": { - "type": "integer" - }, - "total": { - "type": "integer" - } - }, - "type": "object" - }, - "committed_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "type": "object" - } - } - ] - } - } - example: | - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z", - "forks": [ - { - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "url": "https://api.github.com/gists/d39d0d37fb24f12e2045", - "created_at": "2011-04-14T16:00:49Z" - } - ], - "history": [ - { - "url": "https://api.github.com/gists/3a8bdc16d2e39d809469", - "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "change_status": { - "deletions": 0, - "additions": 180, - "total": 180 - }, - "committed_at": "2010-04-14T02:15:15Z" - } - ] - } - patch: - description: Edit a gist. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "files": { - "properties": { - "file1.txt": { - "properties": { - "content": { - "type": "string" - } - }, - "type": "object" - }, - "old_name.txt": { - "properties": { - "filename": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "type": "object" - }, - "new_file.txt": { - "properties": { - "content": { - "type": "string" - } - }, - "type": "object" - }, - "delete_this_file.txt": { - "type": "string" - } - } - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "forks": [ - { - "properties": { - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "created_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "history": [ - { - "properties": { - "url": { - "type": "string" - }, - "version": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "change_status": { - "properties": { - "deletions": { - "type": "integer" - }, - "additions": { - "type": "integer" - }, - "total": { - "type": "integer" - } - }, - "type": "object" - }, - "committed_at": { - "description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", - "type": "string" - }, - "type": "object" - } - } - ] - } - } - example: | - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z", - "forks": [ - { - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "url": "https://api.github.com/gists/d39d0d37fb24f12e2045", - "created_at": "2011-04-14T16:00:49Z" - } - ], - "history": [ - { - "url": "https://api.github.com/gists/3a8bdc16d2e39d809469", - "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "change_status": { - "deletions": 0, - "additions": 180, - "total": 180 - }, - "committed_at": "2010-04-14T02:15:15Z" - } - ] - } - delete: - description: Delete a gist. - # Star - /star: - type: base - put: - description: Star a gist. - responses: - 204: - description: Starred. - delete: - description: Unstar a gist. - responses: - 204: - description: Item removed. - get: - description: Check if a gist is starred. - responses: - 204: - description: Exists. - 404: - description: Not exists. - # Forks - /forks: - type: base - post: - description: Fork a gist. - responses: - 204: - description: Exists. - 404: - description: Not exists. - /comments: - type: collection - get: - description: List comments on a gist. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "comments": [ - { - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601.", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "url": "https://api.github.com/gists/ae709e9cf889e485e65f/comments/1", - "body": "Just commenting for the sake of commenting", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-18T23:23:56Z" - } - ] - post: - description: Create a comment - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ "body" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601.", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1", - "body": "Just commenting for the sake of commenting", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-18T23:23:56Z" - } - /{commentId}: - type: item - uriParameters: - commentId: - description: Id of the comment. - type: integer - get: - description: Get a single comment. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601.", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1", - "body": "Just commenting for the sake of commenting", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-18T23:23:56Z" - } - patch: - description: Edit a comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601.", - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601.", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1", - "body": "Just commenting for the sake of commenting", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-18T23:23:56Z" - } - delete: - description: Delete a comment. -/orgs/{orgId}: - uriParameters: - orgId: - description: Id of organisation. - type: integer - type: item - get: - description: Get an Organization. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "company": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "location": { - "type": "string" - }, - "email": { - "type": "string" - }, - "public_repos": { - "type": "integer" - }, - "public_gists": { - "type": "integer" - }, - "followers": { - "type": "integer" - }, - "following": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "type": { - "type": "string" - } - } - } - example: | - { - "login": "github", - "id": 1, - "url": "https://api.github.com/orgs/github", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "name": "github", - "company": "GitHub", - "blog": "https://github.com/blog", - "location": "San Francisco", - "email": "octocat@github.com", - "public_repos": 2, - "public_gists": 1, - "followers": 20, - "following": 0, - "html_url": "https://github.com/octocat", - "created_at": "2008-01-14T04:33:35Z", - "type": "Organization" - } - patch: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "billing_email": { - "description": "Billing email address. This address is not publicized.", - "type": "string" - }, - "company": { - "type": "string" - }, - "email": { - "description": "Publicly visible email address.", - "type": "string" - }, - "location": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "company": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "location": { - "type": "string" - }, - "email": { - "type": "string" - }, - "public_repos": { - "type": "integer" - }, - "public_gists": { - "type": "integer" - }, - "followers": { - "type": "integer" - }, - "following": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "type": { - "type": "string" - } - } - } - example: | - { - "login": "github", - "id": 1, - "url": "https://api.github.com/orgs/github", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "name": "github", - "company": "GitHub", - "blog": "https://github.com/blog", - "location": "San Francisco", - "email": "octocat@github.com", - "public_repos": 2, - "public_gists": 1, - "followers": 20, - "following": 0, - "html_url": "https://github.com/octocat", - "created_at": "2008-01-14T04:33:35Z", - "type": "Organization" - } - description: Edit an Organization. - # Events - /events: - type: collection - get: - description: List public events for an organization. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - # Issues - /issues: - type: collection - get: - is: [ filterable ] - description: | - List issues. - List all issues for a given organization for the authenticated user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "issues": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - ] - /members: - type: collection - get: - description: | - Members list. - List all users who are members of an organization. A member is a user that - belongs to at least 1 team in the organization. If the authenticated user - is also an owner of this organization then both concealed and public members - will be returned. If the requester is not an owner of the organization the - query will be redirected to the public members list. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - 302: - description: Response if requester is not an organization member. - /{userId}: - type: item - uriParameters: - userId: - description: Id of the user. - type: integer - delete: - description: | - Remove a member. - Removing a user from this list will remove them from all teams and they - will no longer have any access to the organization's repositories. - /public_members: - type: collection - get: - description: | - Public members list. - Members of an organization can choose to have their membership publicized - or not. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{userId}: - uriParameters: - userId: - description: Id of the user. - type: integer - type: base - get: - description: Check public membership. - responses: - 204: - description: User is a public member. - 404: - description: User is not a public member. - put: - description: Publicize a user's membership. - responses: - 204: - description: Publicized. - delete: - description: Conceal a user's membership. - responses: - 204: - description: Concealed. - /teams: - type: collection - get: - description: List teams. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/teams/1", - "name": "Owners", - "id": 1 - } - ] - post: - description: | - Create team. - In order to create a team, the authenticated user must be an owner of orgId. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "repo_names": [ - { - "type": "string" - } - ], - "type": "array", - "permission": { - "enum": [ - "pull", - "push", - "admin" - ] - } - }, - "required": [ - "name" - ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "permission": { - "type": "string" - }, - "members_count": { - "type": "integer" - }, - "repos_count": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/teams/1", - "name": "Owners", - "id": 1 - } - ] - /repos: - type: collection - get: - description: List repositories for the specified org. - queryParameters: - type: - enum: - - all - - public - - private - - forks - - sources - - member - default: all - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - post: - description: | - Create a new repository for the authenticated user. OAuth users must supply - repo scope. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "private": { - "description": "True to create a private repository, false to create a public one. Creating private repositories requires a paid GitHub account.", - "type": "boolean" - }, - "has_issues": { - "description": "True to enable issues for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "has_wiki": { - "description": "True to enable the wiki for this repository, false to disable it. Default is true.", - "type": "boolean" - }, - "has_downloads": { - "description": "True to enable downloads for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "team_id": { - "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization.", - "type": "integer" - }, - "auto_init": { - "description": "True to create an initial commit with empty README. Default is false.", - "type": "boolean" - }, - "gitignore_template": { - "description": "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\" Ignored if auto_init parameter is not provided. ", - "type": "string" - } - }, - "required": [ "name" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] -/teams/{teamsId}: - uriParameters: - teamsId: - description: Id of a team. - type: integer - type: item - get: - description: Get team. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "permission": { - "type": "string" - }, - "members_count": { - "type": "integer" - }, - "repos_count": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/teams/1", - "name": "Owners", - "id": 1 - } - ] - patch: - description: | - Edit team. - In order to edit a team, the authenticated user must be an owner of the org - that the team is associated with. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "permission": { - "values": [ - "pull", - "push", - "admin" - ] - } - }, - "required": [ "name" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "permission": { - "type": "string" - }, - "members_count": { - "type": "integer" - }, - "repos_count": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/teams/1", - "name": "Owners", - "id": 1 - } - ] - delete: - description: | - Delete team. - In order to delete a team, the authenticated user must be an owner of the - org that the team is associated with. - /members: - type: collection - get: - description: | - List team members. - In order to list members in a team, the authenticated user must be a member - of the team. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{userId}: - uriParameters: - userId: - description: Id of a member. - type: integer - type: base - get: - description: | - Get team member. - In order to get if a user is a member of a team, the authenticated user must - be a member of the team. - responses: - 204: - description: User is a member. - 404: - description: User is not a member. - put: - description: | - Add team member. - In order to add a user to a team, the authenticated user must have 'admin' - permissions to the team or be an owner of the org that the team is associated - with. - responses: - 204: - description: Team member added. - 422: - description: If you attempt to add an organization to a team, you will get this. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "errors": [ - { - "properties": { - "code": { - "type": "string" - }, - "field": { - "type": "string" - }, - "resource": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "object" - } - } - example: | - { - "message": "Validation Failed", - "errors": [ - { - "code": "org", - "field": "user", - "resource": "TeamMember" - } - ] - } - delete: - description: | - Remove team member. - In order to remove a user from a team, the authenticated user must have 'admin' - permissions to the team or be an owner of the org that the team is associated - with. - NOTE This does not delete the user, it just remove them from the team. - responses: - 204: - description: Team member removed. -/repositories: - type: collection - get: - securedBy: [ null, oauth_2_0 ] - description: | - List all public repositories. - This provides a dump of every public repository, in the order that they - were created. - Note: Pagination is powered exclusively by the since parameter. is the - Link header to get the URL for the next page of repositories. - queryParameters: - since: - description: | - The integer ID of the last Repository that you've seen. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World" - } - ] -/repos/{ownerId}/{repoId}: - uriParameters: - ownerId: - description: Id of the owner. - type: integer - repoId: - description: Id of repository. - type: integer - type: item - get: - description: Get repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "organization": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "parent": { - "description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "source": { - "description": "Is present when the repo is a fork. Source is the ultimate source for the network.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "has_issues": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "has_downloads": { - "type": "boolean" - } - } - } - example: | - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z", - "organization": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "type": "Organization" - }, - "parent": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "source": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "has_issues": true, - "has_wiki": true, - "has_downloads": true - } - patch: - description: Edit repository. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "private": { - "description": "True makes the repository private, and false makes it public.", - "type": "boolean" - }, - "has_issues": { - "description": "True to enable issues for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "has_wiki": { - "description": "True to enable the wiki for this repository, false to disable it. Default is true.", - "type": "boolean" - }, - "has_downloads": { - "description": "True to enable downloads for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "default_branch": { - "description": "Update the default branch for this repository.", - "type": "string" - } - }, - "required": [ "name" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "organization": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "parent": { - "description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "source": { - "description": "Is present when the repo is a fork. Source is the ultimate source for the network.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "has_issues": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "has_downloads": { - "type": "boolean" - } - } - } - example: | - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z", - "organization": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "type": "Organization" - }, - "parent": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "source": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "has_issues": true, - "has_wiki": true, - "has_downloads": true - } - delete: - description: | - Delete a Repository. - Deleting a repository requires admin access. If OAuth is used, the delete_repo - scope is required. - # Events - /events: - type: collection - get: - description: Get list of repository events. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - # Languages - /languages: - type: collection - get: - description: | - List languages. - List languages for the specified repository. The value on the right of a - language is the number of bytes of code written in that language. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "count": { - "type": "string" - } - } - } - example: | - { - "C": 78769, - "Python": 7769 - } - # GIT - /git: - /blobs: - type: collection - post: - description: Create a Blob. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "encoding": { - "enum": [ - "utf-8", - "base64" - ] - }, - "sha": { - "type": "string" - }, - "size": { - "type": "integer" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - } - } - } - example: | - { - "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" - } - /{shaCode}: - uriParameters: - shaCode: - description: SHA-1 code. - type: string - type: item - get: - description: | - Get a Blob. - Since blobs can be any arbitrary binary data, the input and responses for - the blob API takes an encoding parameter that can be either utf-8 or - base64. If your data cannot be losslessly sent as a UTF-8 string, you can - base64 encode it. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "encoding": { - "enum": [ - "utf-8", - "base64" - ] - }, - "sha": { - "type": "string" - }, - "size": { - "type": "integer" - } - } - } - example: | - { - "content": "Content of the blob", - "encoding": "utf-8", - "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15", - "size": 100 - } - /commits: - type: item - post: - description: Create a Commit. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "message": { - "description": "String of the commit message", - "type": "string" - }, - "tree": { - "description": "String of the SHA of the tree object this commit points to.", - "type": "string" - }, - "parents": [ - { - "description": "Array of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided, for a merge commit, an array of more than one should be provided.", - "type": "string" - } - ], - "type": "array", - "author": { - "properties": { - "name": { - "description": "String of the name of the author of the commit.", - "type": "string" - }, - "email": { - "description": "String of the email of the author of the commit.", - "type": "string" - }, - "date": { - "description": "Timestamp of when this commit was authored.", - "type": "timestamp" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "description": "String of the name of the committer of the commit.", - "type": "string" - }, - "email": { - "description": "String of the email of the committer of the commit.", - "type": "string" - }, - "date": { - "description": "Timestamp of when this commit was committed.", - "type": "timestamp" - } - }, - "type": "object" - } - }, - "required": [ - "message", - "tree", - "parents" - ] - } - responses: - 201: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "author": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "type": "string" - } - ], - "tree": { - "type": "string" - } - } - } - example: | - { - "message": "my commit message", - "author": { - "name": "Scott Chacon", - "email": "schacon@gmail.com", - "date": "2008-07-09T16:13:30+12:00" - }, - "parents": [ - "7d1b31e74ee336d15cbd21741bc88a537ed063a0" - ], - "tree": "827efc6d56897b048c772eb4087f854f46256132" - } - /{shaCode}: - uriParameters: - shaCode: - description: SHA-1 code. - type: string - type: item - get: - description: Get a Commit. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "author": { - "properties": { - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", - "author": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "committer": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "message": "added readme, because im a good github citizen\n", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", - "sha": "691272480426f78a0138979dd3ce63b77f706feb" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", - "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" - } - ] - } - /refs: - type: collection - get: - description: Get all References - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "references": [ - { - "properties": { - "ref": { - "type": "string" - }, - "url": { - "type": "string" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "ref": "refs/heads/master", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/master", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }, - { - "ref": "refs/heads/gh-pages", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/gh-pages", - "object": { - "type": "commit", - "sha": "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" - } - }, - { - "ref": "refs/tags/v0.0.1", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v0.0.1", - "object": { - "type": "tag", - "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac" - } - } - ] - post: - description: Create a Reference - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "ref": { - "description": "String of the name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with ?refs' and have at least two slashes, it will be rejected.", - "type": "string" - }, - "sha": { - "description": "String of the SHA1 value to set this reference to.", - "type": "string" - } - }, - "required": [ - "ref", - "sha" - ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "url": { - "type": "string" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "ref": "refs/heads/sc/featureA", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - } - /{heads}: - uriParameters: - heads: - description: Subfolder of path to the branch. - type: string - type: collection - get: - description: Get list of subdirectories. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "name": { - "type": "string" - }, - "commit": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "zipball_url": { - "type": "string" - }, - "tarball_url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "name": "v0.1", - "commit": { - "sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc", - "url": "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" - }, - "zipball_url": "https://github.com/octocat/Hello-World/zipball/v0.1", - "tarball_url": "https://github.com/octocat/Hello-World/tarball/v0.1" - } - ] - /{branch}: - type: item - uriParameters: - branch: - description: Path to the branch. - type: string - get: - description: Get a Reference. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "url": { - "type": "string" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "ref": "refs/heads/sc/featureA", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - } - patch: - description: Update a Reference - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "description": "String of the SHA1 value to set this reference to.", - "type": "string" - }, - "force": { - "description": "Boolean indicating whether to force the update or to make sure the update is a fast-forward update. The default is false, so leaving this out or setting it to false will make sure you're not overwriting work.", - "type": "boolean" - } - }, - "required": [ - "sha", - "force" - ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "url": { - "type": "string" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "ref": "refs/heads/sc/featureA", - "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - } - delete: - description: Delete a Reference. - /tags: - type: collection - post: - description: | - Create a Tag Object. - Note that creating a tag object does not create the reference that makes a - tag in Git. If you want to create an annotated tag in Git, you have to do - this call to create the tag object, and then create the refs/tags/[tag] - reference. If you want to create a lightweight tag, you only have to create - the tag reference - this call would be unnecessary. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tagger": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "message": { - "description": "String of the tag message.", - "type": "string" - }, - "object": { - "description": "String of the SHA of the git object this is tagging.", - "type": "string" - }, - "type": { - "description": "String of the type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.", - "type": "string" - }, - "tagger": { - "properties": { - "name": { - "description": "String of the name of the author of the tag.", - "type": "string" - }, - "email": { - "description": "String of the email of the author of the tag.", - "type": "string" - }, - "date": { - "description": "Timestamp of when this object was tagged.", - "type": "timestamp" - } - }, - "type": "object" - } - }, - "required": [ - "tag", - "message", - "object", - "type", - "tagger" - ] - } - example: | - { - "tag": "v0.0.1", - "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "message": "initial version\n", - "tagger": { - "name": "Scott Chacon", - "email": "schacon@gmail.com", - "date": "2011-06-17T14:53:35-07:00" - }, - "object": { - "type": "commit", - "sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c" - } - } - /{shaCode}: - type: item - get: - description: Get a Tag. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tagger": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "object": { - "properties": { - "type": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "tag": "v0.0.1", - "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "message": "initial version\n", - "tagger": { - "name": "Scott Chacon", - "email": "schacon@gmail.com", - "date": "2011-06-17T14:53:35-07:00" - }, - "object": { - "type": "commit", - "sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c" - } - } - /trees: - type: collection - post: - description: | - Create a Tree. - The tree creation API will take nested entries as well. If both a tree and - a nested path modifying that tree are specified, it will overwrite the - contents of that tree with the new path contents and write a new tree out. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "tree": [ - { - "path": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "type": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - } - ], - "type": "array" - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "base_tree": { - "type": "string" - }, - "tree": [ - { - "properties": { - "path": { - "type": "string" - }, - "mode": { - "description": "One of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit) or 120000 for a blob that specifies the path of a symlink.", - "type": "string", - "enum": [ - "100644", - "100755", - "040000", - "160000", - "120000" - ] - }, - "type": { - "type": "string", - "enum": [ - "blob", - "tree", - "commit" - ] - }, - "oneOf": [ - { - "sha": { - "description": "SHA1 checksum ID of the object in the tree.", - "type": "string" - } - }, - { - "content": { - "description": "content you want this file to have - GitHub will write this blob out and use that SHA for this entry.", - "type": "string" - } - } - ] - }, - "type": "object" - } - ], - "type": "array" - }, - "required": [ - "tree" - ] - } - example: | - { - "sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7", - "url": "https://api.github.com/repo/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7", - "tree": [ - { - "path": "file.rb", - "mode": "100644", - "type": "blob", - "size": 132, - "sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b", - "url": "https://api.github.com/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b" - } - ] - } - /{shaCode}: - uriParameters: - shaCode: - description: Id of the owner. - type: integer - type: item - get: - description: Get a Tree. - queryParameters: - recursive: - description: Get a Tree Recursively. (0 or 1) - type: integer - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "tree": [ - { - "path": { - "type": "string" - }, - "mode": { - "type": "string" - }, - "type": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - } - ], - "type": "array" - } - } - example: | - { - "sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", - "url": "https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312", - "tree": [ - { - "path": "file.rb", - "mode": "100644", - "type": "blob", - "size": 30, - "sha": "44b4fc6d56897b048c772eb4087f854f46256132", - "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132" - }, - { - "path": "subdir", - "mode": "040000", - "type": "tree", - "sha": "f484d249c660418515fb01c2b9662073663c242e", - "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e" - }, - { - "path": "exec_file", - "mode": "100755", - "type": "blob", - "size": 75, - "sha": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057", - "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057" - } - ] - } - # Readme - /readme: - type: item - get: - description: | - Get the README. - This method returns the preferred README for a repository. - queryParameters: - ref: - description: The String name of the Commit/Branch/Tag. Defaults to master. - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "encoding": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "content": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "_links": { - "properties": { - "git": { - "type": "string" - }, - "self": { - "type": "string" - }, - "html": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "type": "file", - "encoding": "base64", - "size": 5362, - "name": "README.md", - "path": "README.md", - "content": "encoded content ...", - "sha": "3d21ec53a331a6f037a91c368710b99387d012c1", - "url": "https://api.github.com/repos/pengwynn/octokit/contents/README.md", - "git_url": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", - "html_url": "https://github.com/pengwynn/octokit/blob/master/README.md", - "_links": { - "git": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", - "self": "https://api.github.com/repos/pengwynn/octokit/contents/README.md", - "html": "https://github.com/pengwynn/octokit/blob/master/README.md" - } - } - # Stargazers - /stargazers: - type: collection - get: - description: List Stargazers. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - # Subscribers - /subscribers: - type: collection - get: - description: List watchers. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - # Tags - /tags: - type: collection - get: - description: Get list of tags. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "tag": { - "type": "string" - }, - "message": { - "description": "String of the tag message.", - "type": "string" - }, - "object": { - "description": "String of the SHA of the git object this is tagging.", - "type": "string" - }, - "type": { - "description": "String of the type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.", - "type": "string" - }, - "tagger": { - "properties": { - "name": { - "description": "String of the name of the author of the tag.", - "type": "string" - }, - "email": { - "description": "String of the email of the author of the tag.", - "type": "string" - }, - "date": { - "description": "Timestamp of when this object was tagged.", - "type": "timestamp" - } - }, - "type": "object" - } - }, - "required": [ - "tag", - "message", - "object", - "type", - "tagger" - ] - } - example: | - { - "tag": "v0.0.1", - "sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac", - "message": "initial version\n", - "tagger": { - "name": "Scott Chacon", - "email": "schacon@gmail.com", - "date": "2011-06-17T14:53:35-07:00" - }, - "object": { - "type": "commit", - "sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c" - } - } - # Teams - /teams: - type: collection - get: - description: Get list of teams - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/teams/1", - "name": "Owners", - "id": 1 - } - ] - # Watchers - /watchers: - type: collection - get: - description: List Stargazers. New implementation. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - # Other links - /contributors: - type: collection - get: - description: Get list of contributors. - queryParameters: - anon: - description: Set to 1 or true to include anonymous contributors in results. - type: string - required: true - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contributions": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "contributions": 32 - } - ] - /branches: - type: collection - get: - description: Get list of branches - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "name": { - "type": "string" - }, - "commit": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "name": "master", - "commit": { - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" - } - } - ] - /{branchId}: - uriParameters: - branchId: - description: Id of the branch. - type: integer - type: item - get: - description: Get Branch - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "commit": { - "properties": { - "sha": { - "type": "string" - }, - "commit": { - "author": { - "name": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "email": { - "type": "string" - } - }, - "url": { - "type": "string" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "author": { - "properties": { - "gravatar_id": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "login": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "url": { - "type": "string" - }, - "committer": { - "properties": { - "gravatar_id": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "login": { - "type": "string" - } - }, - "type": "object" - } - }, - "_links": { - "properties": { - "html": { - "type": "string" - }, - "self": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "name": "master", - "commit": { - "sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", - "commit": { - "author": { - "name": "The Octocat", - "date": "2012-03-06T15:06:50-08:00", - "email": "octocat@nowhere.com" - }, - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", - "message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.", - "tree": { - "sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608", - "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608" - }, - "committer": { - "name": "The Octocat", - "date": "2012-03-06T15:06:50-08:00", - "email": "octocat@nowhere.com" - } - }, - "author": { - "gravatar_id": "7ad39074b0584bc555d0417ae3e7d974", - "avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", - "url": "https://api.github.com/users/octocat", - "id": 583231, - "login": "octocat" - }, - "parents": [ - { - "sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e", - "url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e" - }, - { - "sha": "762941318ee16e59dabbacb1b4049eec22f0d303", - "url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303" - } - ], - "url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d", - "committer": { - "gravatar_id": "7ad39074b0584bc555d0417ae3e7d974", - "avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", - "url": "https://api.github.com/users/octocat", - "id": 583231, - "login": "octocat" - } - }, - "_links": { - "html": "https://github.com/octocat/Hello-World/tree/master", - "self": "https://api.github.com/repos/octocat/Hello-World/branches/master" - } - } - /issues: - type: collection - get: - is: [ filterable ] - description: List issues for a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "issues": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - ] - post: - description: | - Create an issue. - Any user with pull access to a repository can create an issue. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "assignee": { - "description": "Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise.", - "type": "string" - }, - "milestone": { - "description": "Milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise.", - "type": "integer" - }, - "labels": [ - { - "description": "Array of strings - Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.", - "type": "string" - } - ], - "type": "array" - }, - "required": [ "title" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - /events: - type: collection - get: - description: List issue events for a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - /{eventId}: - uriParameters: - eventId: - description: Id of the event. - type: integer - type: item - get: - description: Get a single event. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "type": "object" - }, - "event": { - "type": "string" - }, - "commit_id": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "issue": { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1", - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "event": "closed", - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "created_at": "2011-04-14T16:00:49Z", - "issue": { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - } - /{number}: - uriParameters: - number: - description: Id of the issue. - type: integer - type: item - get: - description: Get a single issue - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - patch: - description: | - Edit an issue. - Issue owners and users with push access can edit an issue. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - # Comments - /comments: - type: collection - get: - description: List comments on an issue. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - ] - post: - description: Create a comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ "body" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", - "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", - "body": "Me too", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - # Events - /events: - type: collection - get: - description: List issue events for a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - /{eventId}: - uriParameters: - eventId: - description: Id of the event. - type: integer - type: item - get: - description: Get a single event. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "type": "object" - }, - "event": { - "type": "string" - }, - "commit_id": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "issue": { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1", - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "event": "closed", - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "created_at": "2011-04-14T16:00:49Z", - "issue": { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - } - # Labels - /labels: - type: collection - get: - description: List labels on an issue. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ] - post: - description: Add labels to an issue. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "color": { - "description": "6 character hex code, without a leading #.", - "type": "string", - "minLength": 6, - "maxLength": 6 - } - }, - "required": [ "name", "color" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - put: - description: | - Replace all labels for an issue. - Sending an empty array ([]) will remove all Labels from the Issue. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "color": { - "description": "6 character hex code, without a leading #.", - "type": "string", - "minLength": 6, - "maxLength": 6 - } - }, - "required": [ "name", "color" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - delete: - description: Remove all labels from an issue. - /{name}: - uriParameters: - name: - description: Name of the label. - type: string - type: base - delete: - description: Remove a label from an issue. - responses: - 204: - description: Item removed. - /comments: - type: collection - get: - description: List comments in a repository. - queryParameters: - sort: - enum: - - created - - updated - direction: - description: Ignored without sort parameter. - enum: - - asc - - desc - since: - description: Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - ] - /{commentId}: - uriParameters: - commentId: - description: Id of the comment. - type: integer - type: item - get: - description: Get a single comment. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", - "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", - "body": "Me too", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - patch: - description: Edit a comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ "body" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "id": 1, - "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", - "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", - "body": "Me too", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - delete: - description: Delete a comment. - /notifications: - type: collection - get: - description: | - List your notifications in a repository - List all notifications for the current user. - queryParameters: - all: - description: True to show notifications marked as read. - type: string - participating: - description: | - True to show only notifications in which the user is directly participating - or mentioned. - type: string - since: - description: | - Time filters out any notifications updated before the given time. The - time should be passed in as UTC in the ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. - Example: "2012-10-09T23:39:01Z". - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "id": { - "type": "integer" - }, - "repository": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - } - }, - "type": "object" - }, - "subject": { - "properties": { - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "latest_comment_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "reason": { - "type": "string" - }, - "unread": { - "type": "boolean" - }, - "updated_at": { - "type": "string" - }, - "last_read_at": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "repository": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World" - }, - "subject": { - "title": "Greetings", - "url": "https://api.github.com/repos/pengwynn/octokit/issues/123", - "latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123", - "type": "Issue" - }, - "reason": "subscribed", - "unread": true, - "updated_at": "2012-09-25T07:54:41-07:00", - "last_read_at": "2012-09-25T07:54:41-07:00", - "url": "https://api.github.com/notifications/threads/1" - } - ] - put: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "last_read_at": { - "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now.", - "type": "string" - } - } - } - description: | - Mark notifications as read in a repository. - Marking all notifications in a repository as "read" removes them from the - default view on GitHub.com. - responses: - 205: - description: Marked as read. - /subscription: - type: collection - get: - description: Get a Repository Subscription. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed": { - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "reason": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "url": { - "type": "string" - }, - "repository_url": { - "type": "string" - } - } - } - example: | - { - "subscribed": true, - "ignored": false, - "reason": null, - "created_at": "2012-10-06T21:34:12Z", - "url": "https://api.github.com/repos/octocat/example/subscription", - "repository_url": "https://api.github.com/repos/octocat/example" - } - put: - description: Set a Repository Subscription - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed": { - "description": "Determines if notifications should be received from this repository.", - "type": "boolean" - }, - "ignored": { - "description": "Determines if all notifications should be blocked from this repository.", - "type": "boolean" - } - }, - "required": [ "subscribed", "ignored" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "subscribed": { - "type": "boolean" - }, - "ignored": { - "type": "boolean" - }, - "reason": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "url": { - "type": "string" - }, - "repository_url": { - "type": "string" - } - } - } - example: | - { - "subscribed": true, - "ignored": false, - "reason": null, - "created_at": "2012-10-06T21:34:12Z", - "url": "https://api.github.com/repos/octocat/example/subscription", - "repository_url": "https://api.github.com/repos/octocat/example" - } - delete: - description: Delete a Repository Subscription. - /assignees: - type: collection - get: - description: | - List assignees. - This call lists all the available assignees (owner + collaborators) to which - issues may be assigned. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "integer" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{assignee}: - type: base - uriParameters: - assignee: - description: Login of the assignee. - type: string - get: - description: | - Check assignee. - You may also check to see if a particular user is an assignee for a repository. - responses: - 204: - description: User is an assignee. - 404: - description: User isn't an assignee. - /labels: - type: collection - get: - description: List all labels for this repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ] - post: - description: Create a label. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "color": { - "description": "6 character hex code, without a leading #.", - "type": "string", - "minLength": 6, - "maxLength": 6 - } - }, - "required": [ "name", "color" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - /{name}: - uriParameters: - name: - description: Name of the label. - type: string - type: item - get: - description: Get a single label. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - patch: - description: Update a label. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "color": { - "description": "6 character hex code, without a leading #.", - "type": "string", - "minLength": 6, - "maxLength": 6 - } - }, - "required": [ "name", "color" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - delete: - description: Delete a label. - /milestones: - type: collection - get: - description: List milestones for a repository. - queryParameters: - state: - enum: - - open - - closed - default: open - sort: - enum: - - due_date - - completeness - default: due_date - direction: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - } - post: - description: Create a milestone. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "description": { - "type": "string" - }, - "due_on": { - "description": "ISO 8601 time.", - "type": "string" - } - }, - "required": [ "title" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - } - /{number}: - uriParameters: - number: - description: Id of the milestone. - type: integer - type: item - get: - description: Get a single milestone. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - } - patch: - description: Update a milestone. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "number": { - "type": "integer" - }, - "title": { - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "description": { - "type": "string" - }, - "due_on": { - "description": "ISO 8601 time.", - "type": "string" - } - }, - "required": [ "number" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - } - delete: - description: Delete a milestone. - /labels: - type: collection - get: - description: Get labels for every issue in a milestone. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "maxLength": 6, - "minLength": 6 - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ] - /pulls: - type: collection - get: - description: List pull requests. - queryParameters: - state: - description: String to filter by state. - enum: - - open - - closed - default: open - head: - description: | - Filter pulls by head user and branch name in the format of 'user:ref-name'. - Example: github:new-script-format. - type: string - base: - description: Filter pulls by base branch name. Example - gh-pages. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - }, - "issue_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "merged_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "head": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "base": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "review_comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/octocat/Hello-World/pulls/1", - "html_url": "https://github.com/octocat/Hello-World/pulls/1", - "diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff", - "patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch", - "issue_url": "https://github.com/octocat/Hello-World/issue/1", - "number": 1, - "state": "open", - "title": "new-feature", - "body": "Please pull these awesome changes", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:01:12Z", - "closed_at": "2011-01-26T19:01:12Z", - "merged_at": "2011-01-26T19:01:12Z", - "head": { - "label": "new-topic", - "ref": "new-topic", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "base": { - "label": "master", - "ref": "master", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1" - }, - "comments": { - "href": "https://api.github.com/octocat/Hello-World/issues/1/comments" - }, - "review_comments": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1/comments" - } - }, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - } - ] - post: - description: Create a pull request. - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - }, - "issue_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "merged_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "head": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "base": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "review_comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/octocat/Hello-World/pulls/1", - "html_url": "https://github.com/octocat/Hello-World/pulls/1", - "diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff", - "patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch", - "issue_url": "https://github.com/octocat/Hello-World/issue/1", - "number": 1, - "state": "open", - "title": "new-feature", - "body": "Please pull these awesome changes", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:01:12Z", - "closed_at": "2011-01-26T19:01:12Z", - "merged_at": "2011-01-26T19:01:12Z", - "head": { - "label": "new-topic", - "ref": "new-topic", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "base": { - "label": "master", - "ref": "master", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1" - }, - "comments": { - "href": "https://api.github.com/octocat/Hello-World/issues/1/comments" - }, - "review_comments": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1/comments" - } - }, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - } - ] - /{number}: - uriParameters: - number: - description: Id of a pull. - type: integer - type: item - get: - description: Get a single pull request. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - }, - "issue_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "merged_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "head": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "base": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "review_comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "url": "https://api.github.com/octocat/Hello-World/pulls/1", - "html_url": "https://github.com/octocat/Hello-World/pulls/1", - "diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff", - "patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch", - "issue_url": "https://github.com/octocat/Hello-World/issue/1", - "number": 1, - "state": "open", - "title": "new-feature", - "body": "Please pull these awesome changes", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:01:12Z", - "closed_at": "2011-01-26T19:01:12Z", - "merged_at": "2011-01-26T19:01:12Z", - "head": { - "label": "new-topic", - "ref": "new-topic", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "base": { - "label": "master", - "ref": "master", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1" - }, - "comments": { - "href": "https://api.github.com/octocat/Hello-World/issues/1/comments" - }, - "review_comments": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1/comments" - } - }, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6", - "merged": false, - "mergeable": true, - "merged_by": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "comments": 10, - "commits": 3, - "additions": 100, - "deletions": 3, - "changed_files": 5 - } - patch: - description: Update a pull request. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "state": { - "enum": [ "open", "closed" ] - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "organization": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "parent": { - "description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "source": { - "description": "Is present when the repo is a fork. Source is the ultimate source for the network.", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "has_issues": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "has_downloads": { - "type": "boolean" - } - } - } - example: | - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z", - "organization": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "type": "Organization" - }, - "parent": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "source": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - }, - "has_issues": true, - "has_wiki": true, - "has_downloads": true - } - # Files - /files: - type: item - get: - description: List pull requests files. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - }, - "issue_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "merged_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "head": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "base": { - "properties": { - "label": { - "type": "string" - }, - "ref": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "review_comments": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/octocat/Hello-World/pulls/1", - "html_url": "https://github.com/octocat/Hello-World/pulls/1", - "diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff", - "patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch", - "issue_url": "https://github.com/octocat/Hello-World/issue/1", - "number": 1, - "state": "open", - "title": "new-feature", - "body": "Please pull these awesome changes", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:01:12Z", - "closed_at": "2011-01-26T19:01:12Z", - "merged_at": "2011-01-26T19:01:12Z", - "head": { - "label": "new-topic", - "ref": "new-topic", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "base": { - "label": "master", - "ref": "master", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "repo": { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1" - }, - "comments": { - "href": "https://api.github.com/octocat/Hello-World/issues/1/comments" - }, - "review_comments": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1/comments" - } - }, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - } - ] - # Commits - /commits: - type: item - get: - description: List commits on a pull request. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "commit": { - "properties": { - "url": { - "type": "string" - }, - "author": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - }, - "author": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "commit": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "author": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "committer": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "message": "Fix all the bugs", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - }, - "author": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "committer": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - ] - } - ] - /merge: - type: base - get: - description: Get if a pull request has been merged. - responses: - 204: - description: Pull request has been merged. - 404: - description: Pull request has not been merged. - put: - description: Merge a pull request (Merge Buttonâ„¢) - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "commit_message": { - "description": "The message that will be used for the merge commit", - "type": "string" - } - } - } - responses: - 200: - description: Response if merge was successful. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "merged": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - } - example: | - { - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "merged": true, - "message": "Pull Request successfully merged" - } - 405: - description: Response if merge cannot be performed. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "merged": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - } - example: | - { - "sha": null, - "merged": false, - "message": "Failure reason" - } - /comments: - type: collection - get: - description: List comments on a pull request. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - post: - description: | - Create a comment. - #TODO Alternative input ( http://developer.github.com/v3/pulls/comments/ ) - description: | - Alternative Input. - Instead of passing commit_id, path, and position you can reply to an - existing Pull Request Comment like this: - - body - Required string - in_reply_to - Required number - Comment id to reply to. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - }, - "commit_id": { - "description": "Sha of the commit to comment on.", - "type": "string" - }, - "path": { - "description": "Relative path of the file to comment on.", - "type": "string" - }, - "position": { - "description": "Line index in the diff to comment on.", - "type": "string" - } - }, - "required": [ "body", "commit_id", "path", "position" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - /comments: - type: collection - get: - description: | - List comments in a repository. - By default, Review Comments are ordered by ascending ID. - queryParameters: - sort: - enum: - - created - - updated - direction: - description: Ignored without 'sort' parameter. - enum: - - asc - - desc - since: - description: Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - ] - /{number}: - uriParameters: - number: - description: Id of the comment. - type: integer - type: item - get: - description: Get a single comment. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - patch: - description: Edit a comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ "body" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "_links": { - "properties": { - "self": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "html": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - }, - "pull_request": { - "properties": { - "href": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z", - "_links": { - "self": { - "href": "https://api.github.com/octocat/Hello-World/pulls/comments/1" - }, - "html": { - "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" - }, - "pull_request": { - "href": "https://api.github.com/octocat/Hello-World/pulls/1" - } - } - } - delete: - description: Delete a comment. - /collaborators: - type: collection - get: - description: | - List. - When authenticating as an organization owner of an organization-owned - repository, all organization owners are included in the list of - collaborators. Otherwise, only users with access to the repository are - returned in the collaborators list. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{user}: - uriParameters: - user: - description: Login of the user. - type: string - type: base - get: - description: Check if user is a collaborator - responses: - 204: - description: User is a collaborator. - 404: - description: User is not a collaborator. - put: - description: Add collaborator. - responses: - 204: - description: Collaborator added. - delete: - description: Remove collaborator. - responses: - 204: - description: Collaborator removed. - /comments: - type: collection - get: - description: | - List commit comments for a repository. - Comments are ordered by ascending ID. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "line": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", - "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "line": 14, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - ] - /{commentId}: - uriParameters: - commentId: - description: Id of a comment. - type: integer - type: item - get: - description: Get a single commit comment. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "line": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", - "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "line": 14, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - patch: - description: Update a commit comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "body": { - "type": "string" - } - }, - "required": [ "body" ] - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "line": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", - "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "line": 14, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - delete: - description: Delete a commit comment - /commits: - type: collection - get: - description: List commits on a repository. - queryParameters: - sha: - description: Sha or branch to start listing commits from. - type: string - path: - description: Only commits containing this file path will be returned. - type: string - author: - description: GitHub login, name, or email by which to filter by commit author. - type: string - since: - description: ISO 8601 Date - Only commits after this date will be returned. - type: string - until: - description: ISO 8601 Date - Only commits before this date will be returned. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "commit": { - "properties": { - "url": { - "type": "string" - }, - "author": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - }, - "author": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "commit": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "author": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "committer": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "message": "Fix all the bugs", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - }, - "author": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "committer": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - ] - } - ] - /{shaCode}: - uriParameters: - shaCode: - description: SHA-1 code of the commit. - type: string - type: item - get: - description: Get a single commit. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "commit": { - "properties": { - "url": { - "type": "string" - }, - "author": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "date": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - }, - "author": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "commit": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "author": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "committer": { - "name": "Monalisa Octocat", - "email": "support@github.com", - "date": "2011-04-14T16:00:49Z" - }, - "message": "Fix all the bugs", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - }, - "author": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "committer": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" - } - ], - "stats": { - "additions": 104, - "deletions": 4, - "total": 108 - }, - "files": [ - { - "filename": "file1.txt", - "additions": 10, - "deletions": 2, - "changes": 12, - "status": "modified", - "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt", - "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt", - "patch": "@@ -29,7 +29,7 @@\n....." - } - ] - } - /comments: - type: collection - get: - description: List comments for a single commitList comments for a single commit. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "line": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", - "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "line": 14, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - ] - post: - description: Create a commit comment. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "description": "SHA of the commit to comment on.", - "type": "string" - }, - "body": { - "type": "string" - }, - "path": { - "description": "Relative path of the file to comment on.", - "type": "string" - }, - "position": { - "description": "Line index in the diff to comment on.", - "type": "integer" - }, - "line": { - "description": "Deprecated - Use position parameter instead.", - "type": "string" - }, - "number": { - "description": "Line number in the file to comment on. Defaults to null.", - "type": "string" - } - }, - "required": [ "sha", "body" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "html_url": { - "type": "string" - }, - "url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "body": { - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "line": { - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1", - "url": "https://api.github.com/repos/octocat/Hello-World/comments/1", - "id": 1, - "body": "Great stuff", - "path": "file1.txt", - "position": 4, - "line": 14, - "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-04-14T16:00:49Z", - "updated_at": "2011-04-14T16:00:49Z" - } - /contents/{path}: - uriParameters: - path: - type: string - type: base - get: - description: | - Get contents. - This method returns the contents of a file or directory in a repository. - Files and symlinks support a custom media type for getting the raw content. - Directories and submodules do not support custom media types. - Note: This API supports files up to 1 megabyte in size. - Here can be many outcomes. For details see "http://developer.github.com/v3/repos/contents/" - queryParameters: - path: - description: The content path. - type: string - ref: - description: The String name of the Commit/Branch/Tag. Defaults to 'master'. - type: string - responses: - 200: - body: - application/json: - #TODO many outcomes - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "encoding": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "content": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "_links": { - "properties": { - "git": { - "type": "string" - }, - "self": { - "type": "string" - }, - "html": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "type": "file", - "encoding": "base64", - "size": 5362, - "name": "README.md", - "path": "README.md", - "content": "encoded content ...", - "sha": "3d21ec53a331a6f037a91c368710b99387d012c1", - "url": "https://api.github.com/repos/pengwynn/octokit/contents/README.md", - "git_url": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", - "html_url": "https://github.com/pengwynn/octokit/blob/master/README.md", - "_links": { - "git": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", - "self": "https://api.github.com/repos/pengwynn/octokit/contents/README.md", - "html": "https://github.com/pengwynn/octokit/blob/master/README.md" - } - } - put: - description: Create a file. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "content": { - "properties": { - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "sha": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "type": { - "type": "string" - }, - "_links": { - "properties": { - "self": { - "type": "string" - }, - "git": { - "type": "string" - }, - "html": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "commit": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "author": { - "properties": { - "date": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "date": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ] - }, - "type": "object" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "path": { - "description": "The content path.", - "type": "string" - }, - "message": { - "description": "The commit message.", - "type": "string" - }, - "content": { - "description": "The new file content, Base64 encoded.", - "type": "string" - }, - "sha": { - "description": "Is included if we want to modify existing file. The blob SHA of the file being replaced.", - "type": "string" - }, - "branch": { - "description": "The branch name. If not provided, uses the repository's default branch (usually master).", - "type": "string" - }, - "author": { - "properties": { - "name": { - "description": "The name of the author of the commit.", - "type": "string" - }, - "email": { - "description": "The email of the author of the commit", - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "description": "The name of the committer of the commit.", - "type": "string" - }, - "email": { - "description": "The email of the committer of the commit.", - "type": "string" - } - }, - "type": "object" - } - }, - "required": [ "path", "message", "content", "branch" ] - } - example: | - { - "content": { - "name": "hello.txt", - "path": "notes/hello.txt", - "sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3", - "size": 9, - "url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", - "html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt", - "git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3", - "type": "file", - "_links": { - "self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt", - "git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3", - "html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt" - } - }, - "commit": { - "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", - "html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd", - "author": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "committer": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "message": "my commit message", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", - "sha": "691272480426f78a0138979dd3ce63b77f706feb" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", - "html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5", - "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" - } - ] - } - } - delete: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "path": { - "description": "The content path.", - "type": "string" - }, - "message": { - "description": "The commit message.", - "type": "string" - }, - "content": { - "description": "The new file content, Base64 encoded.", - "type": "string" - }, - "sha": { - "description": "The blob SHA of the file being removed.", - "type": "string" - }, - "branch": { - "description": "The branch name. If not provided, uses the repository's default branch (usually master).", - "type": "string" - }, - "author": { - "properties": { - "name": { - "description": "The name of the author of the commit.", - "type": "string" - }, - "email": { - "description": "The email of the author of the commit", - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "description": "The name of the committer of the commit.", - "type": "string" - }, - "email": { - "description": "The email of the committer of the commit.", - "type": "string" - } - }, - "type": "object" - } - }, - "required": [ "path", "message", "sha" ] - } - description: | - Delete a file. - This method deletes a file in a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "commit": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "author": { - "properties": { - "date": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "date": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "type": "object" - } - ] - }, - "type": "object" - } - } - } - example: | - { - "content": null, - "commit": { - "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", - "html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd", - "author": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "committer": { - "date": "2010-04-10T14:10:01-07:00", - "name": "Scott Chacon", - "email": "schacon@gmail.com" - }, - "message": "my commit message", - "tree": { - "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", - "sha": "691272480426f78a0138979dd3ce63b77f706feb" - }, - "parents": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", - "html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5", - "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" - } - ] - } - } - /{archive_format}/{path}: - type: base - uriParameters: - archive_format: - enum: - - tarball - - zipball - required: true - path: - description: Valid Git reference, defaults to 'master'. - type: string - get: - description: | - Get archive link. - This method will return a 302 to a URL to download a tarball or zipball - archive for a repository. Please make sure your HTTP framework is - configured to follow redirects or you will need to use the Location header - to make a second GET request. - Note: For private repositories, these links are temporary and expire quickly. - responses: - 302: - description: Found. - /downloads: - type: collection - get: - description: List downloads for a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "download_count": { - "type": "integer" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1", - "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg", - "id": 1, - "name": "new_file.jpg", - "description": "Description of your download", - "size": 1024, - "download_count": 40, - "content_type": ".jpg" - } - post: - description: | - Create a new download (Part 1: Create the resource). - For part 2 see http://developer.github.com/v3/repos/downloads/#create-a-new-download-part-2-upload-file-to-s3 - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "size": { - "description": "Size of file in bytes.", - "type": "integer" - }, - "description": { - "type": "string" - }, - "content_type": { - "type": "string" - } - }, - "required": [ "name", "size" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "download_count": { - "type": "integer" - }, - "content_type": { - "type": "string" - }, - "policy": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "bucket": { - "type": "string" - }, - "accesskeyid": { - "type": "string" - }, - "path": { - "type": "string" - }, - "acl": { - "type": "string" - }, - "expirationdate": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "prefix": { - "type": "string" - }, - "mime_type": { - "type": "string" - }, - "redirect": { - "type": "boolean" - }, - "s3_url": { - "type": "string" - } - } - } - example: | - { - "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1", - "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg", - "id": 1, - "name": "new_file.jpg", - "description": "Description of your download", - "size": 1024, - "download_count": 40, - "content_type": ".jpg", - "policy": "ewogICAg...", - "signature": "mwnFDC...", - "bucket": "github", - "accesskeyid": "1ABCDEFG...", - "path": "downloads/octocat/Hello-World/new_file.jpg", - "acl": "public-read", - "expirationdate": "2011-04-14T16:00:49Z", - "prefix": "downloads/octocat/Hello-World/", - "mime_type": "image/jpeg", - "redirect": false, - "s3_url": "https://github.s3.amazonaws.com/" - } - /{downloadId}: - type: item - uriParameters: - downloadId: - description: Id of the download. - type: integer - get: - description: Get a single download. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "download_count": { - "type": "integer" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - delete: - description: Delete a download. - /forks: - type: collection - get: - description: List forks. - queryParameters: - sort: - enum: - - newest - - oldest - - watchers - default: newest - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - post: - description: | - Create a fork. - Forking a Repository happens asynchronously. Therefore, you may have to wait - a short period before accessing the git objects. If this takes longer than 5 - minutes, be sure to contact Support. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "organization": { - "description": "Organization login. The repository will be forked into this organization.", - "type": "string" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - } - } - example: | - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - /keys: - type: collection - get: - description: Get list of keys. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - ] - post: - description: Create a key. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "key": { - "type": "string" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - /{keyId}: - uriParameters: - keyId: - description: Id of a key. - type: integer - type: item - get: - description: Get a key - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - patch: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "key": { - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - description: Edit a key. - delete: - description: Delete a key. - /hooks: - type: collection - get: - description: Get list of hooks. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "type": "boolean" - }, - "config": { - "properties": { - "url": { - "type": "string" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/hooks/1", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "name": "web", - "events": [ - "push", - "pull_request" - ], - "active": true, - "config": { - "url": "http://example.com", - "content_type": "json" - }, - "id": 1 - } - ] - post: - description: Create a hook. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "config": { - "description": "A Hash containing key/value pairs to provide settings for this hook. Modifying this will replace the entire config object. These settings vary between the services and are defined in the github-services repo. Booleans are stored internally as \"1\" for true, and \"0\" for false. Any JSON true/false values will be converted automatically.", - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "add_events": [ - { - "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "remove_events": [ - { - "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "description": "Determines whether the hook is actually triggered on pushes.", - "type": "boolean" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "type": "boolean" - }, - "config": { - "properties": { - "url": { - "type": "string" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/hooks/1", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "name": "web", - "events": [ - "push", - "pull_request" - ], - "active": true, - "config": { - "url": "http://example.com", - "content_type": "json" - }, - "id": 1 - } - ] - /{hookId}: - uriParameters: - hookId: - description: Id of the hook. - type: integer - type: item - get: - description: Get single hook. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "type": "boolean" - }, - "config": { - "properties": { - "url": { - "type": "string" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/hooks/1", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "name": "web", - "events": [ - "push", - "pull_request" - ], - "active": true, - "config": { - "url": "http://example.com", - "content_type": "json" - }, - "id": 1 - } - ] - patch: - description: Edit a hook. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "config": { - "description": "A Hash containing key/value pairs to provide settings for this hook. Modifying this will replace the entire config object. These settings vary between the services and are defined in the github-services repo. Booleans are stored internally as \"1\" for true, and \"0\" for false. Any JSON true/false values will be converted automatically.", - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "add_events": [ - { - "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "remove_events": [ - { - "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "description": "Determines whether the hook is actually triggered on pushes.", - "type": "boolean" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "name": { - "type": "string" - }, - "events": [ - { - "enum": [ - "push", - "issues", - "issue_comment", - "commit_comment", - "pull_request", - "pull_request_review_comment", - "gollum", - "watch", - "download", - "fork", - "fork_apply", - "member", - "public", - "team_add", - "status" - ] - } - ], - "type": "array", - "active": { - "type": "boolean" - }, - "config": { - "properties": { - "url": { - "type": "string" - }, - "content_type": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "integer" - } - } - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/hooks/1", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "name": "web", - "events": [ - "push", - "pull_request" - ], - "active": true, - "config": { - "url": "http://example.com", - "content_type": "json" - }, - "id": 1 - } - ] - delete: - description: Delete a hook. - /tests: - type: base - post: - description: | - Test a push hook. - This will trigger the hook with the latest push to the current repository - if the hook is subscribed to push events. If the hook is not subscribed - to push events, the server will respond with 204 but no test POST will - be generated. - Note: Previously /repos/:owner/:repo/hooks/:id/test - responses: - 204: - description: Hook is triggered. - /merges: - type: base - post: - description: Perform a merge. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "base": { - "description": "The name of the base branch that the head will be merged into.", - "type": "string" - }, - "head": { - "description": "The head to merge. This can be a branch name or a commit SHA1.", - "type": "string" - }, - "commit_message": { - "description": "Commit message to use for the merge commit. If omitted, a default message will be used.", - "type": "string" - } - }, - "required": [ "base", "head" ] - } - responses: - 201: - description: Successful Response (The resulting merge commit) - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "sha": { - "type": "string" - }, - "commit": { - "properties": { - "author": { - "properties": { - "name": { - "type": "string" - }, - "date": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "name": { - "type": "string" - }, - "date": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "type": "object" - }, - "message": { - "type": "string" - }, - "tree": { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "comment_count": { - "type": "integer" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "comments_url": { - "type": "string" - }, - "author": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "followers_url": { - "type": "string" - }, - "following_url": { - "type": "string" - }, - "gists_url": { - "type": "string" - }, - "starred_url": { - "type": "string" - }, - "subscriptions_url": { - "type": "string" - }, - "organizations_url": { - "type": "string" - }, - "repos_url": { - "type": "string" - }, - "events_url": { - "type": "string" - }, - "received_events_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "committer": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "followers_url": { - "type": "string" - }, - "following_url": { - "type": "string" - }, - "gists_url": { - "type": "string" - }, - "starred_url": { - "type": "string" - }, - "subscriptions_url": { - "type": "string" - }, - "organizations_url": { - "type": "string" - }, - "repos_url": { - "type": "string" - }, - "events_url": { - "type": "string" - }, - "received_events_url": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "parents": [ - { - "properties": { - "sha": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "merged": true, - "message": "Pull Request successfully merged" - } - 204: - description: No-op response (base already contains the head, nothing to merge) - 409: - description: Merge conflict response. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "message": { - "description": "Error message", - "type": "string" - } - } - } - example: | - { - "message": "Merge Conflict" - } - 404: - description: Missing base response or missing head response - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "message": { - "description": "Error message", - "type": "string" - } - } - } - example: | - { - "message": "Base does not exist" - } - /statuses/{ref}: - type: collection - uriParameters: - ref: - description: | - Ref to list the statuses from. It can be a SHA, a branch name, or a tag name. - type: string - get: - description: List Statuses for a specific Ref. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "state": { - "type": "string" - }, - "target_url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "created_at": "2012-07-20T01:19:13Z", - "updated_at": "2012-07-20T01:19:13Z", - "state": "success", - "target_url": "https://ci.example.com/1000/output", - "description": "Build has completed successfully", - "id": 1, - "url": "https://api.github.com/repos/octocat/example/statuses/1", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - } - ] - post: - description: Create a Status. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "state": { - "enum": [ - "pending", "success", "error", "failure" - ] - }, - "target_url": { - "description": "Target url to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the ?source' of the Status.", - "type": "string" - }, - "description": { - "description": "Short description of the status", - "type": "string" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "state": { - "type": "string" - }, - "target_url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "created_at": "2012-07-20T01:19:13Z", - "updated_at": "2012-07-20T01:19:13Z", - "state": "success", - "target_url": "https://ci.example.com/1000/output", - "description": "Build has completed successfully", - "id": 1, - "url": "https://api.github.com/repos/octocat/example/statuses/1", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - } - ] - /stats: - /contributors: - type: collection - get: - description: Get contributors list with additions, deletions, and commit counts. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "author": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "total": { - "description": "The Total number of commits authored by the contributor.", - "type": "integer" - }, - "weeks": [ - { - "properties": { - "w": { - "description": "Start of the week.", - "type": "string" - }, - "a": { - "description": "Number of additions.", - "type": "integer" - }, - "d": { - "description": "Number of deletions.", - "type": "integer" - }, - "c": { - "description": "Number of commits.", - "type": "integer" - } - }, - "type": "object" - } - ], - "type": "array" - } - ] - } - example: | - [ - { - "author": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "total": 135, - "weeks": [ - { - "w": "1367712000", - "a": 6898, - "d": 77, - "c": 10 - } - ] - } - ] - /commit_activity: - type: collection - get: - description: | - Get the last year of commit activity data. - Returns the last year of commit activity grouped by week. The days array - is a group of commits per day, starting on Sunday. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "days": [ - { - "type": "integer" - } - ], - "type": "array", - "total": { - "type": "integer" - }, - "week": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "days": [ - 0, - 3, - 26, - 20, - 39, - 1, - 0 - ], - "total": 89, - "week": 1336280400 - } - ] - /code_frequency: - type: collection - get: - description: | - Get the number of additions and deletions per week. - Returns a weekly aggregate of the number of additions and deletions pushed - to a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "type": "integer" - } - ] - } - example: | - [ - [ - 1302998400, - 1124, - -435 - ] - ] - /participation: - type: collection - get: - description: Get the weekly commit count for the repo owner and everyone else. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "all": [ - { - "type": "integer" - } - ], - "type": "array", - "owner": [ - { - "type": "integer" - } - ], - "type": "array" - } - } - example: | - { - "all": [ - 11, - 21, - 15, - 2, - 8, - 1, - 8, - 23, - 17, - 21, - 11, - 10, - 33, - 91, - 38, - 34, - 22, - 23, - 32, - 3, - 43, - 87, - 71, - 18, - 13, - 5, - 13, - 16, - 66, - 27, - 12, - 45, - 110, - 117, - 13, - 8, - 18, - 9, - 19, - 26, - 39, - 12, - 20, - 31, - 46, - 91, - 45, - 10, - 24, - 9, - 29, - 7 - ], - "owner": [ - 3, - 2, - 3, - 0, - 2, - 0, - 5, - 14, - 7, - 9, - 1, - 5, - 0, - 48, - 19, - 2, - 0, - 1, - 10, - 2, - 23, - 40, - 35, - 8, - 8, - 2, - 10, - 6, - 30, - 0, - 2, - 9, - 53, - 104, - 3, - 3, - 10, - 4, - 7, - 11, - 21, - 4, - 4, - 22, - 26, - 63, - 11, - 2, - 14, - 1, - 10, - 3 - ] - } - /punch_card: - type: collection - get: - description: | - Get the number of commits per hour in each day. - Each array contains the day number, hour number, and number of commits - 0-6 Sunday - Saturday - 0-23 Hour of day - Number of commits - - For example, [2, 14, 25] indicates that there were 25 total commits, during - the 2.00pm hour on Tuesdays. All times are based on the time zone of - individual commits. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "": [ - { - "type": "integer" - } - ] - } - ] - } - example: | - [ - [ - 0, - 0, - 5 - ], - [ - 0, - 1, - 43 - ], - [ - 0, - 2, - 21 - ] - ] -/user: - type: item - get: - description: Get the authenticated user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "company": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "location": { - "type": "string" - }, - "email": { - "type": "string" - }, - "hireable": { - "type": "boolean" - }, - "bio": { - "type": "string" - }, - "public_repos": { - "type": "integer" - }, - "public_gists": { - "type": "integer" - }, - "followers": { - "type": "integer" - }, - "following": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "type": { - "type": "string" - }, - "total_private_repos": { - "type": "integer" - }, - "owned_private_repos": { - "type": "integer" - }, - "private_gists": { - "type": "integer" - }, - "disk_usage": { - "type": "integer" - }, - "collaborators": { - "type": "integer" - }, - "plan": { - "properties": { - "name": { - "type": "string" - }, - "space": { - "type": "integer" - }, - "collaborators": { - "type": "integer" - }, - "private_repos": { - "type": "integer" - } - }, - "type": "object" - } - } - } - example: | - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "name": "monalisa octocat", - "company": "GitHub", - "blog": "https://github.com/blog", - "location": "San Francisco", - "email": "octocat@github.com", - "hireable": false, - "bio": "There once was...", - "public_repos": 2, - "public_gists": 1, - "followers": 20, - "following": 0, - "html_url": "https://github.com/octocat", - "created_at": "2008-01-14T04:33:35Z", - "type": "User", - "total_private_repos": 100, - "owned_private_repos": 100, - "private_gists": 81, - "disk_usage": 10000, - "collaborators": 8, - "plan": { - "name": "Medium", - "space": 400, - "collaborators": 10, - "private_repos": 20 - } - } - patch: - description: Update the authenticated user. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "company": { - "type": "string" - }, - "location": { - "type": "string" - }, - "hireable": { - "type": "boolean" - }, - "bio": { - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "company": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "location": { - "type": "string" - }, - "email": { - "type": "string" - }, - "hireable": { - "type": "boolean" - }, - "bio": { - "type": "string" - }, - "public_repos": { - "type": "integer" - }, - "public_gists": { - "type": "integer" - }, - "followers": { - "type": "integer" - }, - "following": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "type": { - "type": "string" - }, - "total_private_repos": { - "type": "integer" - }, - "owned_private_repos": { - "type": "integer" - }, - "private_gists": { - "type": "integer" - }, - "disk_usage": { - "type": "integer" - }, - "collaborators": { - "type": "integer" - }, - "plan": { - "properties": { - "name": { - "type": "string" - }, - "space": { - "type": "integer" - }, - "collaborators": { - "type": "integer" - }, - "private_repos": { - "type": "integer" - } - }, - "type": "object" - } - } - } - example: | - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "name": "monalisa octocat", - "company": "GitHub", - "blog": "https://github.com/blog", - "location": "San Francisco", - "email": "octocat@github.com", - "hireable": false, - "bio": "There once was...", - "public_repos": 2, - "public_gists": 1, - "followers": 20, - "following": 0, - "html_url": "https://github.com/octocat", - "created_at": "2008-01-14T04:33:35Z", - "type": "User", - "total_private_repos": 100, - "owned_private_repos": 100, - "private_gists": 81, - "disk_usage": 10000, - "collaborators": 8, - "plan": { - "name": "Medium", - "space": 400, - "collaborators": 10, - "private_repos": 20 - } - } - /orgs: - type: collection - get: - description: List public and private organizations for the authenticated user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "avatar_url": { - "type": "string" - } - } - ] - } - example: | - [ - { - "login": "github", - "id": 1, - "url": "https://api.github.com/orgs/github", - "avatar_url": "https://github.com/images/error/octocat_happy.gif" - } - ] - # Other - /{userId}: - type: collection - uriParameters: - userId: - type: integer - get: - securedBy: [ oauth_2_0, null ] - description: Get a single user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "company": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "location": { - "type": "string" - }, - "email": { - "description": "Note: The returned email is the user's publicly visible email address (or null if the user has not specified a public email address in their profile).", - "type": "string" - }, - "hireable": { - "type": "boolean" - }, - "bio": { - "type": "string" - }, - "public_repos": { - "type": "integer" - }, - "public_gists": { - "type": "integer" - }, - "followers": { - "type": "integer" - }, - "following": { - "type": "integer" - }, - "html_url": { - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "type": { - "type": "string" - } - } - } - example: | - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat", - "name": "monalisa octocat", - "company": "GitHub", - "blog": "https://github.com/blog", - "location": "San Francisco", - "email": "octocat@github.com", - "hireable": false, - "bio": "There once was...", - "public_repos": 2, - "public_gists": 1, - "followers": 20, - "following": 0, - "html_url": "https://github.com/octocat", - "created_at": "2008-01-14T04:33:35Z", - "type": "User" - } - # Received events - /received_events: - type: collection - get: - description: List events that a user has received. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - /public: - type: collection - get: - description: List public events that a user has received. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - # Orgs - /orgs: - type: collection - get: - description: List all public organizations for a user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "avatar_url": { - "type": "string" - } - } - ] - } - example: | - [ - { - "login": "github", - "id": 1, - "url": "https://api.github.com/orgs/github", - "avatar_url": "https://github.com/images/error/octocat_happy.gif" - } - ] - /events: - type: collection - get: - description: | - List events performed by a user. - If you are authenticated as the given user, you will see your private events. - Otherwise, you'll only see public events. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - # Public - /public: - type: collection - get: - description: List public events performed by a user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - # Orgs events - /orgs/{orgId}: - uriParameters: - orgId: - type: integer - type: collection - get: - description: List events for an organization. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] - /starred: - type: collection - get: - description: List repositories being starred. - queryParameters: - sort: - enum: - - created - - updated - default: created - direction: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - /subscriptions: - type: collection - get: - description: List repositories being watched by a user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - /emails: - type: collection - get: - description: | - List email addresses for a user. - In the final version of the API, this method will return an array of hashes - with extended information for each email address indicating if the address - has been verified and if it's the user's primary email address for GitHub. - Until API v3 is finalized, use the application/vnd.github.v3 media type to - get other response format. - responses: - 200: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "type": "string" - } - ] - } - example: | - [ - "octocat@github.com", - "support@github.com" - ] - application/vnd.github.v3: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "properties": { - "email": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "email": "octocat@github.com", - "verified": true, - "primary": true - } - ] - post: - description: | - Add email address(es). - You can post a single email address or an array of addresses. - delete: - description: | - Delete email address(es). - You can include a single email address or an array of addresses. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "type": "string" - } - ] - } - /following: - type: collection - get: - description: List who the authenticated user is following. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{userId}: - uriParameters: - userId: - type: integer - type: base - get: - description: Check if you are following a user. - responses: - 204: - description: Response if you are following this user. - 404: - description: Response if you are not following this user. - put: - description: | - Follow a user. - Following a user requires the user to be logged in and authenticated with - basic auth or OAuth with the user:follow scope. - responses: - 204: - description: You are now following the user. - delete: - description: | - Unfollow a user. - Unfollowing a user requires the user to be logged in and authenticated with - basic auth or OAuth with the user:follow scope. - responses: - 204: - description: User unfollowed. - /keys: - type: collection - get: - description: | - List your public keys. - Lists the current user's keys. Management of public keys via the API requires - that you are authenticated through basic auth, or OAuth with the 'user' scope. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - ] - post: - description: Create a public key. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "key": { - "type": "string" - } - } - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - /{keyId}: - uriParameters: - keyId: - type: integer - type: item - get: - description: Get a single public key. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - patch: - description: Update a public key. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "key": { - "type": "string" - } - } - } - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "title": { - "type": "string" - } - } - } - example: | - { - "id": 1, - "key": "ssh-rsa AAA...", - "url": "https://api.github.com/user/keys/1", - "title": "octocat@octomac" - } - delete: - description: Delete a public key. - /starred: - type: collection - get: - description: List repositories being starred by the authenticated user. - queryParameters: - sort: - enum: - - created - - updated - default: created - direction: - enum: - - asc - - desc - default: desc - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - /{ownerId}/{repoId}: - type: base - get: - description: Check if you are starring a repository. - responses: - 204: - description: This repository is starred by you. - 404: - description: This repository is not starred by you. - put: - description: Star a repository. - responses: - 204: - description: Repository starred. - delete: - description: Unstar a repository - responses: - 204: - description: Unstarred. - /subscriptions: - type: collection - get: - description: List repositories being watched by the authenticated user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "integer" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": false, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - /{ownerId}/{repoId}: - type: base - uriParameters: - ownerId: - description: Id of the owner. - type: integer - repoId: - description: Id of repository. - type: integer - get: - description: Check if you are watching a repository. - responses: - 204: - description: Repository is watched by you. - 404: - description: Repository is not watched by you. - put: - description: Watch a repository. - responses: - 204: - description: Repository is watched. - delete: - description: Stop watching a repository - responses: - 204: - description: Unwatched. - /issues: - type: collection - get: - is: [ filterable ] - description: | - List issues. - List all issues across owned and member repositories for the authenticated - user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "issues": [ - { - "properties": { - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "labels": [ - { - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "assignee": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "milestone": { - "properties": { - "url": { - "type": "string" - }, - "number": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ] - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "creator": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "open_issues": { - "type": "integer" - }, - "closed_issues": { - "type": "integer" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "due_on": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "pull_request": { - "properties": { - "html_url": { - "type": "string" - }, - "diff_url": { - "type": "string" - }, - "patch_url": { - "type": "string" - } - }, - "type": "object" - }, - "closed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "number": 1347, - "state": "open", - "title": "Found a bug", - "body": "I'm having a problem with this.", - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "labels": [ - { - "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", - "name": "bug", - "color": "f29513" - } - ], - "assignee": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "milestone": { - "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1", - "number": 1, - "state": "open", - "title": "v1.0", - "description": "", - "creator": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "open_issues": 4, - "closed_issues": 8, - "created_at": "2011-04-10T20:09:31Z", - "due_on": null - }, - "comments": 0, - "pull_request": { - "html_url": "https://github.com/octocat/Hello-World/issues/1347", - "diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch" - }, - "closed_at": null, - "created_at": "2011-04-22T13:33:48Z", - "updated_at": "2011-04-22T13:33:48Z" - } - ] - /repos: - type: collection - get: - description: | - List repositories for the authenticated user. Note that this does not include - repositories owned by organizations which the user can access. You can list - user organizations and list organization repositories separately. - queryParameters: - type: - enum: - - all - - public - - private - - forks - - sources - - member - default: all - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] - post: - description: | - Create a new repository for the authenticated user. OAuth users must supply - repo scope. - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "private": { - "description": "True to create a private repository, false to create a public one. Creating private repositories requires a paid GitHub account.", - "type": "boolean" - }, - "has_issues": { - "description": "True to enable issues for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "has_wiki": { - "description": "True to enable the wiki for this repository, false to disable it. Default is true.", - "type": "boolean" - }, - "has_downloads": { - "description": "True to enable downloads for this repository, false to disable them. Default is true.", - "type": "boolean" - }, - "team_id": { - "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization.", - "type": "integer" - }, - "auto_init": { - "description": "True to create an initial commit with empty README. Default is false.", - "type": "boolean" - }, - "gitignore_template": { - "description": "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\" Ignored if auto_init parameter is not provided. ", - "type": "string" - } - }, - "required": [ "name" ] - } - responses: - 201: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] -/users: - type: collection - get: - description: | - Get all users. - This provides a dump of every user, in the order that they signed up for GitHub. - Note: Pagination is powered exclusively by the since parameter. Use the Link - header to get the URL for the next page of users. - queryParameters: - since: - description: The integer ID of the last User that you've seen. - type: integer - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - /{userId}: - uriParameters: - userId: - type: integer - type: collection - get: - description: List a user's followers. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "list": [ - { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - } - ] - # Followers - /following/{targetUserId}: - uriParameters: - targetUserId: - type: integer - type: base - get: - description: Check if one user follows another. - responses: - 204: - description: Response if user follows target user. - 404: - description: Response if user does not follow target user. - # Keys - /keys: - type: collection - get: - description: | - List public keys for a user. - Lists the verified public keys for a user. This is accessible by anyone. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "id": { - "type": "integer" - }, - "key": { - "type": "string" - } - } - ] - } - example: | - [ - { - "id": 1, - "key": "ssh-rsa AAA..." - } - ] - # Gists - /gists: - type: collection - get: - securedBy: [ null, oauth_2_0 ] - description: List a user's gists. - queryParameters: - since: - description: | - Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. - Only gists updated at or after this time are returned. - type: string - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "gists": [ - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "user": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "files": { - "properties": { - "ring.erl": { - "properties": { - "size": { - "type": "integer" - }, - "filename": { - "type": "string" - }, - "raw_url": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "comments": { - "type": "integer" - }, - "comments_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "git_pull_url": { - "type": "string" - }, - "git_push_url": { - "type": "string" - }, - "created_at": { - "type": "string" - } - } - } - ] - } - example: | - [ - { - "url": "https://api.github.com/gists/20c98223d9b59e1d48e5", - "id": "1", - "description": "description of gist", - "public": true, - "user": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "files": { - "ring.erl": { - "size": 932, - "filename": "ring.erl", - "raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl" - } - }, - "comments": 0, - "comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/", - "html_url": "https://gist.github.com/1", - "git_pull_url": "git://gist.github.com/1.git", - "git_push_url": "git@gist.github.com:1.git", - "created_at": "2010-04-14T02:15:15Z" - } - ] - /orgs: - type: collection - get: - description: List all public organizations for a user. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "avatar_url": { - "type": "string" - } - } - ] - } - example: | - [ - { - "login": "github", - "id": 1, - "url": "https://api.github.com/orgs/github", - "avatar_url": "https://github.com/images/error/octocat_happy.gif" - } - ] - /repos: - type: collection - get: - description: List public repositories for the specified user. - queryParameters: - type: - enum: - - all - - public - - private - - forks - - sources - - member - default: all - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "id": { - "type": "integer" - }, - "owner": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "fork": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "clone_url": { - "type": "string" - }, - "git_url": { - "type": "string" - }, - "ssh_url": { - "type": "string" - }, - "svn_url": { - "type": "string" - }, - "mirror_url": { - "type": "string" - }, - "homepage": { - "type": "string" - }, - "language": { - "type": "string" - }, - "forks": { - "type": "integer" - }, - "forks_count": { - "type": "integer" - }, - "watchers": { - "type": "integer" - }, - "watchers_count": { - "type": "integer" - }, - "size": { - "type": "integer" - }, - "master_branch": { - "type": "string" - }, - "open_issues": { - "type": "integer" - }, - "open_issues_count": { - "type": "integer" - }, - "pushed_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "created_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - }, - "updated_at": { - "description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ", - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "id": 1296269, - "owner": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!", - "private": false, - "fork": true, - "url": "https://api.github.com/repos/octocat/Hello-World", - "html_url": "https://github.com/octocat/Hello-World", - "clone_url": "https://github.com/octocat/Hello-World.git", - "git_url": "git://github.com/octocat/Hello-World.git", - "ssh_url": "git@github.com:octocat/Hello-World.git", - "svn_url": "https://svn.github.com/octocat/Hello-World", - "mirror_url": "git://git.example.com/octocat/Hello-World", - "homepage": "https://github.com", - "language": null, - "forks": 9, - "forks_count": 9, - "watchers": 80, - "watchers_count": 80, - "size": 108, - "master_branch": "master", - "open_issues": 0, - "open_issues_count": 0, - "pushed_at": "2011-01-26T19:06:43Z", - "created_at": "2011-01-26T19:01:12Z", - "updated_at": "2011-01-26T19:14:43Z" - } - ] -/gitignore/templates: - type: collection - get: - description: | - Listing available templates. - List all templates available to pass as an option when creating a repository. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "": [ - { - "type": "string" - } - ] - } - example: | - [ - "Actionscript", - "Android", - "AppceleratorTitanium", - "Autotools", - "Bancha", - "C", - "C++" - ] - /{language}: - type: item - uriParameters: - language: - type: string - get: - description: Get a single template. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "source": { - "type": "string" - } - } - } - example: | - { - "name": "C", - "source": "# Object files\n*.o\n\n# Libraries\n*.lib\n*.a\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n" - } -/markdown: - type: base - post: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "text": { - "description": "The Markdown text to render", - "type": "string" - }, - "mode": { - "enum": [ - "markdown", - "gfm" - ] - }, - "context": { - "description": "The repository context, only taken into account when rendering as gfm.", - "type": "string" - } - }, - "required": [ - "text" - ] - } - responses: - 200: - body: - text/html: - example: | -

Hello world github/linguist#1 cool, and #1!

- /raw: - type: base - post: - body: - text/plain: - example: | -

Hello world github/linguist#1 cool, and #1!

- responses: - 200: - body: - text/html: - example: | -

Hello world github/linguist#1 cool, and #1!

-/networks/{ownerId}/{repoId}/events: - type: collection - uriParameters: - ownerId: - description: Id of the owner. - type: integer - repoId: - description: Id of repository. - type: integer - get: - description: List public events for a network of repositories. - responses: - 200: - body: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "type": "array", - "properties": [ - { - "properties": { - "type": { - "type": "string" - }, - "public": { - "type": "boolean" - }, - "payload": { - "properties": {}, - "type": "object" - }, - "repo": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "actor": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "org": { - "properties": { - "login": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "avatar_url": { - "type": "string" - }, - "gravatar_id": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "timestamp" - }, - "id": { - "type": "integer" - } - }, - "type": "object" - } - ] - } - example: | - [ - { - "type": "Event", - "public": true, - "payload": { - - }, - "repo": { - "id": 3, - "name": "octocat/Hello-World", - "url": "https://api.github.com/repos/octocat/Hello-World" - }, - "actor": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "org": { - "login": "octocat", - "id": 1, - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "somehexcode", - "url": "https://api.github.com/users/octocat" - }, - "created_at": "2011-09-06T17:26:27Z", - "id": "12345" - } - ] diff --git a/dist/examples/includes.raml b/dist/examples/includes.raml deleted file mode 100644 index d149dcad2..000000000 --- a/dist/examples/includes.raml +++ /dev/null @@ -1,48 +0,0 @@ -#%RAML 1.0 -title: Using XML and JSON Schema - -schemas: # can also be used with 'types' - PersonInline: | - { - "title": "Person Schema", - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "age": { - "description": "Age in years", - "type": "integer", - "minimum": 0 - } - }, - "required": ["firstName", "lastName"] - } - PersonInclude: !include person.json - -/person: - get: - responses: - 200: - body: - application/json: - schema: PersonInclude # can also be used with 'type' - post: - body: - application/json: - schema: | # can also be used with 'type' - { - "title": "Body Declaration Schema", - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - } - } - } diff --git a/dist/examples/inline-schema.raml b/dist/examples/inline-schema.raml deleted file mode 100644 index eec1b4ea0..000000000 --- a/dist/examples/inline-schema.raml +++ /dev/null @@ -1,47 +0,0 @@ -#%RAML 1.0 -title: Using XML and JSON Schema - -types: # can also be used with 'types' - PersonInline: | - { - "title": "Person Schema", - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "age": { - "description": "Age in years", - "type": "integer", - "minimum": 0 - } - }, - "required": ["firstName", "lastName"] - } - -/person: - get: - responses: - 200: - body: - application/json: - type: PersonInline # can also be used with 'type' - post: - body: - application/json: - type: | # can also be used with 'type' - { - "title": "Body Declaration Schema", - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - } - } - } diff --git a/dist/examples/instagram.raml b/dist/examples/instagram.raml deleted file mode 100644 index 4beb4ccf8..000000000 --- a/dist/examples/instagram.raml +++ /dev/null @@ -1,3369 +0,0 @@ -#%RAML 0.8 ---- -title: Instagram API -version: v1 -baseUri: https://api.instagram.com/{version} -securitySchemes: - - oauth_2_0: - description: | - Instagram’s API uses the OAuth 2.0 protocol for simple, but effective - authentication and authorization. The one thing to keep in mind is that - all requests to the API must be made over SSL (https:// not http://) - type: OAuth 2.0 - describedBy: - queryParameters: - access_token: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "Authorization" header - type: string - settings: - authorizationUri: https://api.instagram.com/oauth/authorize - accessTokenUri: https://api.instagram.com/oauth/access_token - authorizationGrants: [ code, token ] - scopes: - - basic - - comments - - relationships - - likes -securedBy: [ oauth_2_0 ] -mediaType: application/json -traits: - - limitableById: - queryParameters: - min_id: - description: Return media later than this min_id. - type: integer - max_id: - description: Return media earlier than this max_id. - type: integer - - limitableByTime: - queryParameters: - max_timestamp: - description: Return media before this UNIX timestamp. - type: integer - min_timestamp: - description: Return media after this UNIX timestamp. - type: integer -resourceTypes: - - base: - get?: - queryParameters: - callback: - description: | - Callback function name. All output will be wrapper under this function name. - type: string - example: callbackFunction - required: false - count: - description: Number of items you would like to receive. - type: integer - example: 1 - required: false - responses: - 503: - description: | - Server Unavailable. Check Your Rate Limits. - post?: - responses: - 503: - description: | - Server Unavailable. Check Your Rate Limits. - delete?: - responses: - 503: - description: | - Server Unavailable. Check Your Rate Limits. -documentation: - - title: Authentication - content: | - Instagram’s API uses the [OAuth 2.0 protocol](http://tools.ietf.org/html/draft-ietf-oauth-v2-12) for simple, but effective authentication and authorization. OAuth 2.0 is much easier to use than previous schemes; developers can start using the Instagram API almost immediately. The one thing to keep in mind is that all requests to the API must be made over SSL (https:// not http://) - - ## Do you need to authenticate? - - For the most part, Instagram’s API only requires the use of a _client_id). A client_id simply associates your server, script, or program with a specific application. However, some requests require authentication - specifically requests made on behalf of a user. Authenticated requests require an _access_token_. These tokens are unique to a user and should be stored securely. Access tokens may expire at any time in the future. - - Note that in many situations, you may not need to authenticate users at all. For instance, you may request popular photos without authenticating (i.e. you do not need to provide an access_token; just use your client ID with your request). We only require authentication in cases where your application is making requests on behalf of a user (commenting, liking, browsing a user’s feed, etc.). - - ## Receiving an access_token - - In order to receive an access_token, you must do the following: - - - Direct the user to our authorization url. - * If the user is not logged in, they will be asked to log in. - * The user will be asked if they’d like to give your application access to his/her Instagram data. - - The server will redirect the user in one of two ways that you choose: - * *Server-side* flow (reccommended):Redirect the user to a URI of your choice. Take the provided - code parameter and exchange it for an access_token by POSTing the code to our access_token url. - * *Implicit flow*: Instead of handling a code, we include the access_token as a fragment (#) in the URL. This method allows applications without any server component to receive an access_token with ease. - - ## Server-side (Explicit) Flow - - Using the server-side flow is quite easy. Simply follow these steps: - - ### Step One: Direct your user to our authorization URL - - ``` - https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code - ``` - - *Note:* You may provide an optional *scope* parameter to request additional permissions outside of the “basic” permissions scope. [Learn more about scope](http://instagram.com/developer/authentication/#scope). - - *Note*: You may provide an optional *state* parameter to carry through any server-specific state you need to, for example, protect against CSRF issues. - - At this point, we present the user with a login screen and then a confirmation screen where they approve your app’s access to his/her Instagram data. - - ### Step Two: Receive the redirect from Instagram - - Once a user successfully authenticates and authorizes your application, we will redirect the user to your redirect_uri with a code parameter that you’ll use in step three. - - ``` - http://your-redirect-uri?code=CODE - ``` - - Note that your redirect URI's host and path MUST match exactly (including trailing slashes) to your registered redirect_uri. You may also include additional query parameters in the supplied redirect_uri, if you need to vary your behavior dynamically. Examples: - - |REGISTERED REDIRECT URI |REDIRECT URI SENT TO /AUTHORIZE |VALID?| - |----------------------------------|-----------------------------------------------|------| - |http://yourcallback.com/ |http://yourcallback.com/ |yes | - |http://yourcallback.com/ |http://yourcallback.com/?this=that |yes | - |http://yourcallback.com/?this=that|http://yourcallback.com/ |no | - |http://yourcallback.com/?this=that|http://yourcallback.com/?this=that&another=true|yes | - |http://yourcallback.com/?this=that|http://yourcallback.com/?another=true&this=that|no | - |http://yourcallback.com/callback |http://yourcallback.com/ |no | - |http://yourcallback.com/callback |http://yourcallback.com/callback/?type=mobile |yes | - - If your request for approval is denied by the user, then we will redirect the user to your *redirect_uri* with the following parameters: - - * *error*: access_denied - - * *error_reason*: user_denied - - * *error_description*: The user denied your request - - ``` - http://your-redirect-uri?error=access_denied&error_reason=user_denied&error_description=The+user+denied+your+request - ``` - - It is your responsibility to fail gracefully in this situation and display a corresponding error message to your user. - - ### Step Three: Request the access_token - - In the previous step, you’ll have received a code which you’ll have to exchange in order to receive an access_token for the user. In order to make this exchange, you simply have to POST this code, along with some app identification parameters to our access_token endpoint. Here are the required parameters: - - * *client_id*: your client id - * *client_secret*: your client secret - * *grant_type*: authorization_code is currently the only supported value - redirect_uri: the redirect_uri you used in the authorization request. Note: this has to be the same value as in the authorization request. - * *code*: the exact code you received during the authorization step. - - For example, you could request an access_token like so: - - ``` - curl \-F 'client_id=CLIENT-ID' \ - -F 'client_secret=CLIENT-SECRET' \ - -F 'grant_type=authorization_code' \ - -F 'redirect_uri=YOUR-REDIRECT-URI' \ - -F 'code=CODE' \https://api.instagram.com/oauth/access_token - ``` - - If successful, this call will return a neatly packaged OAuth Token that you can use to make authenticated calls to the API. We also include the user who just authenticated for your convenience: - - ```json - { - "access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d", - "user": { - "id": "1574083", - "username": "snoopdogg", - "full_name": "Snoop Dogg", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg" - } - } - ``` - - Note that we do not include an expiry time. Our access_tokens have no explicit expiry, though your app should handle the case that either the user revokes access or we expire the token after some period of time. In this case, your response’s meta will contain an “error_type=OAuthAccessTokenError”. In other words: do do not assume your access_token is valid forever. - - ## Client-Side (Implicit) Authentication - - If you’re building an app that does not have a server component (a purely javascript app, for instance), you’ll notice that it’s impossible to complete step three above to receive your access_token without also having to ship your client secret. You should never ship your client secret onto devices you don’t control. Then how do you get an access_token? Well the smart folks in charge of the OAuth 2.0 spec anticipated this problem and created the Implicit Authentication Flow. - - ### Step One: Direct your user to our authorization URL - - ``` - https://instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token - ``` - - At this point, we present the user with a login screen and then a confirmation screen where they approve your app’s access to their Instagram data. Note that unlike the explicit flow the response type here is “token”. - - ### Step Two: Receive the access_token via the URL fragment - - Once the user has authenticated and then authorized your application, we’ll redirect them to your redirect_uri with the access_token in the url fragment. It’ll look like so: - - ``` - http://your-redirect-uri#access_token=ACCESS-TOKEN - ``` - - Simply grab the access_token off the URL fragment and you’re good to go. If the user chooses not to authorize your application, you’ll receive the same error response as in the explicit flow - - ## Scope (Permissions) - - The OAuth 2.0 spec allows you to specify the scope of the access you’re requesting from the user. Currently, all apps have basic read access by default. If all you want to do is access data then you do not need to specify a scope (the “basic” scope will be granted automatically). - - However, if you plan on asking for extended access such as liking, commenting, or managing friendships, you’ll have to specify these scopes in your authorization request. Here are the scopes we currently support: - - * basic - to read any and all data related to a user (e.g. following/followed-by lists, photos, etc.) (granted by default) - * comments - to create or delete comments on a user’s behalf - * relationships - to follow and unfollow users on a user’s behalf - * likes - to like and unlike items on a user’s behalf - - You should only request the scope you need at the time of authorization. If in the future you require additional scope, you may forward the user to the authorization URL with that additional scope to be granted. If you attempt to perform a request with an access token that isn’t authorized for that scope, you will receive an OAuthPermissionsException error return. - - If you’d like to request multiple scopes at once, simply separate the scopes by a space. In the url, this equates to an escaped space (“+”). So if you’re requesting the likes and comments permission, the parameter will look like this: - - ``` - scope=likes+comments - ``` - - Note that an empty scope parameter (scope=) is invalid; you must either omit the scope, or specify a non-empty scope list. -# Media -/media: - /{mediaId}: - uriParameters: - mediaId: - type: integer - type: base - get: - # TODO can be different outcomes, so need to define a couple of examples and - # a couple of schemas instead of given one for 'image'. - description: | - Get information about a media object. The returned type key will allow you - to differentiate between image and video media. - Note: if you authenticate with an OAuth Token, you will receive the - user_has_liked key which quickly tells you whether the current user has liked - this media item. - responses: - 200: - body: - schema: | - { "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": { - "type": "array", - "users_in_photo": [ - { - "properties": { - "user": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "position": { - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "type": "object" - } - }, - "type": "object" - } - ], - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "comments": { - "properties": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "caption": { - "type": "string" - }, - "likes": { - "properties": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "website": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - } - } - example: | - { - "data": { - "type": "image", - "users_in_photo": [{ - "user": { - "username": "kevin", - "full_name": "Kevin S", - "id": "3", - "profile_picture": "..." - }, - "position": { - "x": 0.315, - "y": 0.9111 - } - }], - "filter": "Walden", - "tags": [], - "comments": { - "data": [{ - "created_time": "1279332030", - "text": "Love the sign here", - "from": { - "username": "mikeyk", - "full_name": "Mikey Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }, - "id": "8" - }], - "count": 2 - }, - "caption": null, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mikeyk", - "id": "4", - "profile_picture": "..." - }] - }, - "link": "http://instagr.am/p/D/", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "...", - "bio": "...", - "website": "...", - "id": "3" - }, - "created_time": "1279340983", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_7.jpg", - "width": 612, - "height": 612 - } - }, - "id": "3", - "location": null - } - } - /comments: - securedBy: [ oauth_2_0: { scopes: [ comments ] } ] - type: base - get: - description: Get a full list of comments on a media. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "full_name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [ - { - "created_time": "1280780324", - "text": "Really amazing photo!", - "from": { - "username": "snoopdogg", - "profile_picture": "http://images.instagram.com/profiles/profile_16_75sq_1305612434.jpg", - "id": "1574083", - "full_name": "Snoop Dogg" - }, - "id": "420" - }, - ... - ] - } - post: - description: Create a comment on a media. Please email apidevelopers[at]instagram.com for access. - body: - application/x-www-form-urlencoded: - formParameters: - text: - description: Text to post as a comment on the media as specified in {mediaId}. - type: string - required: true - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "full_name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [ - { - "created_time": "1280780324", - "text": "Really amazing photo!", - "from": { - "username": "snoopdogg", - "profile_picture": "http://images.instagram.com/profiles/profile_16_75sq_1305612434.jpg", - "id": "1574083", - "full_name": "Snoop Dogg" - }, - "id": "420" - }, - ... - ] - } - /{commentId}: - type: base - uriParameters: - commentId: - type: integer - description: Idenifier of the comment - delete: - description: | - Remove a comment either on the authenticated user's media or authored by the authenticated user. - responses: - 200: - description: Comment removed. - /likes: - securedBy: [ oauth_2_0: { scopes: [ likes ] } ] - type: base - get: - description: | - Get a list of users who have liked this media. - Required scope: likes. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [{ - "username": "jack", - "first_name": "Jack", - "last_name": "Dorsey", - "type": "user", - "id": "66" - }, - { - "username": "sammyjack", - "first_name": "Sammy", - "last_name": "Jack", - "type": "user", - "id": "29648" - }] - } - post: - description: Set a like on this media by the currently authenticated user. - responses: - 201: - description: | - Successfully liked a media object - delete: - description: Remove a like on this media by the currently authenticated user. - responses: - 204: - description: | - Like removed succesfully - /search: - type: base - get: - is: [ limitableByTime ] - description: | - Search for media in a given area. The default time span is set to 5 days. - The time span must not exceed 7 days. Defaults time stamps cover the - last 5 days. - # TODO oneOf - queryParameters: - lat: - description: Latitude of the center search coordinate. If used, lng is required. - type: number - lng: - description: Longitude of the center search coordinate. If used, lat is required. - type: number - distance: - description: Default is 1km (distance=1000), max distance is 5km. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "oneOf": [ - { - "properties": { - "distance": { - "type": "number" - }, - "type": "array", - "users_in_photo": [ - { - "type": "string" - } - ], - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "comments": { - "properties": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "caption": { - "type": "string" - }, - "likes": { - "properties": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "distance": { - "type": "number" - }, - "type": "object", - "videos": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "users_in_photo": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "type": "array", - "comments": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "count": { - "type": "integer" - } - }, - "caption": { - "type": "string" - }, - "likes": { - "properties": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "website": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - } - } - ] - } - ], - "type": "array" - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [{ - "distance": 41.741369194629698, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "comments": { ... }, - "caption": null, - "likes": { ... }, - "link": "http://instagr.am/p/BQEEq/", - "user": { - "username": "mahaface", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1329896_75sq_1294131373.jpg", - "id": "1329896" - }, - "created_time": "1296251679", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_7.jpg", - "width": 612, - "height": 612 - } - }, - "id": "20988202", - "location": null - }, - ... - ] - } - /popular: - type: base - get: - description: | - Get a list of what media is most popular at the moment. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "oneOf": [ - { - "properties": { - "distance": { - "type": "number" - }, - "type": "array", - "users_in_photo": [ - { - "type": "string" - } - ], - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "comments": { - "properties": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "caption": { - "type": "string" - }, - "likes": { - "properties": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - }, - "type": "object" - }, - { - "properties": { - "distance": { - "type": "number" - }, - "type": "object", - "videos": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "users_in_photo": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "type": "array", - "comments": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "count": { - "type": "integer" - } - }, - "caption": { - "type": "string" - }, - "likes": { - "properties": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "type": "object" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "website": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - } - } - ] - } - ], - "type": "array" - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [{ - "distance": 41.741369194629698, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "comments": { ... }, - "caption": null, - "likes": { ... }, - "link": "http://instagr.am/p/BQEEq/", - "user": { - "username": "mahaface", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1329896_75sq_1294131373.jpg", - "id": "1329896" - }, - "created_time": "1296251679", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_7.jpg", - "width": 612, - "height": 612 - } - }, - "id": "20988202", - "location": null - }, - ... - ] - } -# Tags -/tags: - /{tagName}: - uriParameters: - tagName: - description: Name of tag. - type: string - type: base - get: - description: Get information about a tag object. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": { - "properties": { - "media_count": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - } - } - example: | - { - "data": { - "media_count": 472, - "name": "nofilter", - } - } - /media/recent: - type: base - get: - is: [ limitableById ] - description: | - Get a list of recently tagged media. Note that this media is ordered by when the media was tagged - with this tag, rather than the order it was posted. Use the max_tag_id and min_tag_id parameters - in the pagination response to paginate through these objects. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "data": [ - { - "type": "array", - "users_in_photo": [ - { - "type": "string" - } - ], - "filter": { - "type": "string" - }, - "tags": [ - { - "type": "string" - } - ], - "comments": { - "properties": { - "data": [ - { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array", - "count": { - "type": "integer" - } - }, - "type": "object" - }, - "caption": { - "properties": { - "created_time": { - "type": "string" - }, - "text": { - "type": "string" - }, - "from": { - "properties": { - "username": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "likes": { - "count": { - "type": "integer" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "profile_picture": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - }, - "link": { - "type": "string" - }, - "user": { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "full_name": { - "type": "string" - } - }, - "type": "object" - }, - "created_time": { - "type": "string" - }, - "images": { - "properties": { - "low_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "thumbnail": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - }, - "standard_resolution": { - "properties": { - "url": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - ], - "type": "array" - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [{ - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": ["snow"], - "comments": { - "data": [{ - "created_time": "1296703540", - "text": "Snow", - "from": { - "username": "emohatch", - "username": "Dave", - "id": "1242695" - }, - "id": "26589964" - }, - { - "created_time": "1296707889", - "text": "#snow", - "from": { - "username": "emohatch", - "username": "Emo Hatch", - "id": "1242695" - }, - "id": "26609649" - }], - "count": 3 - }, - "caption": { - "created_time": "1296703540", - "text": "#Snow", - "from": { - "username": "emohatch", - "id": "1242695" - }, - "id": "26589964" - }, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mike Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }] - }, - "link": "http://instagr.am/p/BWl6P/", - "user": { - "username": "emohatch", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg", - "id": "1242695", - "full_name": "Dave" - }, - "created_time": "1296703536", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_7.jpg", - "width": 612, - "height": 612 - } - }, - "id": "22699663", - "location": null - } - ] - } - /search: - type: base - get: - description: | - Search for tags by name. Results are ordered first as an exact match, then by popularity. - Short tags will be treated as exact matches. - queryParameters: - q: - description: | - A valid tag name without a leading #. - type: string - required: true - example: nofilter - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "media_count": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [ - { - "media_count": 43590, - "name": "snowy" - }, - { - "media_count": 3264, - "name": "snowyday" - }, - { - "media_count": 1880, - "name": "snowymountains" - }, - { - "media_count": 1164, - "name": "snowydays" - }, - { - "media_count": 776, - "name": "snowyowl" - }, - { - "media_count": 680, - "name": "snowynight" - }, - { - "media_count": 568, - "name": "snowylebanon" - }, - { - "media_count": 522, - "name": "snowymountain" - }, - { - "media_count": 490, - "name": "snowytrees" - }, - { - "media_count": 260, - "name": "snowynights" - }, - { - "media_count": 253, - "name": "snowyegret" - }, - { - "media_count": 223, - "name": "snowytree" - }, - { - "media_count": 214, - "name": "snowymorning" - }, - { - "media_count": 212, - "name": "snowyweather" - }, - { - "media_count": 161, - "name": "snowyoursupport" - }, - { - "media_count": 148, - "name": "snowyrange" - }, - { - "media_count": 136, - "name": "snowynui3z" - }, - { - "media_count": 128, - "name": "snowypeaks" - }, - { - "media_count": 124, - "name": "snowy_dog" - }, - { - "media_count": 120, - "name": "snowyroad" - }, - { - "media_count": 108, - "name": "snowyoghurt" - }, - { - "media_count": 107, - "name": "snowyriver" - } - ], - "meta": { - "code": 200 - } - } -# Users -/users: - /{userId}: - uriParameters: - userId: - type: integer - type: base - get: - description: Get basic information about a user. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": { - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "website": { - "type": "string" - }, - "counts": { - "properties": { - "media": { - "type": "integer" - }, - "follows": { - "type": "integer" - }, - "followed_by": { - "type": "integer" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - } - example: | - { - "data": { - "id": "1574083", - "username": "snoopdogg", - "full_name": "Snoop Dogg", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg", - "bio": "This is my bio", - "website": "http://snoopdogg.com", - "counts": { - "media": 1320, - "follows": 420, - "followed_by": 3410 - } - } - } - # Follows - /follows: - securedBy: [ oauth_2_0: { scopes: [ relationships ] } ] - type: base - get: - description: Get the list of users this user follows. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "last_name": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [{ - "username": "jack", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg", - "id": "66", - "last_name": "Dorsey" - }, - { - "username": "sammyjack", - "first_name": "Sammy", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg", - "id": "29648", - "last_name": "Jack" - }, - { - "username": "jacktiddy", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg", - "id": "13096", - "last_name": "Tiddy" - }] - } - # Followed by - /followed-by: - securedBy: [ oauth_2_0: { scopes: [ relationships ] } ] - type: base - get: - description: Get the list of users this user is followed by. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "last_name": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [{ - "username": "jack", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg", - "id": "66", - "last_name": "Dorsey" - }, - { - "username": "sammyjack", - "first_name": "Sammy", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg", - "id": "29648", - "last_name": "Jack" - }, - { - "username": "jacktiddy", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg", - "id": "13096", - "last_name": "Tiddy" - }] - } - # Requested by - /self/requested-by: - securedBy: [ oauth_2_0: { scopes: [ relationships ] } ] - get: - description: List the users who have requested this user's permission to follow. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [ - { - "username": "mikeyk", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_4_75sq_1292324747_debug.jpg", - "id": "4" - } - ] - } - /media/recent: - type: base - get: - is: [ limitableById, limitableByTime ] - description: | - See the authenticated user's feed. May return a mix of both image and - video types. - responses: - 200: - body: - example: | - { - "data": [{ - "location": { - "id": "833", - "latitude": 37.77956816727314, - "longitude": -122.41387367248539, - "name": "Civic Center BART" - }, - "comments": { - "count": 16, - "data": [ ... ] - }, - "caption": null, - "link": "http://instagr.am/p/BXsFz/", - "likes": { - "count": 190, - "data": [{ - "username": "shayne", - "full_name": "Shayne Sweeney", - "id": "20", - "profile_picture": "..." - }, {...subset of likers...}] - }, - "created_time": "1296748524", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "id": "22987123", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - } - }, - { - "videos": { - "low_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4", - "width": 480, - "height": 480 - }, - "standard_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4", - "width": 640, - "height": 640 - }, - "comments": { - "data": [{ - "created_time": "1279332030", - "text": "Love the sign here", - "from": { - "username": "mikeyk", - "full_name": "Mikey Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }, - "id": "8" - }, - { - "created_time": "1279341004", - "text": "Chilako taco", - "from": { - "username": "kevin", - "full_name": "Kevin S", - "id": "3", - "profile_picture": "..." - }, - "id": "3" - }], - "count": 2 - }, - "caption": null, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mikeyk", - "id": "4", - "profile_picture": "..." - }] - }, - "link": "http://instagr.am/p/D/", - "created_time": "1279340983", - "images": { - "low_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "video", - "users_in_photo": null, - "filter": "Vesper", - "tags": [], - "id": "363839373298", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - }, - "location": null - }, - ...] - } - /relationship: - securedBy: [ oauth_2_0: { scopes: [ relationships ] } ] - type: base - get: - description: Get information about a relationship to another user. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": { - "properties": { - "outgoing_status": { - "enum": [ - "follows", - "requested", - "none" - ] - }, - "incoming_status": { - "enum": [ - "followed_by", - "requested_by", - "blocked_by_you", - "none" - ] - } - }, - "type": "object" - } - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": { - "outgoing_status": "none", - "incoming_status": "requested_by" - } - } - post: - description: Modify the relationship between the current user and the target user. - body: - formParameters: - action: - description: One of follow/unfollow/block/unblock/approve/deny. - enum: - - follow - - unfollow - - block - - unblock - - approve - - deny - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": { - "properties": { - "outgoing_status": { - "enum": [ - "follows", - "requested", - "none" - ] - }, - "incoming_status": { - "enum": [ - "followed_by", - "requested_by", - "blocked_by_you", - "none" - ] - } - }, - "type": "object" - } - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": { - "outgoing_status": "none", - "incoming_status": "requested_by" - } - } - /search: - type: base - get: - description: Search for a user by name. - queryParameters: - q: - description: A query string. - type: string - required: true - count: - description: Number of users to return. - type: integer - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "data": [ - { - "properties": { - "username": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "profile_picture": { - "type": "string" - }, - "id": { - "type": "string" - }, - "last_name": { - "type": "string" - } - }, - "type": "object" - } - ], - "type": "array" - } - } - example: | - { - "data": [{ - "username": "jack", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg", - "id": "66", - "last_name": "Dorsey" - }, - { - "username": "sammyjack", - "first_name": "Sammy", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg", - "id": "29648", - "last_name": "Jack" - }, - { - "username": "jacktiddy", - "first_name": "Jack", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg", - "id": "13096", - "last_name": "Tiddy" - }] - } - /self: - /feed: - type: base - get: - is: [ limitableById ] - description: | - See the authenticated user's feed. May return a mix of both image and - video types. - responses: - 200: - body: - example: | - { - "data": [{ - "location": { - "id": "833", - "latitude": 37.77956816727314, - "longitude": -122.41387367248539, - "name": "Civic Center BART" - }, - "comments": { - "count": 16, - "data": [ ... ] - }, - "caption": null, - "link": "http://instagr.am/p/BXsFz/", - "likes": { - "count": 190, - "data": [{ - "username": "shayne", - "full_name": "Shayne Sweeney", - "id": "20", - "profile_picture": "..." - }, {...subset of likers...}] - }, - "created_time": "1296748524", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "id": "22987123", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - } - }, - { - "videos": { - "low_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4", - "width": 480, - "height": 480 - }, - "standard_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4", - "width": 640, - "height": 640 - }, - "comments": { - "data": [{ - "created_time": "1279332030", - "text": "Love the sign here", - "from": { - "username": "mikeyk", - "full_name": "Mikey Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }, - "id": "8" - }, - { - "created_time": "1279341004", - "text": "Chilako taco", - "from": { - "username": "kevin", - "full_name": "Kevin S", - "id": "3", - "profile_picture": "..." - }, - "id": "3" - }], - "count": 2 - }, - "caption": null, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mikeyk", - "id": "4", - "profile_picture": "..." - }] - }, - "link": "http://instagr.am/p/D/", - "created_time": "1279340983", - "images": { - "low_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "video", - "users_in_photo": null, - "filter": "Vesper", - "tags": [], - "id": "363839373298", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - }, - "location": null - }, - ...] - } - /media/liked: - type: base - get: - description: | - See the authenticated user's list of media they've liked. May return a mix - of both image and video types. - Note: This list is ordered by the order in which the user liked the media. - Private media is returned as long as the authenticated user has permission - to view that media. Liked media lists are only available for the currently - authenticated user. - queryParameters: - max_like_id: - description: Return media liked before this id. - type: integer - responses: - 200: - body: - example: | - { - "data": [{ - "location": { - "id": "833", - "latitude": 37.77956816727314, - "longitude": -122.41387367248539, - "name": "Civic Center BART" - }, - "comments": { - "count": 16, - "data": [ ... ] - }, - "caption": null, - "link": "http://instagr.am/p/BXsFz/", - "likes": { - "count": 190, - "data": [{ - "username": "shayne", - "full_name": "Shayne Sweeney", - "id": "20", - "profile_picture": "..." - }, {...subset of likers...}] - }, - "created_time": "1296748524", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "id": "22987123", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - } - }, - { - "videos": { - "low_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4", - "width": 480, - "height": 480 - }, - "standard_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4", - "width": 640, - "height": 640 - }, - "comments": { - "data": [{ - "created_time": "1279332030", - "text": "Love the sign here", - "from": { - "username": "mikeyk", - "full_name": "Mikey Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }, - "id": "8" - }, - { - "created_time": "1279341004", - "text": "Chilako taco", - "from": { - "username": "kevin", - "full_name": "Kevin S", - "id": "3", - "profile_picture": "..." - }, - "id": "3" - }], - "count": 2 - }, - "caption": null, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mikeyk", - "id": "4", - "profile_picture": "..." - }] - }, - "link": "http://instagr.am/p/D/", - "created_time": "1279340983", - "images": { - "low_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "video", - "users_in_photo": null, - "filter": "Vesper", - "tags": [], - "id": "363839373298", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - }, - "location": null - }, - ...] - } -# Oembed -/oembed: - type: base - get: - description: | - Given a short link, returns information about the media associated with - that link. - queryParameters: - url: - type: string - maxheight: - type: integer - maxwidth: - type: integer - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "author_id": { - "type": "integer" - }, - "author_name": { - "type": "string" - }, - "author_url": { - "type": "string" - }, - "height": { - "type": "integer" - }, - "media_id": { - "type": "string" - }, - "provider_name": { - "type": "string" - }, - "provider_url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "version": { - "type": "string" - }, - "width": { - "type": "integer" - } - } - } - example: | - { - "author_id": 72, - "author_name": "danrubin", - "author_url": "http://instagram.com/", - "height": 612, - "media_id": "5382_72", - "provider_name": "Instagram", - "provider_url": "http://instagram.com/", - "title": "Rays", - "type": "photo", - "url": "http://distillery.s3.amazonaws.com/media/2010/10/02/7e4051fdcf1d45ab9bc1fba2582c0c6b_7.jpg", - "version": "1.0", - "width": 612 - } -/p/{shortcode}/media: - uriParameters: - shortcode: - type: string - required: true - type: base - get: - description: | - Given a short link, issues a redirect to that media's JPG file. - queryParameters: - size: - enum: - - t, - - m, - - l - default: m - responses: - 302: - body: - text/html: - example: | - HTTP/1.1 302 FOUND - Location: http://distillery.s3.amazonaws.com/media/2010/10/02/7e4051fdcf1d45ab9bc1fba2582c0c6b_6.jpg -# Locations -/locations: - /{locId}: - uriParameters: - locId: - type: integer - get: - description: Get information about a location. - /media/recent: - type: base - get: - is: [ limitableById, limitableByTime ] - description: | - Get a list of recent media objects from a given location. May return a - mix of both image and video types. - responses: - 200: - body: - example: | - { - "data": [{ - "location": { - "id": "833", - "latitude": 37.77956816727314, - "longitude": -122.41387367248539, - "name": "Civic Center BART" - }, - "comments": { - "count": 16, - "data": [ ... ] - }, - "caption": null, - "link": "http://instagr.am/p/BXsFz/", - "likes": { - "count": 190, - "data": [{ - "username": "shayne", - "full_name": "Shayne Sweeney", - "id": "20", - "profile_picture": "..." - }, {...subset of likers...}] - }, - "created_time": "1296748524", - "images": { - "low_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "image", - "users_in_photo": [], - "filter": "Earlybird", - "tags": [], - "id": "22987123", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - } - }, - { - "videos": { - "low_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4", - "width": 480, - "height": 480 - }, - "standard_resolution": { - "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4", - "width": 640, - "height": 640 - }, - "comments": { - "data": [{ - "created_time": "1279332030", - "text": "Love the sign here", - "from": { - "username": "mikeyk", - "full_name": "Mikey Krieger", - "id": "4", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg" - }, - "id": "8" - }, - { - "created_time": "1279341004", - "text": "Chilako taco", - "from": { - "username": "kevin", - "full_name": "Kevin S", - "id": "3", - "profile_picture": "..." - }, - "id": "3" - }], - "count": 2 - }, - "caption": null, - "likes": { - "count": 1, - "data": [{ - "username": "mikeyk", - "full_name": "Mikeyk", - "id": "4", - "profile_picture": "..." - }] - }, - "link": "http://instagr.am/p/D/", - "created_time": "1279340983", - "images": { - "low_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg", - "width": 306, - "height": 306 - }, - "thumbnail": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg", - "width": 150, - "height": 150 - }, - "standard_resolution": { - "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg", - "width": 612, - "height": 612 - } - }, - "type": "video", - "users_in_photo": null, - "filter": "Vesper", - "tags": [], - "id": "363839373298", - "user": { - "username": "kevin", - "full_name": "Kevin S", - "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg", - "id": "3" - }, - "location": null - }, - ...] - } - /search: - type: base - get: - #TODO oneOf - description: Search for a location by geographic coordinate. - queryParameters: - lat: - description: Latitude of the center search coordinate. If used, lng is required. - type: number - lng: - description: Longitude of the center search coordinate. If used, lat is required. - type: number - distance: - description: Default is 1000m (distance=1000), max distance is 5000. - type: integer - maximum: 5000 - default: 1000 - foursquare_v2_id: - description: | - Returns a location mapped off of a foursquare v2 api location id. If - used, you are not required to use lat and lng. - foursquare_id: - description: | - Returns a location mapped off of a foursquare v1 api location id. If used, - you are not required to use lat and lng. Note that this method is deprecated; - you should use the new foursquare IDs with V2 of their API. - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "meta": { - "properties": { - "code": { - "type": "integer" - } - }, - "type": "object" - }, - "data": [ - { - "properties": { - "latitude": { - "type": "number" - }, - "id": { - "type": "string" - }, - "longitude": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "meta": { - "code": 200 - }, - "data": [ - { - "latitude": 48.850059509, - "id": "125983371", - "longitude": 2.294613838, - "name": "cairo universty, ElSheikh Zaid branch" - }, - { - "latitude": 48.850191, - "id": "46295095", - "longitude": 2.294195, - "name": "82 Boulevard De Grenelle" - }, - { - "latitude": 48.850232, - "id": "17463171", - "longitude": 2.294276, - "name": "Monan chaussure" - }, - { - "latitude": 48.849993048, - "id": "58664053", - "longitude": 2.294816312, - "name": "Rue Juge" - }, - { - "latitude": 48.850235602, - "id": "3277432", - "longitude": 2.294731778, - "name": "Pizza Di Napoli" - }, - { - "latitude": 48.85030795, - "id": "3632655", - "longitude": 2.294114341, - "name": "Marche Grenelle" - }, - { - "latitude": 48.850311575, - "id": "47202559", - "longitude": 2.294123981, - "name": "London Styl'" - }, - { - "latitude": 48.84975, - "id": "16095374", - "longitude": 2.294726, - "name": "Sami Coiffure 2000" - } - ] - } -# Geo -/geographies/{geoId}/media/recent: - type: base - uriParameters: - geoId: - type: integer - get: - description: | - Get recent media from a geography subscription that you created. - Note: You can only access Geographies that were explicitly created by your - OAuth client. Check the Geography Subscriptions section of the real-time - updates page. When you create a subscription to some geography that you - define, you will be returned a unique geo-id that can be used in this - query. To backfill photos from the location covered by this geography, - use the media search endpoint. - queryParameters: - min_id: - description: Return media before this min_id. - type: integer diff --git a/dist/examples/leagues.raml b/dist/examples/leagues.raml deleted file mode 100644 index ab06fb1e5..000000000 --- a/dist/examples/leagues.raml +++ /dev/null @@ -1,709 +0,0 @@ -#%RAML 0.8 -title: "La Liga" -version: "1.0" -baseUri: http://localhost:3000/api - -protocols: [ HTTP, HTTPS ] - -securitySchemes: - - basic: - type: Basic Authentication - - digest_auth: - type: Digest Authentication - - oauth_2_0: - description: | - OAuth2 is a protocol that lets external apps request authorization to private details in a user's GitHub account without getting their password. This is preferred over Basic Authentication because tokens can be limited to specific types of data, and can be revoked by users at any time. - type: OAuth 2.0 - describedBy: - headers: - Authorization: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "access_token" query string parameter. - type: string - queryParameters: - access_token: - description: | - Used to send a valid OAuth 2 access token. Do not use together with - the "Authorization" header - type: string - responses: - 404: - description: Unauthorized - settings: - authorizationUri: https://leagues.com/login/oauth/authorize - accessTokenUri: https://leagues.com/login/oauth/access_token - authorizationGrants: [ code, credentials, owner ] - scopes: - - "user" - - "league" - - custom_scheme_1: - type: x-custom - describedBy: - headers: - auth: - type: string - required: true - queryParameters: - access_token: - type: string - - custom_scheme_2: - type: x-custom - describedBy: - headers: - auth: - -resourceTypes: - - base: {} - -traits: - - filterable: {} - -securedBy: [ null, basic, digest_auth, oauth_2_0, custom_scheme_1, custom_scheme_2 ] - -/async: - post: - queryParameters: - queryParam: - type: string - enum: - - value - required: true - $foo: - maxLength: 35 - required: true - example: hola - headers: - header: - type: string - enum: - - value - required: false - body: - application/x-www-form-urlencoded: - formParameters: - formParam: - type: string - enum: - - value - required: false - -/teams: - type: base - is: [filterable] - displayName: Teams - description: | - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sagittis ipsum felis, sed aliquam massa egestas vel. Sed scelerisque leo lorem, a gravida enim congue eget. Sed rutrum quis odio vitae sollicitudin. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc pulvinar arcu at diam pharetra finibus. Curabitur malesuada hendrerit odio id consectetur. Etiam felis augue, malesuada ut turpis vel, tincidunt sodales justo. Donec quam eros, accumsan ut elementum et, euismod placerat ligula. Phasellus consequat velit lacus. Aenean vel massa et sapien molestie imperdiet et id ex. Nulla quis suscipit libero. - post: - securedBy: [ null, oauth_2_0: { scopes: [ read ] } ] - description: Delete an item by Code. - headers: - header: - displayName: header - example: header - type: - type: string - enum: [ Remote, Office ] - queryParameters: - startDate: - displayName: startDate - type: date - example: 2014-01-07 - param: - displayName: param - example: param - filter: - enum: - - assigned - - created - - mentioned - - subscribed - - all - body: - application/json: - schema: Items - example: | - { - "items": - [ - { - "id":123, - "code":"AD-12", - "color":"blue", - "size":"medium", - "description":"Borders in light blue" - }, - { - "id":321, - "code":"AD-13", - "color":"pink", - "size":"small", - "description":"Borders in red" - } - ] - } - application/x-www-form-urlencoded: - formParameters: - code: - displayName: Code - description: Code of the item to delete. - example: "ASX-140" - type: string - required: true - minLength: 3 - maxLength: 12 - department: - displayName: Department - type: string - enum: [Sales, Administration] - example: Sales - multipart/form-data: - formParameters: - code: - displayName: Code - description: Code of the item to delete. - example: "ASX-140" - type: string - required: true - minLength: 3 - maxLength: 12 - code2: - displayName: Code 2 - description: Code of the item to delete. - example: "ASX-140" - type: string - required: true - minLength: 3 - maxLength: 12 - department: - displayName: Department - type: string - enum: [Sales, Administration] - example: Sales - application/xml: - example: | - - 123 - AD-12 - blue - medium - something - - get: - description: | - *Obtain* information from a collection of teams simultaneously - headers: - header: - queryParameters: - city: - description: - Filter the list of teams by home city. - type: string - required: false - default: BAR - example: BAR - responses: - 200: - body: - application/json: - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "items": { - "description": "The team is the basic unit for keeping track of a roster of players. With the Team APIs, you can obtain team-related information, like the team name, stats, points, and more.", - "name": "Team", - "properties": { - "homeCity": { - "description": "Name of the city to which this team belongs", - "type": "string" - }, - "id": { - "description": "A three-letter code that identifies the team id", - "maxLength": 3, - "minLength": 3, - "type": "string" - }, - "name": { - "description": "Name of the team", - "type": "string" - }, - "required": [ - "id", - "name", - "homeCity" - ], - "stadium": { - "description": "Name of the stadium", - "type": "string" - } - }, - "type": "object" - }, - "name": "Teams", - "required": true, - "type": "array" - } - example: | - [{ - "name": "Athletic Bilbao", - "id": "ATH", - "homeCity": "Bilbao", - "stadium": "San Mames" - }, - { - "name": "Atletico Madrid", - "id": "ATL", - "homeCity": "Madrid", - "stadium": "Vicente Calderon" - }, - { - "name": "Barcelona", - "id": "BAR", - "homeCity": "Barcelona", - "stadium": "Camp Nou" - }, - { - "name": "Betis", - "id": "BET", - "homeCity": "Seville", - "stadium": "Benito Villamarin" - }, - { - "name": "Espanyol", - "id": "ESP", - "homeCity": "Barcelona", - "stadium": "Cornella-El Prat" - }, - { - "name": "Getafe", - "id": "GET", - "homeCity": "Getafe", - "stadium": "Coliseum Alfonso Perez" - }, - { - "name": "Granada", - "id": "GRA", - "homeCity": "Granada", - "stadium": "Nuevo Los Carmenes" - }, - { - "name": "Levante", - "id": "LEV", - "homeCity": "Valencia", - "stadium": "Ciutat de Valencia" - }, - { - "name": "Malaga", - "id": "MAL", - "homeCity": "Malaga", - "stadium": "La Roselda" - }, - { - "name": "Mallorca", - "id": "MAL", - "homeCity": "Palma", - "stadium": "Iberostar Stadium" - }, - { - "name": "Osasuna", - "id": "OSA", - "homeCity": "Pamplona", - "stadium": "El Sadar" - }, - { - "name": "Racing Santander", - "id": "RAC", - "homeCity": "Santander", - "stadium": "El Sardinero" - }, - { - "name": "Rayo Vallecano", - "id": "RAY", - "homeCity": "Madrid", - "stadium": "Campo de Vallecas" - }, - { - "name": "Real Madrid", - "id": "RMA", - "homeCity": "Madrid", - "stadium": "Santiago Bernabeu" - }, - { - "name": "Real Sociedad", - "id": "RSC", - "homeCity": "San Sebastian", - "stadium": "Anoeta" - }, - { - "name": "Sevilla", - "id": "SEV", - "homeCity": "Seville", - "stadium": "Ramon Sanchez Pizjuan" - }, - { - "name": "Sporting de Gijon", - "id": "SPG", - "homeCity": "Gijon", - "stadium": "El Molinon" - }, - { - "name": "Valencia", - "id": "VAL", - "homeCity": "Valencia", - "stadium": "Mestalla" - }, - { - "name": "Villareal", - "id": "VIL", - "homeCity": "Vila-real", - "stadium": "El Madrigal" - }, - { - "name": "Zaragoza", - "id": "ZAR", - "homeCity": "Zaragoza", - "stadium": "La Romareda" - }] - - /{teamId}: - displayName: Team - description: | - The team is the basic unit for keeping track of a roster of players that are participating together in La Liga. With the Team APIs, you can obtain team-related information, like the team name, stats, points, and more. - uriParameters: - teamId: - description: | - Three letter code that identifies the team. - type: string - minLength: 3 - maxLength: 3 - example: BAR - get: - description: Retrieve team-related information such as the name, the home city, the stadium, current position, and other statistical information about a team. - responses: - 200: - body: - application/json: - example: | - { - "name": "Barcelona", - "id": "BAR", - "homeCity": "Barcelona", - "stadium": "Camp Nou", - "matches": 24 - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "properties": { - "homeCity": { - "description": "Name of the city to which this team belongs", - "type": "string" - }, - "matches": { - "description": "The total number of matches that has been played by this team between all seasons", - "type": "integer", - "minimum": 0 - }, - "id": { - "description": "A three-letter code that identifies the team id", - "maxLength": 3, - "minLength": 3, - "type": "string" - }, - "name": { - "description": "Name of the team", - "type": "string" - }, - "required": [ - "id", - "name", - "homeCity" - ], - "stadium": { - "description": "Name of the stadium", - "type": "string" - } - }, - "type": "object", - "name": "Team" - } - 404: - description: | - Unable to find a team with that identifier - put: - description: Update team details such as the name of the home stadium, or the name of the team itself. - body: - application/json: - example: | - { - "name": "Barcelona", - "stadium": "Camp Nou" - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "properties": { - "homeCity": { - "description": "Name of the city to which this team belongs", - "type": "string" - }, - "name": { - "description": "Name of the team", - "type": "string" - }, - "stadium": { - "description": "Name of the stadium", - "type": "string" - } - }, - "type": "object", - "name": "Team" - } - responses: - 204: - description: | - The team has been succesfully updated - 404: - description: | - Unable to find a team with that identifier - delete: - description: Remove a team from the league. Notice that this operation is non-reversible and all data associated with the team, including its statistics will be lost. Use with caution. - responses: - 204: - description: | - The resource has been succesfully removed. - 404: - description: | - Unable to find a team with that identifier -/positions: - displayName: Position Table - description: | - Nam lacinia suscipit sapien id consectetur. Sed cursus luctus elit id dictum. Praesent vulputate dui ac nulla vehicula dignissim. Vestibulum iaculis lorem ut arcu ultrices, et dictum velit tincidunt. Sed iaculis turpis vel feugiat interdum. Fusce neque augue, lobortis vel purus mattis, condimentum mollis tortor. Donec ligula est, rutrum ut maximus in, commodo non orci. Nunc dapibus lectus sit amet risus vulputate porta. Aliquam ut ultrices neque. Phasellus ultrices ac nisl eu dignissim. Quisque non magna rhoncus, luctus urna quis, mollis dolor. Integer sit amet elit massa. Morbi molestie sapien ut lorem porta pellentesque. - get: - description: Retrieve the current standing for the current season - responses: - 200: - body: - application/json: - example: | - [{ - "position": 1, - "team": "BAR", - "points": 36, - "matchesPlayed": 12, - "matchesWon": 10, - "matchesDraw": 0, - "matchesLost": 2, - "goalsInFavor": 15, - "goalsAgainst": 6 - }, - { - "position": 2, - "team": "RMA", - "points": 34, - "matchesPlayed": 12, - "matchesWon": 11, - "matchesDraw": 1, - "matchesLost": 2, - "goalsInFavor": 14, - "goalsAgainst": 3 - }] - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "items": { - "description": "An standing position of a team whitin a tournament", - "name": "Position", - "properties": { - "position": { - "description": "Current ranking", - "type": "integer" - }, - "team": { - "description": "Code of the team in the current position", - "type": "string", - "maxLength": 3, - "minLength": 3 - }, - "points": { - "description": "Number of points accumulated to date", - "type": "integer" - }, - "matchesPlayed": { - "description": "Number of matches played to date", - "type": "integer" - }, - "matchesWon": { - "description": "Number of matches won to date", - "type": "integer" - }, - "matchesLost": { - "description": "Number of matches lost to date", - "type": "integer" - }, - "matchesDraw": { - "description": "Number of matches draw to date", - "type": "integer" - }, - "goalsInFavor": { - "description": "Number of goals scored against other teams", - "type": "integer" - }, - "goalsAgainst": { - "description": "Number of goals scored by other teams against this team", - "type": "integer" - } - }, - "type": "object" - }, - "name": "Positions", - "required": true, - "type": "array" - } - -/fixture: - displayName: Fixture - description: | - Sed nec enim mollis, tristique arcu at, ornare eros. Vivamus posuere tortor sit amet ipsum tempus, id vestibulum odio vulputate. Nunc fermentum sed metus sed viverra. Cras at maximus arcu. Donec lobortis faucibus blandit. Nunc et dolor accumsan mauris imperdiet pellentesque. Sed suscipit sem in interdum suscipit. Duis dapibus neque eget libero egestas, ut rutrum nisi congue. Maecenas auctor nec erat sit amet mattis. Morbi vestibulum ante lacus, a tempor risus tristique eu. Mauris euismod metus eget ligula pharetra, vehicula interdum nibh rutrum. Aenean semper turpis sed ligula congue egestas. Donec nec orci in arcu auctor accumsan. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur viverra est urna, vel convallis est hendrerit quis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. - get: - description: Retrieve a list of matches for the current season - responses: - 200: - body: - application/json: - example: | - [{ - "homeTeam": "BAR", - "awayTeam": "RMA", - "date": "2014-01-12T20:00:00" - }] - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "items": { - "description": "A match between two teams in the league.", - "name": "Match", - "properties": { - "homeTeam": { - "description": "Code of the home team", - "type": "string", - "maxLength": 3, - "minLength": 3 - }, - "awayTeam": { - "description": "Code of the away team", - "type": "string", - "maxLength": 3, - "minLength": 3 - }, - "date": { - "description": "The date on which the match will be played", - "type": "string", - "format": "date-time" - } - }, - "type": "object" - }, - "name": "Matches", - "required": true, - "type": "array" - } - - /{homeTeamId}/{awayTeamId}: - displayName: Match - uriParameters: - homeTeamId: - description: Id of the team that plays in its home stadium - type: string - minLength: 3 - maxLength: 3 - example: BAR - awayTeamId: - description: Id of the away team - type: string - minLength: 3 - maxLength: 3 - example: RMA - get: - description: Retrieve details of the match between the two teams - responses: - 200: - body: - application/json: - example: | - [{ - "homeTeam": "BAR", - "awayTeam": "RMA", - "date": "2014-01-12T20:00:00", - "homeTeamScore": 3, - "awayTeamScore": 0, - }] - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "properties": { - "homeTeam": { - "description": "Code of the home team", - "type": "string", - "maxLength": 3, - "minLength": 3 - }, - "awayTeam": { - "description": "Code of the away team", - "type": "string", - "maxLength": 3, - "minLength": 3 - }, - "date": { - "description": "The date on which the match will be played", - "type": "string", - "format": "date-time" - }, - "homeTeamScore": { - "description": "Goals scored by the home team", - "type": "integer" - }, - "awayTeamScore": { - "description": "Goals scored by the away tam", - "type": "integer" - } - }, - "required": true, - "type": "object" - } - put: - description: Update match results. Can only be done after the game has ended. - body: - application/json: - example: | - { - "homeTeamScore": 3, - "awayTeamScore": 0 - } - schema: | - { - "$schema": "http://json-schema.org/draft-03/schema", - "properties": { - "homeTeamScore": { - "description": "Goals scored by the home team", - "type": "integer" - }, - "awayTeamScore": { - "description": "Goals scored by the away tam", - "type": "integer" - } - }, - "required": true, - "type": "object" - } - - responses: - 204: - description: | - Match successfully updated - 404: - description: | - The match cannot be found - 409: - description: | - Cannot update match before the match is actually played. diff --git a/dist/examples/libraries/another-types.raml b/dist/examples/libraries/another-types.raml deleted file mode 100644 index b31f62598..000000000 --- a/dist/examples/libraries/another-types.raml +++ /dev/null @@ -1,10 +0,0 @@ -#%RAML 1.0 Library -# This file is located at libraries/file-type.raml - -types: - Thing: - type: object - properties: - name: - length: - type: integer diff --git a/dist/examples/libraries/file-type.raml b/dist/examples/libraries/file-type.raml deleted file mode 100644 index bd515a70b..000000000 --- a/dist/examples/libraries/file-type.raml +++ /dev/null @@ -1,31 +0,0 @@ -#%RAML 1.0 Library -# This file is located at libraries/file-type.raml - -uses: - another: ./another-types.raml - -types: - File: - type: object - properties: - name: - length: - type: integer - other: another.Thing - Image: - type: File - properties: - format: (Format | File)[] - Format: - type: object - properties: - type: string - Schema: | - { - "type": "object", - "properties": [ - { - "name": "string" - } - ] - } diff --git a/dist/examples/libraries/person-schema.raml b/dist/examples/libraries/person-schema.raml deleted file mode 100644 index 4dbc4e057..000000000 --- a/dist/examples/libraries/person-schema.raml +++ /dev/null @@ -1,12 +0,0 @@ -#%RAML 1.0 Library -# This file is located at libraries/person-schema.raml -schemas: - Person: | - { - "type": "object", - "properties": [ - { - "name": "string" - } - ] - } diff --git a/dist/examples/libraries/security.raml b/dist/examples/libraries/security.raml deleted file mode 100644 index 28791103f..000000000 --- a/dist/examples/libraries/security.raml +++ /dev/null @@ -1,19 +0,0 @@ -#%RAML 1.0 Library - -securitySchemes: - oauth_2_0: - type: OAuth 2.0 - describedBy: - headers: - Authorization: - type: string - queryParameters: - access_token: - type: string - responses: - 404: - description: Unauthorized - settings: - authorizationUri: https://acme.com/login/oauth/authorize - accessTokenUri: https://acme.com/login/oauth/access_token - authorizationGrants: [ authorization_code ] diff --git a/dist/examples/libraries/type.raml b/dist/examples/libraries/type.raml deleted file mode 100644 index c385daa12..000000000 --- a/dist/examples/libraries/type.raml +++ /dev/null @@ -1,7 +0,0 @@ -#%RAML 1.0 Library -# This file is located at libraries/type.raml - -types: - Type: - properties: - one: string diff --git a/dist/examples/library-security.raml b/dist/examples/library-security.raml deleted file mode 100644 index ab8825f7d..000000000 --- a/dist/examples/library-security.raml +++ /dev/null @@ -1,12 +0,0 @@ -#%RAML 1.0 -title: API with Library -version: 1 - -baseUri: http://localhost - -uses: - security: libraries/security.raml - -/test: - securedBy: [security.oauth_2_0] - post: diff --git a/dist/examples/library.raml b/dist/examples/library.raml deleted file mode 100644 index 1c93997b8..000000000 --- a/dist/examples/library.raml +++ /dev/null @@ -1,34 +0,0 @@ -#%RAML 1.0 -title: API with Library -version: 1 - -uses: - file-type: libraries/file-type.raml - person-schema: libraries/person-schema.raml - -schemas: - Player: | - { - "type": "object", - "properties": [ - { - "name": "string" - } - ] - } - -/test: - get: - responses: - 201: - body: - application/json: - type: file-type.File - 203: - body: - application/json: - schema: person-schema.Person - 204: - body: - application/json: - type: file-type.Schema diff --git a/dist/examples/linkedin.raml b/dist/examples/linkedin.raml deleted file mode 100644 index b92fda0f5..000000000 --- a/dist/examples/linkedin.raml +++ /dev/null @@ -1,2671 +0,0 @@ -#%RAML 0.8 ---- -title: LinkedIn REST API -version: v1 -baseUri: https://api.linkedin.com/{version} -resourceTypes: - - fieldSelectors: - usage: | - Use this resource type when field selectors exist in resource path - type: baseResource - description: | - Describes field selectors uri path parameter - uriParameters: - fieldSelectors: - displayName: Field Selectors - description: | - Many of our resources allow you to specify what fields you want returned. We call this syntax field selectors. - By indicating exactly the information you need, we can optimize the amount of time needed to return your results. - It also reduces the amount of data passing across the wire. The two combine to make our APIs speedy and efficient, - a critical factor in any web application, and more so for anyone relying on external APIs. - - Field selectors are specified after the resource identifiers and path components of a resource, prefixed by a colon, - contained within parenthesis, and separated by commas. Fields will be returned in the order specified. When URL-encoding - your resource URLs, ensure that the parenthesis used in selectors remain unescaped. - - Examples - -------- - To get a member's ID, first name, last name, and industry: - `http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry)` - - Or the same set of information for their connections: - `http://api.linkedin.com/v1/people/~/connections:(id,first-name,last-name,industry)` - - Fields selectors can also be nested to access individual fields from a larger collection. For example, to get just the - job titles and not the rest of the information about positions: - `http://api.linkedin.com/v1/people/~/connections:(id,first-name,last-name,positions:(title))` - - Field selectors with resource identifiers allow you to request information about multiple entities at once. Specify them - similarly, but append a double colon - here's an example getting profile information about thee members: the first is the - current member, indicated by a tilde; the next has an id of 12345; and the last has a public profile URL - - `http://api.linkedin.com/v1/people::(~, id=12345,url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fadamnash)` - type: string - example: :(id,first-name,last-name,industry) - #TODO: add validation for URI path parameter, probably pattern - - baseResource: - usage: | - All LinkedIn resources should use it - description: | - This is base resource type described common request and response headers and error response codes - get?: &common - headers: - x-li-format: - description: | - Type of data - type: string - enum: [ xml, json, jsonp ] - responses: - 400: - description: | - Bad Request - body: &errorSchemas - text/xml: - schema: | - - - - - - - - - - - - - - example: | - - - 401 - 1378122242574 - 8PQJRYO7JK - 0 - Invalid access token. - - application/json: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "errorCode": { - "type":"number", - "id": "http://jsonschema.net/errorCode", - "required":false - }, - "message": { - "type":"string", - "id": "http://jsonschema.net/message", - "required":false - }, - "requestId": { - "type":"string", - "id": "http://jsonschema.net/requestId", - "required":false - }, - "status": { - "type":"number", - "id": "http://jsonschema.net/status", - "required":false - }, - "timestamp": { - "type":"number", - "id": "http://jsonschema.net/timestamp", - "required":false - } - } - } - example: | - { - "errorCode": 0, - "message": "Invalid access token.", - "requestId": "Y703T8HXBF", - "status": 401, - "timestamp": 1378122137646 - } - application/javascript: - # schema: TODO ??? - example: | - callback({ - "errorCode": 0, - "message": "Invalid access token.", - "requestId": "3W65MK0G8R", - "status": 401, - "timestamp": 1378120873591 - }) - 401: - description: | - Unauthorized - body: *errorSchemas - 403: - description: | - Forbidden - body: *errorSchemas - 503: - description: | - Service Unavailable - body: *errorSchemas - put?: *common - post?: *common - delete?: *common -traits: - - secureUrlParam: - description: | - This trait should be used for indicate that you want the URLs in your response to be HTTPS - queryParameters: - secure-urls: - description: | - secure-urls query parameter indicates that you want the URLs in your response to be HTTPS - type: boolean -securitySchemes: - - oauth_2_0: - description: | - LinkedIn supports OAuth 2.0 for authenticating all API requests. - type: OAuth 2.0 - describedBy: - queryParameters: - oauth2_access_token: - description: | - Used to send a valid OAuth 2 access token - type: string - settings: - authorizationUri: https://www.linkedin.com/uas/oauth2/authorization - accessTokenUri: https://www.linkedin.com/uas/oauth2/accessToken - authorizationGrants: code - - oauth_1_0: - description: | - OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred. - type: OAuth 1.0 - settings: - requestTokenUri: https://api.linkedin.com/uas/oauth/requestToken - authorizationUri: https//www.linkedin.com/uas/oauth/authenticate - tokenCredentialsUri: https://api.linkedin.com/uas/oauth/accessToken -securedBy: [oauth_2_0, oauth_1_0] -/people: - displayName: People - /~{fieldSelectors}: - displayName: Profile API - type: fieldSelectors - get: - is: [secureUrlParam] - description: | - Returns profile of the current user - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - 123456 - first name - last name - headline - - name - - 804 - - - industry - 50 - - 100 - - 10 - online - 12367123678 - - summary - - - id1 - title1 - summary1 - - 2013 - Jan - - false - - Company1 - - - - id2 - title2 - summary2 - - 2013 - Jun - - true - - Company2 - - - - - - id1 - school1 - degree1 - - 2000 - - - 2008 - - - - id2 - university1 - degree2 - - 2008 - - - 2013 - - - - - - http://url1 - name of url1 - - - http://url2 - name of url2 - - - - http://url.com - - - Date - 237423472sdf - - - Acept-type - */* - - - - - http://url.com - - http://picture.url - - application/json: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "firstName": { - "type":"string", - "id": "http://jsonschema.net/firstName", - "required":false - }, - "headline": { - "type":"string", - "id": "http://jsonschema.net/headline", - "required":false - }, - "lastName": { - "type":"string", - "id": "http://jsonschema.net/lastName", - "required":false - }, - "siteStandardProfileRequest": { - "type":"object", - "id": "http://jsonschema.net/siteStandardProfileRequest", - "required":false, - "properties":{ - "url": { - "type":"string", - "id": "http://jsonschema.net/siteStandardProfileRequest/url", - "required":false - } - } - } - } - } - example: | - { - "firstName": "First Name", - "headline": "developer", - "lastName": "Last Name", - "siteStandardProfileRequest": {"url": "http://www.linkedin.com/profile/view?id=283834265"} - } - /connections{fieldSelectors} : - displayName: Connections API - type: fieldSelectors - get: - description: | - Returns a list of 1st degree connections for a user who has granted access to his/her account - queryParameters: - start: - description: | - Starting location within the result set for paginated returns. Ranges are specified with a starting index and a - number of results (count) to return. - type: integer - minimum: 0 - default: 0 - count: - description: | - Ranges are specified with a starting index and a number of results to return. You may specify any number. - Default and max page size is 500. Implement pagination to retrieve more than 500 connections. - type: integer - minimum: 1 - maximum: 500 - default: 500 - modified: - description: | - Values are updated or new. - type: string - enum: [ updated, new ] - modified-since: - description: | - Value as a Unix time stamp of milliseconds since epoch. - type: integer - minimum: 0 - example: 1267401600000 - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - id - first name - last name - head line - - location name - - 804 - - - industry - - http://profile.linkedin.com - - - Content-Type - plain/text - - - - - http://profile.linkedin.com - - http://photo.profile.linkedin.com - - - application/json: - schema: | - example: | - /group-memberships{fieldSelectors}: - displayName: Groups API - type: fieldSelectors - get: - description: | - Returns Group Memberships for a User - queryParameters: - count: - description: | - Number of records to return. - type: integer - default: 5 - start: - description: | - Record index at which to start pagination. - type: integer - default: 0 - membership-state: - description: | - The state of the caller’s membership to the specified group. Use the value member to retrieve the groups to which a - user belongs. - type: string - enum: [ non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner ] - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - 32423423 - - true - - daily - - true - true - false - - member - - - application/json: - schema: | - example: | - post: - description: | - POSTs additional group settings information - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - 32423423 - - true - - daily - - true - true - false - - member - - - application/json: - schema: | - example: | - responses: - 200: - description: OK - /{groupId}{fieldSelectors}: - displayName: Groups API - type: fieldSelectors - uriParameters: - groupId: - displayName: Numeric group ID - description: | - The unique identifier for a LinkedIn group - type: integer - required: true - get: - description: | - Returns Group settings - queryParameters: - membership-state: - description: | - The state of the caller’s membership to the specified group. Use the value member to retrieve the groups to which a - user belongs. - type: string - enum: [ non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner ] - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - example: | - - - true - - daily - - true - true - true - - application/json: - schema: | - example: | - put: - description: | - Change Group settings - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - example: | - - - true - - daily - - true - true - true - - application/json: - schema: | - example: | - responses: - 200: - description: OK - delete: - description: Leave a Group - responses: - 200: - description: OK - /posts{fieldSelectors}: - type: fieldSelectors - get: - description: | - Returns a Group's Discussion Posts - queryParameters: - count: - description: | - Number of records to return. Supported for posts and post/comments. - type: integer - minimum: 0 - start: - description: | - Record index to start pagination. Supported for posts and post/comments. - type: integer - minimum: 0 - default: 0 - order: - description: | - Sort order for posts. - type: string - enum: [ recency, popularity ] - role: - description: | - Filter for posts related to the caller. Valid only for group-memberships/{id}/posts resource. - type: string - enum: [ creator, commenter, follower ] - required: true - category: - description: | - Category of posts. - type: string - enum: [ discussion ] - modified-since: - description: | - Timestamp filter for posts created after the specified value. - type: integer - example: 1302727083000 - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - g-5161023-S-270459579 - - standard - - - AGBKeo0Eup - first name - second name - developer - - first message - - - application/json: - schema: | - example: | - /suggestions: - displayName: Groups API - /groups{fieldSelectors}: - type: fieldSelectors - get: - description: | - Get Suggested Groups for a User - responses: - 200: - body: - text/xml: - schema: | - example: | - application/json: - schema: | - example: | - /{groupId}: - type: baseResource - uriParameters: - groupId: - displayName: Numeric group ID - description: | - The unique identifier for a LinkedIn group - type: integer - required: true - delete: - description: | - Remove a Group Suggestion for a Use - responses: - 200: - description: OK - /job-suggestions{fieldSelectors}: - type: fieldSelectors - get: - description: | - Retrieving a List of a Member’s Suggested Jobs - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - - 1577323 - - 1281 - Unisys - - - OHYinXGMKT - Joanne - Rawls - Recruiting Lead at Unisys Corporation - - Unisys is expanding our Federal Proposal Development Center and looking for talented professionals to join our team. As a Senior Technical Writer, you will be responsible for: • Analyzing Request for Proposals (RFP) and work with Solution Architects to package company services into a technical proposal response; write technical proposals that spell out what the company can offer to the agency seek - Reston, VA - - - 1579926 - - 15759 - Velti - - Negotiable - - UlfGF2nmYN - Maria - Maragoudakis-Gregoriou - Experienced Business Manager with extensive international and start-up experience - - Senior Technical Writer (Job Code: SF-SRTCR) Velti is a leading global provider of mobile marketing and advertising software solutions that enable brands, advertising agencies, mobile operators, and media companies to implement highly targeted, interactive, and measurable campaigns by communicating with and engaging consumers via their mobile devices. Job DescriptionThe Senior Technical Writer pos - San Francisco - - - 1609091 - - - Annual Salary, Bonus - - VLhDZNHMmG - Ties - van de Voort - International Corporate Recruiter at SDL Tridion - - The Senior Technical Support Engineer works in a team of support engineers and reports to the Manager Customer Support. The Senior Technical Support Engineer is guarding and meeting service levels as agreed with customers, partners and the internal organization. The Senior Technical Support Engineer independently provides complex technical support to customers and partners, provides onsite support - New York - - - - application/json: - schema: | - example: | - /job-bookmarks: - displayName: Job Bookmarks and Suggestions API - type: baseResource - get: - description: | - Returns Job Bookmarks - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - false - true - 1306261147000 - - 1641165 - true - - 35876 - ClairMail - - - Senior Technical Writer - - The Technical Writer will be responsible for creating, maintaining and - updating documentation, including internal and external facing technical documentation of ClairMail software, - such as user guides, installation guides, configuration guides, and developer’s guides. The products are - enterprise software products and the audience is technical, so the candidate must be able to understand highly tec - 1306256696000 - - - - false - true - 1306261165000 - - 1578133 - true - - 26909 - Greenplum - - - Senior Manager Technical Publications - - Greenplum is seeking an experienced Senior Manager, Technical Publications to - support its worldwide technical content demand and generation efforts. The Senior Manager will report to the - Vice-President of Engineering, and will be responsible for developing work plans, establishing technical and - other functional objectives, assigning tasks, and managing groups/teams. Maintains schedules and coordi - 1303854887000 - - - - application/json: - schema: | - example: | - post: - description: | - Bookmarking a Job - body: - text/xml: - schema: | - example: | - application/json: - schema: | - example: | - responses: - 200: - description: OK - /{jobId}: - type: baseResource - uriParameters: - jobId: - displayName: Job ID - description: | - The unique identifier for a job. - type: string - required: true - delete: - description: | - Deleting a Job Bookmark - responses: - 200: - description: OK - /id={peopleId}{fieldSelectors}: - displayName: Profile API - type: fieldSelectors - uriParameters: - peopleId: - displayName: Profile ID - type: string - required: true - get: - is: [secureUrlParam] - description: | - Returns profile of user by ID - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - 123456 - first name - last name - headline - - name - - 804 - - - industry - 50 - 10 - online - 12367123678 - - summary - - - id1 - title1 - summary1 - - 2013 - Jan - - false - - Company1 - - - - id2 - title2 - summary2 - - 2013 - Jun - - true - - Company2 - - - - - - http://url1 - name of url1 - - - http://url2 - name of url2 - - - - http://url.com - - - Date - 237423472sdf - - - Acept-type - */* - - - - - http://url.com - - http://picture.url - - application/json: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "firstName": { - "type":"string", - "id": "http://jsonschema.net/firstName", - "required":false - }, - "headline": { - "type":"string", - "id": "http://jsonschema.net/headline", - "required":false - }, - "lastName": { - "type":"string", - "id": "http://jsonschema.net/lastName", - "required":false - }, - "siteStandardProfileRequest": { - "type":"object", - "id": "http://jsonschema.net/siteStandardProfileRequest", - "required":false, - "properties":{ - "url": { - "type":"string", - "id": "http://jsonschema.net/siteStandardProfileRequest/url", - "required":false - } - } - } - } - } - example: | - { - "firstName": "First Name", - "headline": "developer", - "lastName": "Last Name", - "siteStandardProfileRequest": {"url": "http://www.linkedin.com/profile/view?id=283834265"} - } - /connections{fieldSelectors} : - displayName: Connections API - type: fieldSelectors - get: - description: | - Returns a list of 1st degree connections for a user who has granted access to his/her account - queryParameters: - start: - description: | - Starting location within the result set for paginated returns. Ranges are specified with a starting index and a - number of results (count) to return. - type: integer - minimum: 0 - default: 0 - count: - description: | - Ranges are specified with a starting index and a number of results to return. You may specify any number. - Default and max page size is 500. Implement pagination to retrieve more than 500 connections. - type: integer - minimum: 1 - maximum: 500 - default: 500 - modified: - description: | - Values are updated or new. - type: string - enum: [ updated, new ] - modified-since: - description: | - Value as a Unix time stamp of milliseconds since epoch. - type: integer - minimum: 0 - example: 1267401600000 - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - id - first name - last name - head line - - location name - - 804 - - - industry - - http://profile.linkedin.com - - - Content-Type - plain/text - - - - - http://profile.linkedin.com - - http://photo.profile.linkedin.com - - - application/json: - schema: | - example: | - /url={publicProfileUrl}{fieldSelectors}: - displayName: Profile API - type: fieldSelectors - uriParameters: - publicProfileUrl: - displayName: Profile URL - type: string - required: true - get: - is: [secureUrlParam] - description: | - Returns profile of user by URL - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - application/json: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "firstName": { - "type":"string", - "id": "http://jsonschema.net/firstName", - "required":false - }, - "headline": { - "type":"string", - "id": "http://jsonschema.net/headline", - "required":false - }, - "lastName": { - "type":"string", - "id": "http://jsonschema.net/lastName", - "required":false - }, - "siteStandardProfileRequest": { - "type":"object", - "id": "http://jsonschema.net/siteStandardProfileRequest", - "required":false, - "properties":{ - "url": { - "type":"string", - "id": "http://jsonschema.net/siteStandardProfileRequest/url", - "required":false - } - } - } - } - } - example: | - { - "firstName": "First Name", - "headline": "developer", - "lastName": "Last Name", - "siteStandardProfileRequest": {"url": "http://www.linkedin.com/profile/view?id=283834265"} - } - /connections{fieldSelectors} : - displayName: Connections API - type: fieldSelectors - get: - description: | - Returns a list of 1st degree connections for a user who has granted access to his/her account - queryParameters: - start: - description: | - Starting location within the result set for paginated returns. Ranges are specified with a starting index and a - number of results (count) to return. - type: integer - minimum: 0 - default: 0 - count: - description: | - Ranges are specified with a starting index and a number of results to return. You may specify any number. - Default and max page size is 500. Implement pagination to retrieve more than 500 connections. - type: integer - minimum: 1 - maximum: 500 - default: 500 - modified: - description: | - Values are updated or new. - type: string - enum: [ updated, new ] - modified-since: - description: | - Value as a Unix time stamp of milliseconds since epoch. - type: integer - minimum: 0 - example: 1267401600000 - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - id - first name - last name - head line - - location name - - 804 - - - industry - - http://profile.linkedin.com - - - Content-Type - plain/text - - - - - http://profile.linkedin.com - - http://photo.profile.linkedin.com - - - application/json: - schema: | - example: | -/people-search{fieldSelectors}: - displayName: People Search API - type: fieldSelectors - get: - description: | - Returns information about people - queryParameters: - keywords: - description: | - Members who have all the keywords anywhere in their profile. Use this field when you don't know how to - more accurately map the input to a more specific parameter. (Don't forget to URL encode this data.) - type: string - first-name: - description: | - Members with a matching first name. Matches must be exact. Multiple words should be separated by a space. - type: string - last-name: - description: | - Members with a matching last name. Matches must be exactly. Multiple words should be separated by a space. - type: string - company-name: - description: | - Members who have a matching company name on their profile. company-name can be combined with the current-company parameter - to specifies whether the person is or is not still working at the company. - - It's often valuable to not be too specific with the company name. LinkedIn has made great efforts at standardizing company names, - but including suffixes such as "Inc" and "Company" may overly limit your search, missing people who did not include those suffixes - on their company names. It's usually better to search for the basic name of the company and all different versions will be returned. - This does increase the possibility of a false positive match return, though, so consider the most specific terms you can use. - For example, consider using "Acme" instead of "Acme, Inc" to find people from a company called Acme, Inc. But this runs the risk - of finding people from different companies with Acme in the title, such as "Acme Vending" and "Acme Services". - type: string - current-company: - description: | - Valid values are true or false. A value of true matches members who currently work at the company specified in the company-name parameter. - A value of false matches members who once worked at the company. Omitting the parameter matches members who currently or once worked - the company. - type: boolean - title: - description: | - Matches members with that title on their profile. Works with the current-title parameter. - type: string - current-title: - description: | - Valid values are true or false. A value of true matches members whose title is currently the one specified in the title-name parameter. - A value of false matches members who once had that title. Omitting the parameter matches members who currently or once had that title. - type: boolean - school-name: - description: | - Members who have a matching school name on their profile. school-name can be combined with the current-school parameter to specifies - whether the person is or is not still at the school. - - It's often valuable to not be too specific with the school name. The same explation provided with company name applies: - "Yale" vs. "Yale University". - type: string - current-school: - description: | - Valid values are true or false. A value of true matches members who currently attend the school specified in the school-name parameter. - A value of false matches members who once attended the school. Omitting the parameter matches members who currently or once attended - the school. - type: boolean - country-code: - description: | - Matches members with a location in a specific country. Values are defined in by ISO 3166 standard. Country codes must be in all lower case. - type: string - postal-code: - description: | - Matches members centered around a Postal Code. Must be combined with the country-code parameter. Not supported for all countries. - type: string - distance: - description: | - Matches members within a distance from a central point. This is measured in miles. This is best used in combination with both country-code - and postal-code. - type: string - facet: - description: | - Facet values to search over. - type: string - facets: - description: | - Facet buckets to return. - type: string - start: - description: | - Start location within the result set for paginated returns. This is the zero-based ordinal number of the search return, not the number - of the page. To see the second page of 10 results per page, specify 10, not 1. Ranges are specified with a starting index and a number - of results (count) to return. The default value is 0. - type: integer - minimum: 0 - default: 0 - count: - description: | - The number of profiles to return. Values can range between 0 and 25. The default value is 10. The total results available to any - user depends on their account level. - type: integer - minimum: 0 - maximum: 25 - default: 10 - sort: - description: | - Controls the search result order. There are four options: - * **connections**: Number of connections per person, from largest to smallest. - * **recommenders**: Number of recommendations per person, from largest to smallest. - * **distance**: Degree of separation within the member's network, from first degree, then second degree, and then all others mixed together, - including third degree and out-of-network. - * **relevance**: Relevance of results based on the query, from most to least relevant. - - By default, results are ordered by the number of connections. - type: string - enum: [connections, recommenders, distance, relevance] - default: connections - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - - tePXJ3SX1o - Clair - Standish - - - pcfBxmL_Vv - John - Bender - - - 108 - - application/json: - schema: | - example: | -/groups: - displayName: Groups API - /{groupId}{fieldSelectors}: - type: fieldSelectors - uriParameters: - groupId: - displayName: Numeric group ID - description: | - The unique identifier for a LinkedIn group - type: integer - required: true - get: - description: | - Returns Group's Profile Details - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - 5161023 - group name - short description - description - - state - state - - none - 25 - false - category - http://pragmasoft.com.ua - en-US - - name - - 804 - - - true - http://site.group.com - http://small.logo.com - http://large.logo.com - - application/json: - schema: | - example: | - /posts: - type: fieldSelectors - get: - description: | - Returns a Group's Discussion Posts - queryParameters: - count: - description: | - Number of records to return. Supported for posts and post/comments. - type: integer - minimum: 0 - start: - description: | - Record index to start pagination. Supported for posts and post/comments. - type: integer - minimum: 0 - default: 0 - order: - description: | - Sort order for posts. - type: string - enum: [ recency, popularity ] - role: - description: | - Filter for posts related to the caller. Valid only for group-memberships/{id}/posts resource. - type: string - enum: [ creator, commenter, follower ] - category: - description: | - Category of posts. - type: string - enum: [ discussion ] - modified-since: - description: | - Timestamp filter for posts created after the specified value. - type: integer - example: 1302727083000 - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - g-5161023-S-270459579 - - standard - - - AGBKeo0Eup - first name - second name - developer - - first message - - - application/json: - schema: | - example: | -/posts: - displayName: Groups API - /{postId}{fieldSelectors}: - type: fieldSelectors - uriParameters: - postId: - displayName: Post ID - description: | - The unique identifier for a post - type: string - required: true - get: - description: | - Returns Discussion Post - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - g-5161023-S-270459579 - - 5161023 - pragmasoft group - - - standard - - - AGBKeo0Eup - first name - last name - developer - - first message - - application/json: - schema: | - example: | - delete: - description: | - Deletes a Post - responses: - 200: - description: OK - #TODO: implement /comments{fieldSelectors}: - #TODO: implement /relation-to-viewer: - #TODO: implement /category: -/comments: - /{commentId}{fieldSelectors}: - type: fieldSelectors - uriParameters: - commentId: - displayName: Comment ID - description: | - The unique identifier for a comment - type: integer - required: true - get: - description: | - Returns Comments - responses: - 200: - body: - text/xml: - schema: | - example: | - application/json: - schema: | - example: | - delete: - description: | - Deletes a Comment - responses: - 200: - description: OK -/jobs: - displayName: Job Lookup API - /{jobId}{fieldSelectors}: - type: fieldSelectors - uriParameters: - jobId: - displayName: Job ID - description: | - The unique identifier for a job. - type: string - required: true - get: - description: | - Returns Job info - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - 1511685 - 1304030488000 - - 229433 - Cloudera - - - Technical Writer - - San Francisco Bay Area - - us - - - - San Francisco or Palo Alto, CA - - hQ4ruu3J2q - Paul - Battaglia - Technical Writer at Cloudera - - - application/json: - schema: | - example: | -/job-search{fieldSelectors}: - displayName: Job Search API - type: fieldSelectors - get: - description: | - Returns Jobs found by some criteria - responses: - 200: - body: - text/xml: - schema: | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - example: | - - - - - 1550983 - - - San Francisco Bay Area - - us - - - - - David - Sides - - -1 - - - - 2011 - 4 - 14 - - - - 1550465 - - - San Francisco Bay Area - - us - - - - - Jeanmarie - Boben - - 3 - - - - 2011 - 4 - 14 - - - - 1549868 - - - San Francisco Bay Area - - us - - - - - Anne - Woods, CPA - - 3 - - - - 2011 - 4 - 14 - - - - - application/json: - schema: | - example: | -#TODO: add Companies, Job Posting, Share and Social Stream, Communications sections diff --git a/dist/examples/mini-library.raml b/dist/examples/mini-library.raml deleted file mode 100644 index f3a9e645f..000000000 --- a/dist/examples/mini-library.raml +++ /dev/null @@ -1,12 +0,0 @@ -#%RAML 1.0 -title: API with Library -version: 1 - -uses: - library: libraries/type.raml - -/test: - post: - body: - application/json: - type: library.Type diff --git a/dist/examples/person.json b/dist/examples/person.json deleted file mode 100644 index 75fe4f2f1..000000000 --- a/dist/examples/person.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "Person Schema", - "type": "object", - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "age": { - "description": "Age in years", - "type": "integer", - "minimum": 0 - } - }, - "required": ["firstName", "lastName"] -} diff --git a/dist/examples/properties-08.raml b/dist/examples/properties-08.raml deleted file mode 100644 index 51a6ee80b..000000000 --- a/dist/examples/properties-08.raml +++ /dev/null @@ -1,35 +0,0 @@ -#%RAML 0.8 -title: API with Types -baseUri: /media -/users/{id}: - uriParameters: - id: - type: string - get: - headers: - header-1: - type: string - required: false - enum: ["one", "two", "three"] - queryParameters: - queryParameter-1: - type: string - required: false - enum: ["one", "two", "three"] - responses: - 200: - headers: - header-1: - type: string - required: false - enum: ["one", "two", "three"] - post: - body: - application/x-www-form-urlencoded: - formParameters: - formParameter-1: - type: string - formParameter-2: - type: string - required: false - enum: ["one", "two", "three"] diff --git a/dist/examples/properties.raml b/dist/examples/properties.raml deleted file mode 100644 index cd53d81aa..000000000 --- a/dist/examples/properties.raml +++ /dev/null @@ -1,169 +0,0 @@ -#%RAML 1.0 -title: API with Types -baseUri: /media - -securitySchemes: - oauth_2_0: - type: OAuth 2.0 - describedBy: - headers: - Authorization: - type: string - car: - type: object - properties: - wheels: - type: object - properties: - prop1: string - prop2: number - queryParameters: - access_token: - type: string - responses: - 404: - description: Unauthorized - settings: - authorizationUri: https://acme.com/login/oauth/authorize - accessTokenUri: https://acme.com/login/oauth/access_token - authorizationGrants: [ authorization_code ] -types: - Person: - type: object - properties: - firstname: - type: string - description: test - lastname: string - addresses: string[] - age: number - User: - type: Person - properties: - id: - type: number - department: Department[] - Developer: - type: User - properties: - github: string - Department: - type: object - properties: - name: string - example: - name: Engineering - Team: - type: object - properties: - manager: CEO - employees: Developer[] - CEO: - type: User | Developer - Planes: - type: string[] - -/test: - securedBy: [ null, oauth_2_0 ] - get: - queryString: - type: Person - -/users/{org}/{id}: - uriParameters: - org: string - id: number - get: - headers: - developer: string - test: string - animal: string - car: string - - queryParameters: - developer: - type: Person[] - test: - type: string - required: false - enum: ["one", "two", "three"] - example: one - animal: - type: integer | Developer - description: The kind of animal - example: 1 - car: - type: object - properties: - wheels: - type: string[] - doors: - type: integer[] - required: false - - body: - application/json: - type: object - properties: - developer: string - test: string - animal: string - car: string - - responses: - 200: - headers: - developer: - type: Person[] - test: - type: string - required: false - enum: ["one", "two", "three"] - animal: - type: Person | Developer - description: The kind of animal - car: - type: object - properties: - wheels: - type: object - properties: - prop1: string - prop2: number - body: - application/json: - type: Person - -/info: - post: - queryString: - type: object - properties: - developer: - type: Person[] - test: - type: string - required: false - enum: ["one", "two", "three"] - - body: - application/json: - type: object - properties: - developer: - type: Person[] - test: - type: string - required: false - enum: ["one", "two", "three"] - animal: - type: Person | Developer - description: The kind of animal - car: - type: object - properties: - wheels: - type: object - properties: - prop1: string - prop2: number diff --git a/dist/examples/simple.raml b/dist/examples/simple.raml deleted file mode 100644 index 418abbe87..000000000 --- a/dist/examples/simple.raml +++ /dev/null @@ -1,232 +0,0 @@ -#%RAML 0.8 ---- -title: Example API -baseUri: http://example.com -securitySchemes: - - basic: - type: Basic Authentication -traits: - - secured: - description: Some requests require authentication - - unsecured: - description: This is not secured - - catpictures: - description: requires cat headers - - anotherTrait: {} - - andAnotherTrait: {} - - andYetAnotherTrait: {} - - aFinalTrait: {} - - someParameterizedTrait: - description: <> -resourceTypes: - - longCollectionName: - description: | - This is a description. It can be long. - - # Headers - - It can have headers, and _italic_, and **bold** text. - - # Length - - Because it is arbitrary markdown, it can be arbitrarily long. -documentation: - - title: Getting Started - content: | - # Header - Content - ## Subheader - **Bolded content** -/resource: - displayName: First One - is: [secured] - options: - responses: - 200: - connect: - responses: - 200: - trace: - responses: - 200: - patch: - responses: - 200: - delete: - responses: - 200: - 201: - 203: - put: - responses: - 200: - 201: - 203: - get: - description: get the first one - headers: - x-custom: - responses: - 200: - /{resourceId}: - description: This is a resource description *with* some _markdown_ embedded in it - uriParameters: - resourceId: - required: true - description: Which resoure would you like to view - get: - description: | - Instagram’s API uses the [OAuth 2.0 protocol](http://tools.ietf.org/html/draft-ietf-oauth-v2-12) for simple, but effective authentication and authorization. OAuth 2.0 is much easier to use than previous schemes; developers can start using the Instagram API almost immediately. The one thing to keep in mind is that all requests to the API must be made over SSL (https:// not http://) - - ## Do you need to authenticate? - - For the most part, Instagram’s API only requires the use of a _client_id). A client_id simply associates your server, script, or program with a specific application. However, some requests require authentication - specifically requests made on behalf of a user. Authenticated requests require an _access_token_. These tokens are unique to a user and should be stored securely. Access tokens may expire at any time in the future. - - Note that in many situations, you may not need to authenticate users at all. For instance, you may request popular photos without authenticating (i.e. you do not need to provide an access_token; just use your client ID with your request). We only require authentication in cases where your application is making requests on behalf of a user (commenting, liking, browsing a user’s feed, etc.). - - ## Receiving an access_token - queryParameters: - filter: - description: What to filter - type: string - responses: - 200: - post: - body: - application/json: - application/x-www-form-urlencoded: - formParameters: - name: - description: The name of the resource to create - type: string - example: Comment - description: - description: A description of the resource to create - type: string - example: User-generated content pertinent to the associated blog post - multipart/form-data: - formParameters: - name: - description: The name of the resource to create - type: string - example: Comment - description: - description: A description of the resource to create - type: string - example: User-generated content pertinent to the associated blog post - responses: - 200: - 201: - 203: - -/another/resource: - displayName: Cats - type: longCollectionName - is: [secured, catpictures, anotherTrait, andAnotherTrait] - connect: !!null - head: - responses: - 200: - 201: - 203: - get: - queryParameters: - chunk: - displayName: page - description: Which page to display - type: integer - example: 1 - minimum: 1 - maximum: 100 - required: true - order: - description: The sort order of resources - type: string - enum: ["oldest", "newest"] - example: oldest - minLength: 5 - maxLength: 7 - default: newest - query: - description: A query parameter - repeat: true - -/resource-with-headers: - displayName: Resource With headers - get: - headers: - x-custom-header: - displayName: Custom header - description: This header is used to send data that... - type: string - pattern: ^\w+$ - x-p-{*}: - displayName: Parameterized header - -/secured-resource: - displayName: SO SECURE - get: - securedBy: [basic] -/resource-with-method-level-traits: - displayName: First One - is: [secured] - get: - is: [unsecured, catpictures, anotherTrait, andAnotherTrait, andYetAnotherTrait, aFinalTrait, {someParameterizedTrait: { someParameterName: someParameterValue }}] - description: get the first one -/resource-with-form-and-multipart-form-parameters: - get: - queryParameters: - some_query_param: - displayName: Some Query Param - description: Your value for some thing. - type: string - required: true - example: "my value" - body: - application/json: - example: | - { - "api_key": "c4f820f0420a013ea143230c290fbf99" - } - application/x-www-form-urlencoded: - formParameters: - api_key: - displayName: API Key - description: Your license key for the application. Please contact developer@nzpost.co.nz for a license key - type: string - required: true - example: "c4f820f0420a013ea143230c290fbf99" - multipart/form-data: - formParameters: - api_key: - displayName: API Key - description: Your license key for the application. Please contact developer@nzpost.co.nz for a license key - type: string - required: true - example: "c4f820f0420a013ea143230c290fbf99" -/resource-with-repeatable-params: - post: - queryParameters: - someParam: - repeat: true - notRepeatable: - body: - application/x-www-form-urlencoded: - formParameters: - someFormParam: - repeat: true - multipart/form-data: - formParameters: - someMultipartFormParam: - type: file - repeat: true - someMultipartFormParamWithMultipleTypes: - - type: file - - type: string - repeat: true - headers: - someHeader: - repeat: true - x-meta-{*}: - repeat: true - diff --git a/dist/examples/stripe.raml b/dist/examples/stripe.raml deleted file mode 100644 index 9e7422e7b..000000000 --- a/dist/examples/stripe.raml +++ /dev/null @@ -1,12226 +0,0 @@ -#%RAML 0.8 ---- -title: Stripe REST API -version: v1 -baseUri: https://api.stripe.com/{version} -mediaType: application/json -securitySchemes: - - basic: - description: | - Authentication to the API occurs via HTTP Basic Auth. Provide your API key as the basic auth username. You do not - need to provide a password. - type: Basic Authentication - describedBy: - headers: - Authorization: - description: | - The Authorization field value consists of credentials - containing the authentication information of the user agent for the - realm of the resource being requested. - type: string -securedBy: [ basic ] -resourceTypes: - - baseResource: - usage: | - This is base resource type described common request and response headers and error response codes - All Stripe resources should use it - get?: &common - headers: - Stripe-Version: - description: | - When we make backwards-incompatible changes to the API, we release new dated versions. - type: string - example: 2013-08-13 - queryParameters: - expand[]: - description: | - Many objects contain the id of another object in their response properties. Those objects can be expanded in - inline with the expand request parameter. Objects that can be expanded are noted in this documentation. - - This parameter is available on all API requests, and applies to the response of that request only. You can nest - expand requests with the dot property. For example, requesting invoice.customer on a charge will expand the invoice - property into a full invoice object, and will then expand the customer property on that invoice into a full customer - object. You can expand multiple things at once by sending an array. - type: string - repeat: true - example: expand%5B%5D=customer - responses: - 400: - description: | - Bad Request - Often missing a required parameter. - body: &errorSchemas - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "error": { - "type":"object", - "id": "http://jsonschema.net/error", - "required":true, - "properties":{ - "code": { - "type":"string", - "id": "http://jsonschema.net/error/code", - "required":false - }, - "message": { - "type":"string", - "id": "http://jsonschema.net/error/message", - "required":true - }, - "param": { - "type":"string", - "id": "http://jsonschema.net/error/param", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/error/type", - "required":true - } - } - } - } - } - example: | - { - "error": { - "type": "invalid_request_error", - "message": "No such charge: ch_2Vcu103KQjX3Ey", - "code": "missing", - "param": "id" - } - } - 401: - description: | - Unauthorized - No valid API key provided. - body: *errorSchemas - 402: - description: | - Request Failed - Parameters were valid but request failed. - body: *errorSchemas - 404: - description: | - Not Found - The requested item doesn't exist. - body: *errorSchemas - 500: - description: | - Server errors - something went wrong on Stripe's end. - body: *errorSchemas - 502: - description: | - Server errors - something went wrong on Stripe's end. - body: *errorSchemas - 503: - description: | - Server errors - something went wrong on Stripe's end. - body: *errorSchemas - 504: - description: | - Server errors - something went wrong on Stripe's end. - body: *errorSchemas - put?: *common - post?: *common - delete?: *common -/charges: - displayName: Charges - description: | - Charges operations: - * Creating a new charge - * Retrieving a Charge - * Refunding a Charge - * Capture a charge - * List all Charges - type: baseResource - post: - description: | - Creating a new charge (charging a credit card). - To charge a credit card, you create a new charge object. If your API key is in test mode, the supplied card won't - actually be charged, though everything else will occur as if in live mode. (Stripe assumes that the charge would have - completed successfully). - body: - application/x-www-form-urlencoded: - formParameters: - amount: - description: | - A positive integer in cents representing how much to charge the card. - type: integer - minimum: 50 - required: true - currency: - description: | - 3-letter ISO code for currency. - type: string - minLength: 3 - maxLength: 3 - required: true - customer: - description: | - The ID of an existing customer that will be charged in this request. - optional, either card or customer is required - type: string - #TODO: in current version of RAML there is no ability to satisfy requirement from description - card: - description: | - A card to be charged. If you also pass a customer ID, the card must be the ID of a card belonging to the customer. - Otherwise, if you do not pass a customer ID, the card you provide must either be a token, like the ones returned by - Stripe.js, or a dictionary containing a user's credit card details, with the options described below. Although not - all information is required, the extra info helps prevent fraud. - optional, either card or customer is required - type: string - #TODO: in current version of RAML there is no ability to satisfy requirement from description - description: - description: | - An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside - the charge. It's often a good idea to use an email address as a description for tracking later. Note that if you use - Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the - charge(s) that they are describing. - type: string - capture: - description: | - Whether or not to immediately capture the charge. When false, the charge issues an authorization (or pre-authorization), - and will need to be captured later. Uncaptured charges expire in 7 days. - type: string - default: true - application_fee: - description: | - A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. The request - must be made with an OAuth key in order to take an application fee. - type: integer - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/refunds", - "required":false - } - } - } - example: | - { - "id": "ch_2VzIHEg2arH51K", - "object": "charge", - "created": 1378366611, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2VzIt541zNEwjf", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ ], - "balance_transaction": "txn_2VrwM1WyxXifsV", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null - } - get: - description: | - Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. - type: integer - minimum: 1 - maximum: 100 - default: 10 - created: - description: | - A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp - type: string - customer: - description: | - Only return charges for the customer specified by this customer ID. - type: string - offset: - description: | - An offset into the list of returned items. The API will return the requested number of items starting at that offset - type: integer - minimum: 0 - default: 0 - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/data/0", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/data/0/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/data/0/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/data/0/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/data/0/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/customer", - "required":false - }, - "cvc_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/data/0/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/data/0/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/data/0/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/data/0/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/data/0/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/data/0/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/data/0/customer", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/data/0/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/data/0/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/data/0/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/data/0/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/data/0/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/data/0/refunds", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/data/0/refunds/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/data/0/refunds/0/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/data/0/refunds/0/balance_transaction", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/data/0/refunds/0/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/data/0/refunds/0/currency", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/refunds/0/object", - "required":false - } - } - } - - - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/url", - "required":false - } - } - } - example: | - { - "object": "list", - "url": "/v1/charges", - "count": 2, - "data": [ - { - "id": "ch_2W2skeSVoEIgH8", - "object": "charge", - "created": 1378379935, - "livemode": false, - "paid": true, - "amount": 400, - "currency": "usd", - "refunded": false, - "card": - { - "id": "cc_1SvbSeGL19eaMi", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 8, - "exp_year": 2014, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null }, - "captured": true, "refunds": [ - { - "amount": 400, - "currency": "usd", - "created": 1378379955, - "object": "refund", - "balance_transaction": "txn_2W2s5pXW1h3t3Q" } ], - "balance_transaction": "txn_2VrwM1WyxXifsV", - "failure_message": null, - "failure_code": null, - "amount_refunded": 400, - "customer": null, - "invoice": null, - "description": "Charge for test@example.com", - "dispute": null }, - { - "id": "ch_2W2skeusdf67IgH8", - "object": "charge", - "created": 1378374535, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": - { - "id": "cc_1SvbSeGL19eaMi", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 8, - "exp_year": 2014, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null }, - "captured": true, "refunds": [ - { - "amount": 500, - "currency": "usd", - "created": 1378379955, - "object": "refund", - "balance_transaction": "txn_2W2s5pXsdfsd3t3Q" } ], - "balance_transaction": "txn_2W2s5pXsdfsd3t3Q", - "failure_message": null, - "failure_code": null, - "amount_refunded": 500, - "customer": null, - "invoice": null, - "description": "Charge 2 for test@example.com", - "dispute": null } - ] } - /{CHARGE_ID}: - type: baseResource - uriParameters: - CHARGE_ID: - displayName: Charge ID - description: The identifier of the charge to be retrieved. - type: string - required: true - get: - description: | - Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned - from your previous request, and Stripe will return the corresponding charge information. The same information is - returned when creating or refunding the charge. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/refunds", - "required":false - } - } - } - example: | - { - "id": "ch_2VzIHEg2arH51K", - "object": "charge", - "created": 1378366611, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2VzIt541zNEwjf", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ ], - "balance_transaction": "txn_2VrwM1WyxXifsV", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null - } - # Refund - /refund: - type: baseResource - post: - description: | - Refunds a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or - debit card that was originally charged. The fees you were originally charged are also refunded. - - You can optionally refund only part of a charge. You can do so as many times as you wish until the entire charge has been refunded. - - Once entirely refunded, a charge can't be refunded again. This method will return an error when called on an already-refunded charge, - or when trying to refund more money than is left on a charge. - body: - application/x-www-form-urlencoded: - formParameters: - amount: - description: | - A positive integer in cents representing how much of this charge to refund. Can only refund up to the unrefunded amount - remaining of the charge. - **optional**, default is entire charge - type: integer - refund_application_fee: - description: | - Boolean indicating whether the full application fee should be refunded when refunding this charge. An application fee can only - be refunded by the application that created the charge. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/refunds", - "required":false - } - } - } - example: | - { - "id": "ch_2VzIHEg2arH51K", - "object": "charge", - "created": 1378366611, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2VzIt541zNEwjf", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ ], - "balance_transaction": "txn_2VrwM1WyxXifsV", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null - } - # Capture - /capture: - type: baseResource - post: - description: | - Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created - a charge with the capture option set to false. - - Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be - marked as refunded and will no longer be capturable. - body: - application/x-www-form-urlencoded: - formParameters: - amount: - description: | - The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. - type: integer - refund_application_fee: - description: | - An application fee to add on to this charge. Can only be used with - Stripe Connect. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/refunds", - "required":false - } - } - } - example: | - { - "id": "ch_2VzIHEg2arH51K", - "object": "charge", - "created": 1378366611, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2VzIt541zNEwjf", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ ], - "balance_transaction": "txn_2VrwM1WyxXifsV", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null - } - # Dispute - /dispute: - type: baseResource - post: - description: | - Contacting your customer is always the best first step, but if that doesn't - work, you can submit (text-only) evidence in order to help us resolve the - dispute in your favor. You can do this in your dashboard, but if you prefer, - you can use the API to submit evidence programmatically. - body: - application/x-www-form-urlencoded: - formParameters: - evidence: - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "charge": { - "type":"string", - "id": "http://jsonschema.net/charge", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "evidence_due_by": { - "type":"number", - "id": "http://jsonschema.net/evidence_due_by", - "required":false - }, - "evidence": { - "type":"null", - "id": "http://jsonschema.net/evidence", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "reason": { - "type":"string", - "id": "http://jsonschema.net/reason", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - } - } - } - example: | - { - "charge": "ch_2i0bEetfZQnWS2", - "amount": 1000, - "created": 1381139172, - "status": "needs_response", - "livemode": false, - "currency": "usd", - "object": "dispute", - "reason": "general", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "evidence_due_by": 1382831999, - "evidence": null - } - /close: - post: - description: | - Closing the dispute for a charge indicates that you do not have any evidence - to submit and are essentially 'dismissing' the dispute, acknowledging it as - lost. - The status of the dispute will change from under_review to lost. Closing - a dispute is irreversible. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "charge": { - "type":"string", - "id": "http://jsonschema.net/charge", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "evidence_due_by": { - "type":"number", - "id": "http://jsonschema.net/evidence_due_by", - "required":false - }, - "evidence": { - "type":"null", - "id": "http://jsonschema.net/evidence", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "reason": { - "type":"string", - "id": "http://jsonschema.net/reason", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - } - } - } - example: | - { - "charge": "ch_2i0bEetfZQnWS2", - "amount": 1000, - "created": 1381139172, - "status": "needs_response", - "livemode": false, - "currency": "usd", - "object": "dispute", - "reason": "general", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "evidence_due_by": 1382831999, - "evidence": null - } -/customers: - displayName: Customers - description: | - Customers operations: - * Creating a New Customer - * Retrieving a Customer - * Updating a Customer - * Deleting a Customer - * List all Customers - type: baseResource - post: - description: | - Creates a new customer object. - body: - application/x-www-form-urlencoded: - formParameters: - account_balance: - description: | - An integer amount in cents that is the starting account balance for your customer. A negative amount represents a - credit that will be used before attempting any charges to the customer's card; a positive amount will be added to - the next invoice. - type: integer - card: - description: | - The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit - card details (with the options shown below). Passing card will create a new card, make it the new customer default - card, and delete the old customer default if one exists. If you want to add additional cards instead of replacing the - existing default, use the card creation API. Whenever you attach a card to a customer, Stripe will automatically - validate the card. - type: string - coupon: - description: | - If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create - through the API will not have the discount. - type: string - description: - description: | - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - This will be unset if you POST an empty value. - type: string - email: - description: | - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and - tracking. This will be unset if you POST an empty value. - type: string - plan: - description: | - The identifier of the plan to subscribe the customer to. If provided, the returned customer object has a subscription - attribute describing the state of the customer's subscription - type: string - quantity: - description: | - The quantity you'd like to apply to the subscription you're creating. For example, if your plan is 10 cents/user/month, - and your customer has 5 users, you could pass 5 as the quantity to have the customer charged 50 cents (5 x 10 cents) monthly. - Defaults to 1 if not set. - type: integer - trial_end: - description: | - UTC integer timestamp representing the end of the trial period the customer will get before being charged for the first time. - If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value - now can be provided to end the customer's trial immediately. - type: integer - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account_balance": { - "type":"number", - "id": "http://jsonschema.net/account_balance", - "required":false - }, - "cards": { - "type":"object", - "id": "http://jsonschema.net/cards", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/cards/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/cards/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/cards/data/0", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/country", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/customer", - "required":false - }, - "cvc_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/cards/url", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "default_card": { - "type":"string", - "id": "http://jsonschema.net/default_card", - "required":false - }, - "delinquent": { - "type":"boolean", - "id": "http://jsonschema.net/delinquent", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "subscription": { - "type":"object", - "id": "http://jsonschema.net/subscription", - "required":false, - "properties":{ - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/subscription/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/subscription/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/subscription/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/subscription/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/subscription/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/subscription/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_start", - "required":false - } - } - } - } - } - example: | - { - "object": "customer", - "created": 1378379137, - "id": "cus_2W2fj6IHUNOc2d", - "livemode": false, - "description": null, - "email": "victor@huge-success.net", - "delinquent": false, - "subscription": { - "id": "su_2W2fay9kQDcftp", - "plan": { - "interval": "month", - "name": "Basic", - "amount": 1000, - "currency": "usd", - "id": "basic", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1378379138, - "status": "active", - "customer": "cus_2W2fj6IHUNOc2d", - "cancel_at_period_end": false, - "current_period_start": 1378379138, - "current_period_end": 1380971138, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1 - }, - "discount": null, - "account_balance": 0, - "cards": { - "object": "list", - "count": 1, - "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", - "data": [ - { - "id": "card_2W2fhiuUB8W9Bq", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 10, - "exp_year": 2020, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": "cus_2W2fj6IHUNOc2d", - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null - } - ] - }, - "default_card": "card_2W2fhiuUB8W9Bq" - } - get: - description: | - Returns a list of your customers. The customers are returned sorted by creation date, with the most recently created customers appearing first. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. - type: integer - minimum: 1 - maximum: 100 - default: 10 - created: - description: | - A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp - type: string - offset: - description: | - An offset into the list of returned items. The API will return the requested number of items starting at that offset - type: integer - minimum: 0 - default: 0 - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/data/0", - "required":false, - "properties":{ - "account_balance": { - "type":"number", - "id": "http://jsonschema.net/data/0/account_balance", - "required":false - }, - "cards": { - "type":"object", - "id": "http://jsonschema.net/data/0/cards", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/data/0/cards/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/data/0/cards/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/data/0/cards/data/0", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/country", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/customer", - "required":false - }, - "cvc_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/data/0/cards/data/0/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/data/0/cards/data/0/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/data/0/cards/data/0/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/data/0/cards/url", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/data/0/created", - "required":false - }, - "default_card": { - "type":"string", - "id": "http://jsonschema.net/data/0/default_card", - "required":false - }, - "delinquent": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/delinquent", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/data/0/description", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/data/0/discount", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/data/0/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/object", - "required":false - }, - "subscription": { - "type":"object", - "id": "http://jsonschema.net/data/0/subscription", - "required":false, - "properties":{ - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/subscription/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/data/0/subscription/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/data/0/subscription/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/data/0/subscription/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/data/0/subscription/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/data/0/subscription/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/data/0/subscription/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/data/0/subscription/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/data/0/subscription/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/data/0/subscription/trial_start", - "required":false - } - } - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/url", - "required":false - } - } - } - example: | - { - "object": "list", - "url": "v1/customers", - "count": 2, - "data": [ - { - "object": "customer", - "created": 1378379137, - "id": "cus_2W2fj6IHUNOc2d", - "livemode": false, - "description": null, - "email": "victor@huge-success.net", - "delinquent": false, - "subscription": { - "id": "su_2W2fay9kQDcftp", - "plan": { - "interval": "month", - "name": "Basic", - "amount": 1000, - "currency": "usd", - "id": "basic", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1378379138, - "status": "active", - "customer": "cus_2W2fj6IHUNOc2d", - "cancel_at_period_end": false, - "current_period_start": 1378379138, - "current_period_end": 1380971138, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1 - }, - "discount": null, - "account_balance": 0, - "cards": { - "object": "list", - "count": 1, - "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", - "data": [ - { - "id": "card_2W2fhiuUB8W9Bq", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 10, - "exp_year": 2020, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": "cus_2W2fj6IHUNOc2d", - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null - } - ] - }, - "default_card": "card_2W2fhiuUB8W9Bq" - }, - { - "object": "customer", - "created": 1378379137, - "id": "cus_2W2fj6IHUNOc2d", - "livemode": false, - "description": null, - "email": "victor@huge-success.net", - "delinquent": false, - "subscription": { - "id": "su_2W2fay9kQDcftp", - "plan": { - "interval": "month", - "name": "Basic", - "amount": 1000, - "currency": "usd", - "id": "basic", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1378379138, - "status": "active", - "customer": "cus_2W2fj6IHUNOc2d", - "cancel_at_period_end": false, - "current_period_start": 1378379138, - "current_period_end": 1380971138, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1 - }, - "discount": null, - "account_balance": 0, - "cards": { - "object": "list", - "count": 1, - "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", - "data": [ - { - "id": "card_2W2fhiuUB8W9Bq", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 10, - "exp_year": 2020, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": "cus_2W2fj6IHUNOc2d", - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null - } - ] - }, - "default_card": "card_2W2fhiuUB8W9Bq" - } - ] - } - /{CUSTOMER_ID}: - type: baseResource - uriParameters: - CUSTOMER_ID: - displayName: Customer ID - description: The identifier of the customer to be retrieved. - type: string - required: true - get: - description: | - Retrieves the details of an existing customer. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account_balance": { - "type":"number", - "id": "http://jsonschema.net/account_balance", - "required":false - }, - "cards": { - "type":"object", - "id": "http://jsonschema.net/cards", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/cards/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/cards/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/cards/data/0", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/country", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/customer", - "required":false - }, - "cvc_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/cards/url", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "default_card": { - "type":"string", - "id": "http://jsonschema.net/default_card", - "required":false - }, - "delinquent": { - "type":"boolean", - "id": "http://jsonschema.net/delinquent", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "subscription": { - "type":"object", - "id": "http://jsonschema.net/subscription", - "required":false, - "properties":{ - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/subscription/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/subscription/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/subscription/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/subscription/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/subscription/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/subscription/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_start", - "required":false - } - } - } - } - } - example: | - { - "object": "customer", - "created": 1378379137, - "id": "cus_2W2fj6IHUNOc2d", - "livemode": false, - "description": null, - "email": "victor@huge-success.net", - "delinquent": false, - "subscription": { - "id": "su_2W2fay9kQDcftp", - "plan": { - "interval": "month", - "name": "Basic", - "amount": 1000, - "currency": "usd", - "id": "basic", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1378379138, - "status": "active", - "customer": "cus_2W2fj6IHUNOc2d", - "cancel_at_period_end": false, - "current_period_start": 1378379138, - "current_period_end": 1380971138, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1 - }, - "discount": null, - "account_balance": 0, - "cards": { - "object": "list", - "count": 1, - "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", - "data": [ - { - "id": "card_2W2fhiuUB8W9Bq", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 10, - "exp_year": 2020, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": "cus_2W2fj6IHUNOc2d", - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null - } - ] - }, - "default_card": "card_2W2fhiuUB8W9Bq" - } - post: - description: | - Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will - be left unchanged. For example, if you pass the card parameter, that becomes the customer's active card to be - used for all charges in future. When you update a customer to a new valid card, the last unpaid invoice (if one exists) - will be retried automatically. - body: - application/x-www-form-urlencoded: - formParameters: - account_balance: - description: | - An integer amount in cents that is the starting account balance for your customer. A negative amount represents a - credit that will be used before attempting any charges to the customer's card; a positive amount will be added to - the next invoice. - type: integer - card: - description: | - The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit - card details (with the options shown below). Passing card will create a new card, make it the new customer default - card, and delete the old customer default if one exists. If you want to add additional cards instead of replacing the - existing default, use the card creation API. Whenever you attach a card to a customer, Stripe will automatically - validate the card. - type: string - coupon: - description: | - If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create - through the API will not have the discount. - type: string - default_card: - description: | - ID of card to make the customer's new default for invoice payments - type: string - description: - description: | - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - This will be unset if you POST an empty value. - type: string - email: - description: | - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and - tracking. This will be unset if you POST an empty value. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account_balance": { - "type":"number", - "id": "http://jsonschema.net/account_balance", - "required":false - }, - "cards": { - "type":"object", - "id": "http://jsonschema.net/cards", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/cards/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/cards/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/cards/data/0", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/country", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/customer", - "required":false - }, - "cvc_check": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/cards/data/0/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/cards/data/0/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/cards/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/cards/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/cards/url", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "default_card": { - "type":"string", - "id": "http://jsonschema.net/default_card", - "required":false - }, - "delinquent": { - "type":"boolean", - "id": "http://jsonschema.net/delinquent", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "subscription": { - "type":"object", - "id": "http://jsonschema.net/subscription", - "required":false, - "properties":{ - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/subscription/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/subscription/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/subscription/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/subscription/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/subscription/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/subscription/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/subscription/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/subscription/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/subscription/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/subscription/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/subscription/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/subscription/trial_start", - "required":false - } - } - } - } - } - example: | - { - "object": "customer", - "created": 1378379137, - "id": "cus_2W2fj6IHUNOc2d", - "livemode": false, - "description": null, - "email": "victor@huge-success.net", - "delinquent": false, - "subscription": { - "id": "su_2W2fay9kQDcftp", - "plan": { - "interval": "month", - "name": "Basic", - "amount": 1000, - "currency": "usd", - "id": "basic", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1378379138, - "status": "active", - "customer": "cus_2W2fj6IHUNOc2d", - "cancel_at_period_end": false, - "current_period_start": 1378379138, - "current_period_end": 1380971138, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1 - }, - "discount": null, - "account_balance": 0, - "cards": { - "object": "list", - "count": 1, - "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", - "data": [ - { - "id": "card_2W2fhiuUB8W9Bq", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 10, - "exp_year": 2020, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": "cus_2W2fj6IHUNOc2d", - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": null, - "address_line1_check": null, - "address_zip_check": null - } - ] - }, - "default_card": "card_2W2fhiuUB8W9Bq" - } - delete: - description: | - Permanently deletes a customer. It cannot be undone. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } - /cards: - displayName: Cards - description: | - Cards operations: - * Creating a new card - * Retrieving a customer's card - * Updating a card - * Deleting cards - * Listing cards - type: baseResource - post: - description: | - Creating a new card. - When you create a new credit card, you must specify a customer. - - Creating a new credit card will not change the customer's default credit card automatically; - you should update the customer with a new default_card for that. - body: - application/x-www-form-urlencoded: - formParameters: - card: - description: | - The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details - (with the options shown below). Whenever you create a new card for a customer, Stripe will automatically validate the card. - Card details: - **number**: required The card number, as a string without any separators. - **exp_month**: required Two digit number representing the card's expiration month. - **exp_year**: required Two or four digit number representing the card's expiration year. - **cvc**: optional, highly recommended Card security code. - **name**: optional, Cardholder's full name. - **address_line1**: optional - **address_line2**: optional - **address_zip**: optional - **address_state**: optional - **address_country**: optional - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - } - } - } - example: | - { - "id": "card_2W2sZ5oLJ4aVNE", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - } - get: - description: | - You can see a list of the customer's cards. Note that the 10 most recent cards are always available by default on the customer object. - If you need more than 10, you can use the listing API to page through the additional cards. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. - type: integer - minimum: 1 - maximum: 100 - default: 10 - offset: - description: | - An offset into the list of returned items. The API will return the requested number of items starting at that offset - type: integer - minimum: 0 - default: 0 - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/data/0", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/data/0/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/data/0/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/data/0/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/data/0/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/data/0/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/data/0/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/data/0/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/0/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/data/0/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/data/0/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/0/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/url", - "required":false - } - } - } - example: | - { - "object": "list", - "url": "/v1/customers/cu_2W3K3PwO1ECFGh/cards", - "count": 2, - "data": [ - { - "id": "card_2W6ZlG7CMrI5Us", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - { - "id": "card_2W6ZlGsdfMrI5Us", - "object": "card", - "last4": "1234", - "type": "Visa", - "exp_month": 1, - "exp_year": 2051, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - } - ] - } - /{CARD_ID}: - type: baseResource - uriParameters: - CARD_ID: - displayName: Card ID - description: ID of card to retrieve - type: string - required: true - get: - description: | - Retrieving a customer's card. - By default, you can see the 10 most recent cards stored on a customer directly on the customer object, - but you can also retrieve details about a specific card stored on the customer. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - } - } - } - example: | - { - "id": "card_2W2sZ5oLJ4aVNE", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - } - post: - description: | - Updating a card. - If you need to update only some card details, like the billing address or expiration date, you can do so without - having to re-enter the full card details. - - When you update a card, Stripe will automatically validate the card. - body: - application/x-www-form-urlencoded: - formParameters: - address_city: - type: string - address_country: - type: string - address_line1: - type: string - address_line2: - type: string - address_state: - type: string - address_zip: - type: string - exp_month: - type: integer - exp_year: - type: integer - name: - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - } - } - } - example: | - { - "id": "card_2W2sZ5oLJ4aVNE", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - } - delete: - description: | - You can delete cards from a customer. If you delete a card that is currently a customer's default, the most recently - added card will be used as the new default. If you delete the customer's last remaining card, the default_card - attribute on the customer will become null. - - Note that you may want to prevent customers on paid subscriptions from deleting all cards on file so that there - is at least one default card for the next invoice payment attempt. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } - /subscription: - type: baseResource - post: - description: | - Subscribes a customer to a plan, meaning the customer will be billed monthly - starting from signup. If the customer already has an active subscription, - we'll update it to the new plan and optionally prorate the price we charge - next month to make up for any price changes. - body: - application/x-www-form-urlencoded: - formParameters: - plan: - description: The identifier of the plan to subscribe the customer to. - type: string - required: true - coupon: - description: | - The code of the coupon to apply to the customer if you would like to - apply it at the same time as creating the subscription. - type: string - default: null - prorate: - description: | - Flag telling us whether to prorate switching plans during a billing - cycle. - type: string - default: true - trial_end: - description: | - UTC integer timestamp representing the end of the trial period the - customer will get before being charged for the first time. If set, - trial_end will override the default trial period of the plan the - customer is being subscribed to. The special value now can be - provided to end the customer's trial immediately. - type: string - default: null - card: - description: | - The card can either be a token, like the ones returned by our Stripe.js, - or a dictionary containing a user's credit card details (with the - options shown below). You must provide a card if the customer does - not already have a valid card attached, and you are subscribing the - customer for a plan that is not free. Passing card will create a new - card, make it the customer default card, and delete the old customer - default if one exists. If you want to add an additional card to use - with subscriptions, instead use the card creation API to add the card - and then the customer update API to set it as the default. Whenever - you attach a card to a customer, Stripe will automatically validate - the card. - Card details: - **number**: required The card number, as a string without any separators. - **exp_month**: required Two digit number representing the card's expiration month. - **exp_year**: required Two or four digit number representing the card's expiration year. - **cvc**: optional, highly recommended Card security code. - **name**: optional, Cardholder's full name. - **address_line1**: optional - **address_line2**: optional - **address_zip**: optional - **address_state**: optional - **address_country**: optional - type: string - quantity: - description: | - The quantity you'd like to apply to the subscription you're creating. - For example, if your plan is $10/user/month, and your customer has 5 - users, you could pass 5 as the quantity to have the customer charged - $50 (5 x $10) monthly. If you update a subscription but don't change - the plan ID (e.g. changing only the trial_end), the subscription will - inherit the old subscription's quantity attribute unless you pass a - new quantity parameter. If you update a subscription and change the - plan ID, the new subscription will not inherit the quantity attribute - and will default to 1 unless you pass a quantity parameter. - type: integer - default: 1 - application_fee_percent: - description: | - A positive integer between 1 and 100 that represents the percentage - of the subscription invoice amount due each billing period (including - any bundled invoice items) that will be transferred to the application - owner's Stripe account. The request must be made with an OAuth key - in order to set an application fee percentage . For more information, - see the application fees documentation. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "application_fee_percent": { - "type":"null", - "id": "http://jsonschema.net/application_fee_percent", - "required":false - }, - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/trial_start", - "required":false - } - } - } - example: | - { - "id": "su_2i0bDIlnaMV0Vq", - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1381139171, - "status": "active", - "customer": "cus_2hzElrZhmfV9my", - "cancel_at_period_end": false, - "current_period_start": 1381139171, - "current_period_end": 1383817571, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1, - "application_fee_percent": null - } - delete: - description: | - Cancels the subscription if it exists. If you set the at_period_end parameter - to true, the subscription will remain active until the end of the period, at - which point it will be cancelled and not renewed. By default, the subscription - is terminated immediately. In either case, the customer will not be charged - again for the subscription. Note, however, that any pending invoice items - that you've created will still be charged for at the end of the period unless - manually deleted.If you've set the subscription to cancel at period end, any - pending prorations will also be left in place and collected at the end of the - period, but if the subscription is set to cancel immediately, pending prorations - will be removed. - By default, all unpaid invoices for the customer will be closed upon subscription - cancellation. We do this in order to prevent unexpected payment retries once - the customer has canceled a subscription. However, you can reopen the invoices - manually after subscription cancellation to have us proceed with automatic - retries, or you could even re-attempt payment yourself on all unpaid invoices - before allowing the customer to cancel the subscription at all. - queryParameters: - at_period_end: - description: | - A flag that if set to true will delay the cancellation of the subscription - until the end of the current period. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "application_fee_percent": { - "type":"null", - "id": "http://jsonschema.net/application_fee_percent", - "required":false - }, - "cancel_at_period_end": { - "type":"boolean", - "id": "http://jsonschema.net/cancel_at_period_end", - "required":false - }, - "canceled_at": { - "type":"null", - "id": "http://jsonschema.net/canceled_at", - "required":false - }, - "current_period_end": { - "type":"number", - "id": "http://jsonschema.net/current_period_end", - "required":false - }, - "current_period_start": { - "type":"number", - "id": "http://jsonschema.net/current_period_start", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "ended_at": { - "type":"null", - "id": "http://jsonschema.net/ended_at", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/plan/trial_period_days", - "required":false - } - } - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/quantity", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/start", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "trial_end": { - "type":"null", - "id": "http://jsonschema.net/trial_end", - "required":false - }, - "trial_start": { - "type":"null", - "id": "http://jsonschema.net/trial_start", - "required":false - } - } - } - example: | - { - "id": "su_2i0bDIlnaMV0Vq", - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "object": "subscription", - "start": 1381139171, - "status": "active", - "customer": "cus_2hzElrZhmfV9my", - "cancel_at_period_end": false, - "current_period_start": 1381139171, - "current_period_end": 1383817571, - "ended_at": null, - "trial_start": null, - "trial_end": null, - "canceled_at": null, - "quantity": 1, - "application_fee_percent": null - } - /discount: - type: baseResource - delete: - description: Removes the currently applied discount on a customer. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } -/plans: - type: baseResource - post: - description: | - You can create plans easily via the plan management page of the Stripe dashboard. - Plan creation is also accessible via the API if you need to create plans on - the fly. - body: - application/x-www-form-urlencoded: - formParameters: - id: - description: | - Unique string of your choice that will be used to identify this plan - when subscribing a customer. This could be an identifier like "gold" - or a primary key from your own database. - type: string - required: true - amount: - description: | - A positive integer in cents (or 0 for a free plan) representing how - much to charge (on a recurring basis). - type: integer - required: true - currency: - description: 3-letter ISO code for currency. - type: string - minLength: 3 - maxLength: 3 - required: true - interval: - description: Specifies billing frequency. Either week, month or year. - enum: [week, month, year] - required: true - interval_count: - description: | - The number of the unit specified in the interval parameter. For - example, you could specify an interval_count of 3 and an interval of - 'month' for quarterly billing (every 3 months). - type: integer - default: 1 - name: - description: | - Name of the plan, to be displayed on invoices and in the web interface. - type: string - required: true - trial_period_days: - description: | - Specifies a trial period in (an integer number of) days. If you - include a trial period, the customer won't be billed for the first - time until the trial period ends. If the customer cancels before the - trial period is over, she'll never be billed at all. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/trial_period_days", - "required":false - } - } - } - example: | - { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - } - get: - description: Returns a list of your plans. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - default: 10 - offset: - description: | - An offset into the list of returned items. The API will return the requested - number of items starting at that offset. - type: integer - default: 0 - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/amount", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "interval_count": { - "type": "number", - "id": "http://jsonschema.net/interval_count", - "required": false - }, - "interval": { - "type": "string", - "id": "http://jsonschema.net/interval", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "name": { - "type": "string", - "id": "http://jsonschema.net/name", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "trial_period_days": { - "type": "null", - "id": "http://jsonschema.net/trial_period_days", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/plans", - "count": 1, - "data": [ - { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - } - ] - } - /{PLAN_ID}: - type: baseResource - uriParameters: - PLAN_ID: - description: The ID of the desired plan. - type: string - get: - description: Retrieves the plan with the given ID. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/trial_period_days", - "required":false - } - } - } - example: | - { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - } - post: - description: | - Updates the name of a plan. Other plan details (price, interval, etc.) are, - by design, not editable. - body: - application/x-www-form-urlencoded: - formParameters: - name: - description: | - Name of the plan, to be displayed on invoices and in the web interface. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/trial_period_days", - "required":false - } - } - } - example: | - { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - } - delete: - description: | - You can delete plans via the plan management page of the Stripe dashboard. - However, deleting a plan does not affect any current subscribers to the plan; - it merely means that new subscribers can't be added to that plan. You can - also delete plans via the API. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } -/coupons: - type: baseResource - post: - description: | - You can create coupons easily via the coupon management page of the Stripe - dashboard. Coupon creation is also accessible via the API if you need to - create coupons on the fly. - A coupon has either a percent_off or an amount_off and currency. If you set - an amount_off, that amount will be subtracted from any invoice's subtotal. - For example, an invoice with a subtotal $10 will have a final total of -$10 - if a coupon with an amount_off of 2000 is applied to it. - body: - application/x-www-form-urlencoded: - formParameters: - id: - description: | - Unique string of your choice that will be used to identify this coupon - when applying it a customer. This is often a specific code you'll - give to your customer to use when signing up (e.g. FALL25OFF). If - you don't want to specify a particular code, you can leave the ID - blank and we'll generate a random code for you. - type: string - duration: - description: | - Specifies how long the discount will be in effect. Can be forever, - once, or repeating. - enum: [ forever, once, repeating ] - required: true - amount_off: - description: | - A positive integer representing the amount to subtract from an invoice - total (if percent_off is not passed). - type: integer - currency: - description: | - Currency of the amount_off parameter (if percent_off is not passed) - type: string - duration_in_months: - description: | - Required only if duration is repeating If duration is repeating, a - positive integer that specifies the number of months the discount - will be in effect. - type: integer - max_redemptions: - description: | - A positive integer specifying the number of times the coupon can be - redeemed before it's no longer valid. For example, you might have a - 50% off coupon that the first 20 readers of your blog can use. - type: integer - percent_off: - description: | - A positive integer between 1 and 100 that represents the discount - the coupon will apply (if amount_off is not passed). - type: integer - minimum: 1 - maximum: 100 - redeem_by: - description: | - UTC timestamp specifying the last time at which the coupon can be - redeemed. After the redeem_by date, the coupon can no longer be - applied to new customers. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_off": { - "type":"null", - "id": "http://jsonschema.net/amount_off", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "duration_in_months": { - "type":"number", - "id": "http://jsonschema.net/duration_in_months", - "required":false - }, - "duration": { - "type":"string", - "id": "http://jsonschema.net/duration", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "max_redemptions": { - "type":"null", - "id": "http://jsonschema.net/max_redemptions", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "percent_off": { - "type":"number", - "id": "http://jsonschema.net/percent_off", - "required":false - }, - "redeem_by": { - "type":"null", - "id": "http://jsonschema.net/redeem_by", - "required":false - }, - "times_redeemed": { - "type":"number", - "id": "http://jsonschema.net/times_redeemed", - "required":false - } - } - } - example: | - { - "id": "259FF", - "percent_off": 25, - "amount_off": null, - "currency": "usd", - "object": "coupon", - "livemode": false, - "duration": "repeating", - "redeem_by": null, - "max_redemptions": null, - "times_redeemed": 0, - "duration_in_months": 3 - } - get: - description: Returns a list of your coupons. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - default: 10 - offset: - description: | - An offset into the list of returned items. The API will return the - requested number of items starting at that offset. - type: integer - default: 0 - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "amount_off": { - "type": "null", - "id": "http://jsonschema.net/amount_off", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "duration_in_months": { - "type": "number", - "id": "http://jsonschema.net/duration_in_months", - "required": false - }, - "duration": { - "type": "string", - "id": "http://jsonschema.net/duration", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "max_redemptions": { - "type": "null", - "id": "http://jsonschema.net/max_redemptions", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "percent_off": { - "type": "number", - "id": "http://jsonschema.net/percent_off", - "required": false - }, - "redeem_by": { - "type": "null", - "id": "http://jsonschema.net/redeem_by", - "required": false - }, - "times_redeemed": { - "type": "number", - "id": "http://jsonschema.net/times_redeemed", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/coupons", - "count": 1, - "data": [ - { - "id": "259FF", - "percent_off": 25, - "amount_off": null, - "currency": "usd", - "object": "coupon", - "livemode": false, - "duration": "repeating", - "redeem_by": null, - "max_redemptions": null, - "times_redeemed": 0, - "duration_in_months": 3 - } - ] - } - /{COUPON_ID}: - type: baseResource - uriParameters: - COUPON_ID: - description: The ID of the desired coupon. - type: string - get: - description: Retrieves the coupon with the given ID. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_off": { - "type":"null", - "id": "http://jsonschema.net/amount_off", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "duration_in_months": { - "type":"number", - "id": "http://jsonschema.net/duration_in_months", - "required":false - }, - "duration": { - "type":"string", - "id": "http://jsonschema.net/duration", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "max_redemptions": { - "type":"null", - "id": "http://jsonschema.net/max_redemptions", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "percent_off": { - "type":"number", - "id": "http://jsonschema.net/percent_off", - "required":false - }, - "redeem_by": { - "type":"null", - "id": "http://jsonschema.net/redeem_by", - "required":false - }, - "times_redeemed": { - "type":"number", - "id": "http://jsonschema.net/times_redeemed", - "required":false - } - } - } - example: | - { - "id": "259FF", - "percent_off": 25, - "amount_off": null, - "currency": "usd", - "object": "coupon", - "livemode": false, - "duration": "repeating", - "redeem_by": null, - "max_redemptions": null, - "times_redeemed": 0, - "duration_in_months": 3 - } - delete: - description: | - You can delete coupons via the coupon management page of the Stripe dashboard. - However, deleting a coupon does not affect any customers who have already - applied the coupon; it means that new customers can't redeem the coupon. You - can also delete coupons via the API. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } -/invoices: - type: baseResource - post: - description: | - If you need to invoice your customer outside the regular billing cycle, you - can create an invoice that pulls in all pending invoice items, including - prorations. The customer's billing cycle and regular subscription won't be - affected. - Once you create the invoice, it'll be picked up and paid automatically, - though you can choose to pay it right away. - body: - application/x-www-form-urlencoded: - formParameters: - customer: - type: string - required: true - application_fee: - description: | - A fee in cents that will be applied to the invoice and transferred - to the application owner's Stripe account. The request must be made - with an OAuth key in order to take an application fee. For more - information, see the application fees documentation. - type: integer - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_due": { - "type":"number", - "id": "http://jsonschema.net/amount_due", - "required":false - }, - "application_fee": { - "type":"null", - "id": "http://jsonschema.net/application_fee", - "required":false - }, - "attempt_count": { - "type":"number", - "id": "http://jsonschema.net/attempt_count", - "required":false - }, - "attempted": { - "type":"boolean", - "id": "http://jsonschema.net/attempted", - "required":false - }, - "charge": { - "type":"null", - "id": "http://jsonschema.net/charge", - "required":false - }, - "closed": { - "type":"boolean", - "id": "http://jsonschema.net/closed", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "ending_balance": { - "type":"null", - "id": "http://jsonschema.net/ending_balance", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "lines": { - "type":"object", - "id": "http://jsonschema.net/lines", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/lines/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/lines/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/lines/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/object", - "required":false - }, - "period": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/period", - "required":false, - "properties":{ - "end": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/end", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/start", - "required":false - } - } - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", - "required":false - } - } - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/proration", - "required":false - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/quantity", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/lines/url", - "required":false - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "next_payment_attempt": { - "type":"null", - "id": "http://jsonschema.net/next_payment_attempt", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "period_end": { - "type":"number", - "id": "http://jsonschema.net/period_end", - "required":false - }, - "period_start": { - "type":"number", - "id": "http://jsonschema.net/period_start", - "required":false - }, - "starting_balance": { - "type":"number", - "id": "http://jsonschema.net/starting_balance", - "required":false - }, - "subtotal": { - "type":"number", - "id": "http://jsonschema.net/subtotal", - "required":false - }, - "total": { - "type":"number", - "id": "http://jsonschema.net/total", - "required":false - } - } - } - example: | - { - "date": 1381134043, - "id": "in_2hzEcE91Q3iHBb", - "period_start": 1381134043, - "period_end": 1381134043, - "lines": { - "data": [ - { - "id": "su_2i0bDIlnaMV0Vq", - "object": "line_item", - "type": "subscription", - "livemode": true, - "amount": 100, - "currency": "usd", - "proration": false, - "period": { - "start": 1383817571, - "end": 1386409571 - }, - "quantity": 1, - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "description": null - } - ], - "count": 1, - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" - }, - "subtotal": 0, - "total": 0, - "customer": "cus_2hzElrZhmfV9my", - "object": "invoice", - "attempted": true, - "closed": true, - "paid": true, - "livemode": false, - "attempt_count": 0, - "amount_due": 0, - "currency": "usd", - "starting_balance": 0, - "ending_balance": null, - "next_payment_attempt": null, - "charge": null, - "discount": null, - "application_fee": null - } - /{INVOICE_ID}: - type: baseResource - uriParameters: - INVOICE_ID: - description: The identifier of the desired invoice. - type: string - get: - description: | - Retrieves the invoice with the given ID. - Returns an invoice object if a valid invoice ID was provided. Returns an - error otherwise. - The invoice object contains a lines hash that contains information about the - subscriptions and invoice items that have been applied to the invoice, as - well as any prorations that Stripe has automatically calculated. Each line - on the invoice has an amount attribute that represents the amount actually - contributed to the invoice's total. For invoice items and prorations, the - amount attribute is the same as for the invoice item or proration respectively. - For subscriptions, the amount may be different from the plan's regular price - depending on whether the invoice covers a trial period or the invoice period - differs from the plan's usual interval. - The invoice object has both a subtotal and a total. The subtotal represents - the total before any discounts, while the total is the final amount to be - charged to the customer after all coupons have been applied. - The invoice also has a next_payment_attempt attribute that tells you the next - time (as a UTC timestamp) payment for the invoice will be automatically - attempted. For invoices that have been closed or that have reached the maximum - number of retries (specified in your retry settings) , the next_payment_attempt - will be null. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_due": { - "type":"number", - "id": "http://jsonschema.net/amount_due", - "required":false - }, - "application_fee": { - "type":"null", - "id": "http://jsonschema.net/application_fee", - "required":false - }, - "attempt_count": { - "type":"number", - "id": "http://jsonschema.net/attempt_count", - "required":false - }, - "attempted": { - "type":"boolean", - "id": "http://jsonschema.net/attempted", - "required":false - }, - "charge": { - "type":"null", - "id": "http://jsonschema.net/charge", - "required":false - }, - "closed": { - "type":"boolean", - "id": "http://jsonschema.net/closed", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "ending_balance": { - "type":"null", - "id": "http://jsonschema.net/ending_balance", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "lines": { - "type":"object", - "id": "http://jsonschema.net/lines", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/lines/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/lines/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/lines/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/object", - "required":false - }, - "period": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/period", - "required":false, - "properties":{ - "end": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/end", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/start", - "required":false - } - } - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", - "required":false - } - } - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/proration", - "required":false - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/quantity", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/lines/url", - "required":false - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "next_payment_attempt": { - "type":"null", - "id": "http://jsonschema.net/next_payment_attempt", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "period_end": { - "type":"number", - "id": "http://jsonschema.net/period_end", - "required":false - }, - "period_start": { - "type":"number", - "id": "http://jsonschema.net/period_start", - "required":false - }, - "starting_balance": { - "type":"number", - "id": "http://jsonschema.net/starting_balance", - "required":false - }, - "subtotal": { - "type":"number", - "id": "http://jsonschema.net/subtotal", - "required":false - }, - "total": { - "type":"number", - "id": "http://jsonschema.net/total", - "required":false - } - } - } - example: | - { - "date": 1381134043, - "id": "in_2hzEcE91Q3iHBb", - "period_start": 1381134043, - "period_end": 1381134043, - "lines": { - "data": [ - { - "id": "su_2i0bDIlnaMV0Vq", - "object": "line_item", - "type": "subscription", - "livemode": true, - "amount": 100, - "currency": "usd", - "proration": false, - "period": { - "start": 1383817571, - "end": 1386409571 - }, - "quantity": 1, - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "description": null - } - ], - "count": 1, - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" - }, - "subtotal": 0, - "total": 0, - "customer": "cus_2hzElrZhmfV9my", - "object": "invoice", - "attempted": true, - "closed": true, - "paid": true, - "livemode": false, - "attempt_count": 0, - "amount_due": 0, - "currency": "usd", - "starting_balance": 0, - "ending_balance": null, - "next_payment_attempt": null, - "charge": null, - "discount": null, - "application_fee": null - } - post: - description: | - Until an invoice is paid, it is marked as open (closed=false). If you'd like to - stop Stripe from automatically attempting payment on an invoice or would simply - like to close the invoice out as no longer owed by the customer, you can update - the closed parameter. - body: - application/x-www-form-urlencoded: - formParameters: - application_fee: - description: | - A fee in cents that will be applied to the invoice and transferred to - the application owner's Stripe account. The request must be made with - an OAuth key in order to take an application fee. For more information, - see the application fees documentation. - type: integer - closed: - description: | - Boolean representing whether an invoice is closed or not. To close an - invoice, pass true. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_due": { - "type":"number", - "id": "http://jsonschema.net/amount_due", - "required":false - }, - "application_fee": { - "type":"null", - "id": "http://jsonschema.net/application_fee", - "required":false - }, - "attempt_count": { - "type":"number", - "id": "http://jsonschema.net/attempt_count", - "required":false - }, - "attempted": { - "type":"boolean", - "id": "http://jsonschema.net/attempted", - "required":false - }, - "charge": { - "type":"null", - "id": "http://jsonschema.net/charge", - "required":false - }, - "closed": { - "type":"boolean", - "id": "http://jsonschema.net/closed", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "ending_balance": { - "type":"null", - "id": "http://jsonschema.net/ending_balance", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "lines": { - "type":"object", - "id": "http://jsonschema.net/lines", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/lines/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/lines/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/lines/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/object", - "required":false - }, - "period": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/period", - "required":false, - "properties":{ - "end": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/end", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/start", - "required":false - } - } - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", - "required":false - } - } - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/proration", - "required":false - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/quantity", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/lines/url", - "required":false - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "next_payment_attempt": { - "type":"null", - "id": "http://jsonschema.net/next_payment_attempt", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "period_end": { - "type":"number", - "id": "http://jsonschema.net/period_end", - "required":false - }, - "period_start": { - "type":"number", - "id": "http://jsonschema.net/period_start", - "required":false - }, - "starting_balance": { - "type":"number", - "id": "http://jsonschema.net/starting_balance", - "required":false - }, - "subtotal": { - "type":"number", - "id": "http://jsonschema.net/subtotal", - "required":false - }, - "total": { - "type":"number", - "id": "http://jsonschema.net/total", - "required":false - } - } - } - example: | - { - "date": 1381134043, - "id": "in_2hzEcE91Q3iHBb", - "period_start": 1381134043, - "period_end": 1381134043, - "lines": { - "data": [ - { - "id": "su_2i0bDIlnaMV0Vq", - "object": "line_item", - "type": "subscription", - "livemode": true, - "amount": 100, - "currency": "usd", - "proration": false, - "period": { - "start": 1383817571, - "end": 1386409571 - }, - "quantity": 1, - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "description": null - } - ], - "count": 1, - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" - }, - "subtotal": 0, - "total": 0, - "customer": "cus_2hzElrZhmfV9my", - "object": "invoice", - "attempted": true, - "closed": true, - "paid": true, - "livemode": false, - "attempt_count": 0, - "amount_due": 0, - "currency": "usd", - "starting_balance": 0, - "ending_balance": null, - "next_payment_attempt": null, - "charge": null, - "discount": null, - "application_fee": null - } - # Lines - /lines: - type: baseResource - get: - description: | - When retrieving an invoice, you'll get a lines property containing the total - count of line items and the first handful of those items. There is also a URL - where you can retrieve the full (paginated) list of line items. - queryParameters: - id: - description: | - The id of the invoice containing the lines to be retrieved - type: string - required: true - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - default: 10 - customer: - description: | - In the case of upcoming invoices, the customer of the upcoming invoice - is required. In other cases it is ignored. - type: string - offset: - description: | - An offset into the list of returned items. The API will return the - requested number of items starting at that offset. - type: integer - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/amount", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "description": { - "type": "string", - "id": "http://jsonschema.net/description", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "period": { - "type": "object", - "id": "http://jsonschema.net/period", - "required": false, - "properties": { - "end": { - "type": "number", - "id": "http://jsonschema.net/period/end", - "required": false - }, - "start": { - "type": "number", - "id": "http://jsonschema.net/period/start", - "required": false - } - } - }, - "plan": { - "type": "null", - "id": "http://jsonschema.net/plan", - "required": false - }, - "proration": { - "type": "boolean", - "id": "http://jsonschema.net/proration", - "required": false - }, - "quantity": { - "type": "null", - "id": "http://jsonschema.net/quantity", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/type", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines", - "count": 1, - "data": [ - { - "id": "ii_2Xovytvup4IajJ", - "object": "line_item", - "type": "invoiceitem", - "livemode": false, - "amount": 1, - "currency": "usd", - "proration": true, - "period": { - "start": 1378789336, - "end": 1378789336 - }, - "quantity": null, - "plan": null, - "description": "Remaining time on Prep Plan 2 after 10 Sep 2013" - } - ] - } - # Pay - /pay: - type: baseResource - post: - description: | - Stripe automatically creates and then attempts to pay invoices for customers - on subscriptions. We'll also retry unpaid invoices according to your retry - settings. However, if you'd like to attempt to collect payment on an invoice - out of the normal retry schedule or for some other reason, you can do so. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_due": { - "type":"number", - "id": "http://jsonschema.net/amount_due", - "required":false - }, - "application_fee": { - "type":"null", - "id": "http://jsonschema.net/application_fee", - "required":false - }, - "attempt_count": { - "type":"number", - "id": "http://jsonschema.net/attempt_count", - "required":false - }, - "attempted": { - "type":"boolean", - "id": "http://jsonschema.net/attempted", - "required":false - }, - "charge": { - "type":"null", - "id": "http://jsonschema.net/charge", - "required":false - }, - "closed": { - "type":"boolean", - "id": "http://jsonschema.net/closed", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "ending_balance": { - "type":"null", - "id": "http://jsonschema.net/ending_balance", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "lines": { - "type":"object", - "id": "http://jsonschema.net/lines", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/lines/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/lines/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/lines/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/object", - "required":false - }, - "period": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/period", - "required":false, - "properties":{ - "end": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/end", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/start", - "required":false - } - } - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", - "required":false - } - } - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/proration", - "required":false - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/quantity", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/lines/url", - "required":false - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "next_payment_attempt": { - "type":"null", - "id": "http://jsonschema.net/next_payment_attempt", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "period_end": { - "type":"number", - "id": "http://jsonschema.net/period_end", - "required":false - }, - "period_start": { - "type":"number", - "id": "http://jsonschema.net/period_start", - "required":false - }, - "starting_balance": { - "type":"number", - "id": "http://jsonschema.net/starting_balance", - "required":false - }, - "subtotal": { - "type":"number", - "id": "http://jsonschema.net/subtotal", - "required":false - }, - "total": { - "type":"number", - "id": "http://jsonschema.net/total", - "required":false - } - } - } - example: | - { - "date": 1381134043, - "id": "in_2hzEcE91Q3iHBb", - "period_start": 1381134043, - "period_end": 1381134043, - "lines": { - "data": [ - { - "id": "su_2i0bDIlnaMV0Vq", - "object": "line_item", - "type": "subscription", - "livemode": true, - "amount": 100, - "currency": "usd", - "proration": false, - "period": { - "start": 1383817571, - "end": 1386409571 - }, - "quantity": 1, - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "description": null - } - ], - "count": 1, - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" - }, - "subtotal": 0, - "total": 0, - "customer": "cus_2hzElrZhmfV9my", - "object": "invoice", - "attempted": true, - "closed": true, - "paid": true, - "livemode": false, - "attempt_count": 0, - "amount_due": 0, - "currency": "usd", - "starting_balance": 0, - "ending_balance": null, - "next_payment_attempt": null, - "charge": null, - "discount": null, - "application_fee": null - } - /upcoming: - type: baseResource - get: - description: | - At any time, you can view the upcoming invoice for a customer. This will - show you all the charges that are pending, including subscription renewal - charges, invoice item charges, etc. It will also show you any discount - that is applicable to the customer. - queryParameters: - customer: - description: | - The identifier of the customer whose upcoming invoice you'd like to - retrieve. - type: string - required: true - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount_due": { - "type":"number", - "id": "http://jsonschema.net/amount_due", - "required":false - }, - "application_fee": { - "type":"null", - "id": "http://jsonschema.net/application_fee", - "required":false - }, - "attempt_count": { - "type":"number", - "id": "http://jsonschema.net/attempt_count", - "required":false - }, - "attempted": { - "type":"boolean", - "id": "http://jsonschema.net/attempted", - "required":false - }, - "charge": { - "type":"null", - "id": "http://jsonschema.net/charge", - "required":false - }, - "closed": { - "type":"boolean", - "id": "http://jsonschema.net/closed", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "discount": { - "type":"null", - "id": "http://jsonschema.net/discount", - "required":false - }, - "ending_balance": { - "type":"null", - "id": "http://jsonschema.net/ending_balance", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "lines": { - "type":"object", - "id": "http://jsonschema.net/lines", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/lines/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/lines/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/lines/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/object", - "required":false - }, - "period": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/period", - "required":false, - "properties":{ - "end": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/end", - "required":false - }, - "start": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/period/start", - "required":false - } - } - }, - "plan": { - "type":"object", - "id": "http://jsonschema.net/lines/data/0/plan", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/currency", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/id", - "required":false - }, - "interval_count": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/plan/interval_count", - "required":false - }, - "interval": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/interval", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/plan/livemode", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/plan/object", - "required":false - }, - "trial_period_days": { - "type":"null", - "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", - "required":false - } - } - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/lines/data/0/proration", - "required":false - }, - "quantity": { - "type":"number", - "id": "http://jsonschema.net/lines/data/0/quantity", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/lines/data/0/type", - "required":false - } - } - } - - - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/lines/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/lines/url", - "required":false - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "next_payment_attempt": { - "type":"null", - "id": "http://jsonschema.net/next_payment_attempt", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/paid", - "required":false - }, - "period_end": { - "type":"number", - "id": "http://jsonschema.net/period_end", - "required":false - }, - "period_start": { - "type":"number", - "id": "http://jsonschema.net/period_start", - "required":false - }, - "starting_balance": { - "type":"number", - "id": "http://jsonschema.net/starting_balance", - "required":false - }, - "subtotal": { - "type":"number", - "id": "http://jsonschema.net/subtotal", - "required":false - }, - "total": { - "type":"number", - "id": "http://jsonschema.net/total", - "required":false - } - } - } - example: | - { - "date": 1381134043, - "id": "in_2hzEcE91Q3iHBb", - "period_start": 1381134043, - "period_end": 1381134043, - "lines": { - "data": [ - { - "id": "su_2i0bDIlnaMV0Vq", - "object": "line_item", - "type": "subscription", - "livemode": true, - "amount": 100, - "currency": "usd", - "proration": false, - "period": { - "start": 1383817571, - "end": 1386409571 - }, - "quantity": 1, - "plan": { - "interval": "month", - "name": "Java Bindings Plan", - "amount": 100, - "currency": "usd", - "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", - "object": "plan", - "livemode": false, - "interval_count": 1, - "trial_period_days": null - }, - "description": null - } - ], - "count": 1, - "object": "list", - "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" - }, - "subtotal": 0, - "total": 0, - "customer": "cus_2hzElrZhmfV9my", - "object": "invoice", - "attempted": true, - "closed": true, - "paid": true, - "livemode": false, - "attempt_count": 0, - "amount_due": 0, - "currency": "usd", - "starting_balance": 0, - "ending_balance": null, - "next_payment_attempt": null, - "charge": null, - "discount": null, - "application_fee": null - } -/invoiceitems: - type: baseResource - post: - description: | - Adds an arbitrary charge or credit to the customer's upcoming invoice. - body: - application/x-www-form-urlencoded: - formParameters: - customer: - description: | - The ID of the customer who will be billed when this invoice item is - billed. - type: string - required: true - amount: - description: | - The integer amount in cents of the charge to be applied to the upcoming - invoice. If you want to apply a credit to the customer's account, - pass a negative amount. - type: integer - required: true - currency: - description: 3-letter ISO code for currency. - type: string - minLength: 3 - maxLength: 3 - required: true - invoice: - description: | - The ID of an existing invoice to add this invoice item to. When left - blank, the invoice item will be added to the next upcoming scheduled - invoice. Use this when adding invoice items in response to an - invoice.created webhook. You cannot add an invoice item to an invoice - that has already been paid or closed. - type: string - description: - description: | - An arbitrary string which you can attach to the invoice item. The - description is displayed in the invoice for easy tracking. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/proration", - "required":false - } - } - } - example: | - { - "object": "invoiceitem", - "id": "ii_2Xovytvup4IajJ", - "date": 1378789336, - "amount": 0, - "livemode": false, - "proration": true, - "currency": "usd", - "customer": "cus_2hzElrZhmfV9my", - "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", - "invoice": null - } - get: - description: | - Returns a list of your invoice items. Invoice Items are returned sorted by - creation date, with the most recently created invoice items appearing first. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - created: - description: | - A filter on the list based on the object created field. The value can be - a string with an exact UTC timestamp, or it can be a dictionary with the - following options: - **gt**: optional Return values where the created field is after this timestamp. - **gte**: optional Return values where the created field is after or equal to this timestamp. - **lt**: optional Return values where the created field is before this timestamp. - **lte**: optional Return values where the created field is before or equal to this timestamp. - **customer**: optional The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. - **offset**: optional default is 0 An offset into the list of returned items. The API will return the requested number of items starting at that offset. - type: string - customer: - description: | - The identifier of the customer whose invoice items to return. If none is - provided, all invoice items will be returned. - type: string - offset: - description: | - An offset into the list of returned items. The API will return the requested - number of items starting at that offset. - type: integer - default: 0 - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/amount", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "customer": { - "type": "string", - "id": "http://jsonschema.net/customer", - "required": false - }, - "date": { - "type": "number", - "id": "http://jsonschema.net/date", - "required": false - }, - "description": { - "type": "string", - "id": "http://jsonschema.net/description", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "invoice": { - "type": "null", - "id": "http://jsonschema.net/invoice", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "proration": { - "type": "boolean", - "id": "http://jsonschema.net/proration", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/invoiceitems", - "count": 1, - "data": [ - { - "object": "invoiceitem", - "id": "ii_2Xovytvup4IajJ", - "date": 1378789336, - "amount": 0, - "livemode": false, - "proration": true, - "currency": "usd", - "customer": "cus_2hzElrZhmfV9my", - "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", - "invoice": null - } - ] - } - /{ID}: - type: baseResource - uriParameters: - ID: - description: The identifier of the invoice item. - type: string - get: - description: Retrieves the invoice item with the given ID. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "customer": { - "type":"string", - "id": "http://jsonschema.net/customer", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "proration": { - "type":"boolean", - "id": "http://jsonschema.net/proration", - "required":false - } - } - } - example: | - { - "object": "invoiceitem", - "id": "ii_2Xovytvup4IajJ", - "date": 1378789336, - "amount": 0, - "livemode": false, - "proration": true, - "currency": "usd", - "customer": "cus_2hzElrZhmfV9my", - "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", - "invoice": null - } - delete: - description: | - Removes an invoice item from the upcoming invoice. Removing an invoice item - is only possible before the invoice it's attached to is closed. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } -/transfers: - type: baseResource - post: - description: | - To send funds from your Stripe account to a third-party bank account, you - create a new transfer object. Your Stripe balance must be able to cover - the transfer amount, or you'll receive an "Insufficient Funds" error. - If your API key is in test mode, money won't actually be sent, though - everything else will occur as if in live mode. - body: - application/x-www-form-urlencoded: - formParameters: - amount: - description: | - A positive integer in cents representing how much to transfer. - type: integer - required: true - currency: - description: 3-letter ISO code for currency. - type: string - maxLength: 3 - minLength: 3 - required: true - recipient: - description: | - The ID of an existing, verified recipient that the money will - be transferred to in this request. If self, the money will be - transferred to the bank account associated with your account. - type: string - required: true - description: - description: | - An arbitrary string which you can attach to a transfer object. - It is displayed when in the web interface alongside the transfer. - type: string - default: null - statement_descriptor: - description: | - An arbitrary string which will be displayed on the recipient's bank - statement. This should not include your company name, as that will - already be part of the descriptor. The maximum length of this string - is 15 characters; longer strings will be truncated. - For example, if your website is EXAMPLE.COM and you pass in - `INVOICE 1234`, the user will see - `EXAMPLE.COM INVOICE 1234`. - Note: While most banks display this information consistently, some - may display it incorrectly or not at all. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account": { - "type":"null", - "id": "http://jsonschema.net/account", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "other_transfers": { - "type":"array", - "id": "http://jsonschema.net/other_transfers", - "required":false, - "items": - { - "type":"string", - "id": "http://jsonschema.net/other_transfers/0", - "required":false - } - }, - "recipient": { - "type":"null", - "id": "http://jsonschema.net/recipient", - "required":false - }, - "statement_descriptor": { - "type":"null", - "id": "http://jsonschema.net/statement_descriptor", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "summary": { - "type":"object", - "id": "http://jsonschema.net/summary", - "required":false, - "properties":{ - "adjustment_count": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_count", - "required":false - }, - "adjustment_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/adjustment_fee_details", - "required":false - }, - "adjustment_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_fees", - "required":false - }, - "adjustment_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_gross", - "required":false - }, - "charge_count": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_count", - "required":false - }, - "charge_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/charge_fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/summary/charge_fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/type", - "required":false - } - } - } - }, - "charge_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fees", - "required":false - }, - "charge_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_gross", - "required":false - }, - "collected_fee_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_count", - "required":false - }, - "collected_fee_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_gross", - "required":false - }, - "collected_fee_refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_count", - "required":false - }, - "collected_fee_refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_gross", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/currency", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/summary/net", - "required":false - }, - "refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_count", - "required":false - }, - "refund_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/refund_fee_details", - "required":false - }, - "refund_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_fees", - "required":false - }, - "refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_gross", - "required":false - }, - "validation_count": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_count", - "required":false - }, - "validation_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_fees", - "required":false - } - } - }, - "transactions": { - "type":"object", - "id": "http://jsonschema.net/transactions", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/transactions/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/transactions/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/amount", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/description", - "required":false - }, - "fee_details": { - "type":"array", - "id": "http://jsonschema.net/transactions/data/0/fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", - "required":false - } - } - } - }, - "fee": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/id", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/net", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/type", - "required":false - } - } - } - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/transactions/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/transactions/url", - "required":false - } - } - } - } - } - example: | - { - "id": "tr_2OKKQ4A6HN1WJy", - "object": "transfer", - "date": 1376524800, - "livemode": false, - "amount": 286710, - "currency": "usd", - "status": "paid", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "summary": { - "charge_gross": 316670, - "charge_fees": 29960, - "charge_fee_details": [ - { - "amount": 29960, - "currency": "usd", - "type": "stripe_fee", - "description": null, - "application": null - } - ], - "refund_gross": 0, - "refund_fees": 0, - "refund_fee_details": [ - - ], - "adjustment_gross": 0, - "adjustment_fees": 0, - "adjustment_fee_details": [ - - ], - "validation_fees": 0, - "validation_count": 0, - "charge_count": 682, - "refund_count": 0, - "adjustment_count": 0, - "net": 286710, - "currency": "usd", - "collected_fee_gross": 0, - "collected_fee_count": 0, - "collected_fee_refund_gross": 0, - "collected_fee_refund_count": 0 - }, - "transactions": { - "object": "list", - "count": 682, - "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", - "data": [ - { - "id": "ch_2Nn7UTSkz0cxq9", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476192, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn8hBMCCN0b1r", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476252, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9rrWLlKk7Mj", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476312, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9z9LTfcoJvW", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9jymNURQqY5", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - } - ] - }, - "other_transfers": [ - "tr_2OKKQ4A6HN1WJy" - ], - "account": null, - "description": "STRIPE TRANSFER", - "metadata": { - }, - "statement_descriptor": null, - "recipient": null - } - get: - description: | - Returns a list of existing transfers sent to third-party bank accounts or - that Stripe has sent you. The transfers are returned in sorted order, with - the most recent transfers appearing first. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - date: - description: | - A filter on the list based on the object date field. The value can be a - string with an exact UTC timestamp, or it can be a dictionary with the - following options: - **gt**: optional Return values where the date field is after this timestamp. - **gte**: optional Return values where the date field is after or equal to this timestamp. - **lt**: optional Return values where the date field is before this timestamp. - **lte**: optional Return values where the date field is before or equal to this timestamp. - type: string - offset: - description: | - An offset into the list of returned items. The API will return the - requested number of items starting at that offset. - type: integer - default: 0 - recipient: - description: | - Only return transfers for the recipient specified by this recipient ID. - type: string - status: - description: | - Only return transfers that have the given status: pending, paid, or failed. - enum: [ pending, paid, failed ] - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "account": { - "type": "null", - "id": "http://jsonschema.net/account", - "required": false - }, - "amount": { - "type": "number", - "id": "http://jsonschema.net/amount", - "required": false - }, - "balance_transaction": { - "type": "string", - "id": "http://jsonschema.net/balance_transaction", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "date": { - "type": "number", - "id": "http://jsonschema.net/date", - "required": false - }, - "description": { - "type": "string", - "id": "http://jsonschema.net/description", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "metadata": { - "type": "object", - "id": "http://jsonschema.net/metadata", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "other_transfers": { - "type": "array", - "id": "http://jsonschema.net/other_transfers", - "required": false, - "items": { - "type": "string", - "id": "http://jsonschema.net/other_transfers/0", - "required": false - } - }, - "recipient": { - "type": "null", - "id": "http://jsonschema.net/recipient", - "required": false - }, - "statement_descriptor": { - "type": "null", - "id": "http://jsonschema.net/statement_descriptor", - "required": false - }, - "status": { - "type": "string", - "id": "http://jsonschema.net/status", - "required": false - }, - "summary": { - "type": "object", - "id": "http://jsonschema.net/summary", - "required": false, - "properties": { - "adjustment_count": { - "type": "number", - "id": "http://jsonschema.net/summary/adjustment_count", - "required": false - }, - "adjustment_fee_details": { - "type": "array", - "id": "http://jsonschema.net/summary/adjustment_fee_details", - "required": false - }, - "adjustment_fees": { - "type": "number", - "id": "http://jsonschema.net/summary/adjustment_fees", - "required": false - }, - "adjustment_gross": { - "type": "number", - "id": "http://jsonschema.net/summary/adjustment_gross", - "required": false - }, - "charge_count": { - "type": "number", - "id": "http://jsonschema.net/summary/charge_count", - "required": false - }, - "charge_fee_details": { - "type": "array", - "id": "http://jsonschema.net/summary/charge_fee_details", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net/summary/charge_fee_details/0", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", - "required": false - }, - "application": { - "type": "null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/application", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", - "required": false - }, - "description": { - "type": "null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/description", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/type", - "required": false - } - } - } - }, - "charge_fees": { - "type": "number", - "id": "http://jsonschema.net/summary/charge_fees", - "required": false - }, - "charge_gross": { - "type": "number", - "id": "http://jsonschema.net/summary/charge_gross", - "required": false - }, - "collected_fee_count": { - "type": "number", - "id": "http://jsonschema.net/summary/collected_fee_count", - "required": false - }, - "collected_fee_gross": { - "type": "number", - "id": "http://jsonschema.net/summary/collected_fee_gross", - "required": false - }, - "collected_fee_refund_count": { - "type": "number", - "id": "http://jsonschema.net/summary/collected_fee_refund_count", - "required": false - }, - "collected_fee_refund_gross": { - "type": "number", - "id": "http://jsonschema.net/summary/collected_fee_refund_gross", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/summary/currency", - "required": false - }, - "net": { - "type": "number", - "id": "http://jsonschema.net/summary/net", - "required": false - }, - "refund_count": { - "type": "number", - "id": "http://jsonschema.net/summary/refund_count", - "required": false - }, - "refund_fee_details": { - "type": "array", - "id": "http://jsonschema.net/summary/refund_fee_details", - "required": false - }, - "refund_fees": { - "type": "number", - "id": "http://jsonschema.net/summary/refund_fees", - "required": false - }, - "refund_gross": { - "type": "number", - "id": "http://jsonschema.net/summary/refund_gross", - "required": false - }, - "validation_count": { - "type": "number", - "id": "http://jsonschema.net/summary/validation_count", - "required": false - }, - "validation_fees": { - "type": "number", - "id": "http://jsonschema.net/summary/validation_fees", - "required": false - } - } - }, - "transactions": { - "type": "object", - "id": "http://jsonschema.net/transactions", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/transactions/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/transactions/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net/transactions/data/0", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/transactions/data/0/amount", - "required": false - }, - "created": { - "type": "number", - "id": "http://jsonschema.net/transactions/data/0/created", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/currency", - "required": false - }, - "description": { - "type": "null", - "id": "http://jsonschema.net/transactions/data/0/description", - "required": false - }, - "fee_details": { - "type": "array", - "id": "http://jsonschema.net/transactions/data/0/fee_details", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", - "required": false - }, - "application": { - "type": "null", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", - "required": false - }, - "description": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", - "required": false - } - } - } - }, - "fee": { - "type": "number", - "id": "http://jsonschema.net/transactions/data/0/fee", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/id", - "required": false - }, - "net": { - "type": "number", - "id": "http://jsonschema.net/transactions/data/0/net", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/transactions/data/0/type", - "required": false - } - } - } - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/transactions/object", - "required": false - }, - "url": { - "type": "string", - "id": "http://jsonschema.net/transactions/url", - "required": false - } - } - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/transfers", - "count": 1, - "data": [ - { - "id": "tr_2OKKQ4A6HN1WJy", - "object": "transfer", - "date": 1376524800, - "livemode": false, - "amount": 286710, - "currency": "usd", - "status": "paid", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "summary": { - "charge_gross": 316670, - "charge_fees": 29960, - "charge_fee_details": [ - { - "amount": 29960, - "currency": "usd", - "type": "stripe_fee", - "description": null, - "application": null - } - ], - "refund_gross": 0, - "refund_fees": 0, - "refund_fee_details": [ - - ], - "adjustment_gross": 0, - "adjustment_fees": 0, - "adjustment_fee_details": [ - - ], - "validation_fees": 0, - "validation_count": 0, - "charge_count": 682, - "refund_count": 0, - "adjustment_count": 0, - "net": 286710, - "currency": "usd", - "collected_fee_gross": 0, - "collected_fee_count": 0, - "collected_fee_refund_gross": 0, - "collected_fee_refund_count": 0 - }, - "transactions": { - "object": "list", - "count": 682, - "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", - "data": [ - { - "id": "ch_2Nn7UTSkz0cxq9", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476192, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn8hBMCCN0b1r", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476252, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9rrWLlKk7Mj", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476312, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9z9LTfcoJvW", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9jymNURQqY5", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - } - ] - }, - "other_transfers": [ - "tr_2OKKQ4A6HN1WJy" - ], - "account": null, - "description": "STRIPE TRANSFER", - "metadata": { - }, - "statement_descriptor": null, - "recipient": null - } - ] - } - /{transfer_ID}: - type: baseResource - uriParameters: - transfer_ID: - description: The identifier of the transfer. - get: - description: | - Retrieves the details of an existing transfer. Supply the unique transfer ID - from either a transfer creation request or the transfer list, and Stripe will - return the corresponding transfer information. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account": { - "type":"null", - "id": "http://jsonschema.net/account", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "other_transfers": { - "type":"array", - "id": "http://jsonschema.net/other_transfers", - "required":false, - "items": - { - "type":"string", - "id": "http://jsonschema.net/other_transfers/0", - "required":false - } - }, - "recipient": { - "type":"null", - "id": "http://jsonschema.net/recipient", - "required":false - }, - "statement_descriptor": { - "type":"null", - "id": "http://jsonschema.net/statement_descriptor", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "summary": { - "type":"object", - "id": "http://jsonschema.net/summary", - "required":false, - "properties":{ - "adjustment_count": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_count", - "required":false - }, - "adjustment_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/adjustment_fee_details", - "required":false - }, - "adjustment_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_fees", - "required":false - }, - "adjustment_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_gross", - "required":false - }, - "charge_count": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_count", - "required":false - }, - "charge_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/charge_fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/summary/charge_fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/type", - "required":false - } - } - } - }, - "charge_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fees", - "required":false - }, - "charge_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_gross", - "required":false - }, - "collected_fee_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_count", - "required":false - }, - "collected_fee_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_gross", - "required":false - }, - "collected_fee_refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_count", - "required":false - }, - "collected_fee_refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_gross", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/currency", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/summary/net", - "required":false - }, - "refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_count", - "required":false - }, - "refund_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/refund_fee_details", - "required":false - }, - "refund_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_fees", - "required":false - }, - "refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_gross", - "required":false - }, - "validation_count": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_count", - "required":false - }, - "validation_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_fees", - "required":false - } - } - }, - "transactions": { - "type":"object", - "id": "http://jsonschema.net/transactions", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/transactions/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/transactions/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/amount", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/description", - "required":false - }, - "fee_details": { - "type":"array", - "id": "http://jsonschema.net/transactions/data/0/fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", - "required":false - } - } - } - }, - "fee": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/id", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/net", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/type", - "required":false - } - } - } - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/transactions/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/transactions/url", - "required":false - } - } - } - } - } - example: | - { - "id": "tr_2OKKQ4A6HN1WJy", - "object": "transfer", - "date": 1376524800, - "livemode": false, - "amount": 286710, - "currency": "usd", - "status": "paid", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "summary": { - "charge_gross": 316670, - "charge_fees": 29960, - "charge_fee_details": [ - { - "amount": 29960, - "currency": "usd", - "type": "stripe_fee", - "description": null, - "application": null - } - ], - "refund_gross": 0, - "refund_fees": 0, - "refund_fee_details": [ - - ], - "adjustment_gross": 0, - "adjustment_fees": 0, - "adjustment_fee_details": [ - - ], - "validation_fees": 0, - "validation_count": 0, - "charge_count": 682, - "refund_count": 0, - "adjustment_count": 0, - "net": 286710, - "currency": "usd", - "collected_fee_gross": 0, - "collected_fee_count": 0, - "collected_fee_refund_gross": 0, - "collected_fee_refund_count": 0 - }, - "transactions": { - "object": "list", - "count": 682, - "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", - "data": [ - { - "id": "ch_2Nn7UTSkz0cxq9", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476192, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn8hBMCCN0b1r", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476252, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9rrWLlKk7Mj", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476312, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9z9LTfcoJvW", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9jymNURQqY5", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - } - ] - }, - "other_transfers": [ - "tr_2OKKQ4A6HN1WJy" - ], - "account": null, - "description": "STRIPE TRANSFER", - "metadata": { - }, - "statement_descriptor": null, - "recipient": null - } - /cancel: - type: baseResource - post: - description: | - Cancels a transfer that has previously been created. Funds will be refunded - to your available balance, and the fees you were originally charged on the - transfer will be refunded. You may not cancel transfers that have already - been paid out, or automatic Stripe transfers. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "account": { - "type":"null", - "id": "http://jsonschema.net/account", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/balance_transaction", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "date": { - "type":"number", - "id": "http://jsonschema.net/date", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/description", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "other_transfers": { - "type":"array", - "id": "http://jsonschema.net/other_transfers", - "required":false, - "items": - { - "type":"string", - "id": "http://jsonschema.net/other_transfers/0", - "required":false - } - }, - "recipient": { - "type":"null", - "id": "http://jsonschema.net/recipient", - "required":false - }, - "statement_descriptor": { - "type":"null", - "id": "http://jsonschema.net/statement_descriptor", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "summary": { - "type":"object", - "id": "http://jsonschema.net/summary", - "required":false, - "properties":{ - "adjustment_count": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_count", - "required":false - }, - "adjustment_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/adjustment_fee_details", - "required":false - }, - "adjustment_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_fees", - "required":false - }, - "adjustment_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/adjustment_gross", - "required":false - }, - "charge_count": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_count", - "required":false - }, - "charge_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/charge_fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/summary/charge_fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/summary/charge_fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/summary/charge_fee_details/0/type", - "required":false - } - } - } - }, - "charge_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_fees", - "required":false - }, - "charge_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/charge_gross", - "required":false - }, - "collected_fee_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_count", - "required":false - }, - "collected_fee_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_gross", - "required":false - }, - "collected_fee_refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_count", - "required":false - }, - "collected_fee_refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/collected_fee_refund_gross", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/summary/currency", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/summary/net", - "required":false - }, - "refund_count": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_count", - "required":false - }, - "refund_fee_details": { - "type":"array", - "id": "http://jsonschema.net/summary/refund_fee_details", - "required":false - }, - "refund_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_fees", - "required":false - }, - "refund_gross": { - "type":"number", - "id": "http://jsonschema.net/summary/refund_gross", - "required":false - }, - "validation_count": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_count", - "required":false - }, - "validation_fees": { - "type":"number", - "id": "http://jsonschema.net/summary/validation_fees", - "required":false - } - } - }, - "transactions": { - "type":"object", - "id": "http://jsonschema.net/transactions", - "required":false, - "properties":{ - "count": { - "type":"number", - "id": "http://jsonschema.net/transactions/count", - "required":false - }, - "data": { - "type":"array", - "id": "http://jsonschema.net/transactions/data", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/amount", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/description", - "required":false - }, - "fee_details": { - "type":"array", - "id": "http://jsonschema.net/transactions/data/0/fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", - "required":false - } - } - } - }, - "fee": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/fee", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/id", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/transactions/data/0/net", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/transactions/data/0/type", - "required":false - } - } - } - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/transactions/object", - "required":false - }, - "url": { - "type":"string", - "id": "http://jsonschema.net/transactions/url", - "required":false - } - } - } - } - } - example: | - { - "id": "tr_2OKKQ4A6HN1WJy", - "object": "transfer", - "date": 1376524800, - "livemode": false, - "amount": 286710, - "currency": "usd", - "status": "paid", - "balance_transaction": "txn_2hrAStwRKjXiIp", - "summary": { - "charge_gross": 316670, - "charge_fees": 29960, - "charge_fee_details": [ - { - "amount": 29960, - "currency": "usd", - "type": "stripe_fee", - "description": null, - "application": null - } - ], - "refund_gross": 0, - "refund_fees": 0, - "refund_fee_details": [ - - ], - "adjustment_gross": 0, - "adjustment_fees": 0, - "adjustment_fee_details": [ - - ], - "validation_fees": 0, - "validation_count": 0, - "charge_count": 682, - "refund_count": 0, - "adjustment_count": 0, - "net": 286710, - "currency": "usd", - "collected_fee_gross": 0, - "collected_fee_count": 0, - "collected_fee_refund_gross": 0, - "collected_fee_refund_count": 0 - }, - "transactions": { - "object": "list", - "count": 682, - "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", - "data": [ - { - "id": "ch_2Nn7UTSkz0cxq9", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476192, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn8hBMCCN0b1r", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476252, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9rrWLlKk7Mj", - "type": "charge", - "amount": 500, - "currency": "usd", - "net": 455, - "created": 1376476312, - "description": null, - "fee": 45, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9z9LTfcoJvW", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - }, - { - "id": "ch_2Nn9jymNURQqY5", - "type": "charge", - "amount": 100, - "currency": "usd", - "net": 67, - "created": 1376476323, - "description": null, - "fee": 33, - "fee_details": [ - { - "amount": 33, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ] - } - ] - }, - "other_transfers": [ - "tr_2OKKQ4A6HN1WJy" - ], - "account": null, - "description": "STRIPE TRANSFER", - "metadata": { - }, - "statement_descriptor": null, - "recipient": null - } -/recipients: - type: baseResource - post: - description: | - Creates a new recipient object and verifies both the recipient identity and - bank account information. - body: - application/x-www-form-urlencoded: - formParameters: - name: - description: | - The recipient's full, legal name. For type individual, should be in - the format "First Last", "First Middle Last", or "First M Last" (no - prefixes or suffixes). For corporation, the full incorporated name. - type: string - required: true - type: - description: | - Type of the recipient: either individual or corporation. - enum: [ individual, corporation ] - required: true - tax_id: - description: | - The recipient's tax ID, as a string. For type individual, the full SSN; - for type corporation, the full EIN. - type: string - bank_account: - description: | - A bank account to attach to the recipient. - **country**: required The country the bank account is in. Currently, only US is supported. - **routing_number**: required The routing number for the bank account in string form. This should be the ACH routing number, not the wire routing number. - **account_number**: required The account number for the bank account in string form. Must be a checking account. - type: string - default: null - email: - description: | - The recipient's email address. It is displayed alongside the recipient - in the web interface and can be useful for searching and tracking. - type: string - description: - description: | - An arbitrary string which you can attach to a recipient object. It is - displayed alongside the recipient in the web interface. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "active_account": { - "type":"object", - "id": "http://jsonschema.net/active_account", - "required":false, - "properties":{ - "bank_name": { - "type":"string", - "id": "http://jsonschema.net/active_account/bank_name", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/active_account/country", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/active_account/currency", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/active_account/fingerprint", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/active_account/last4", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/active_account/object", - "required":false - }, - "validated": { - "type":"boolean", - "id": "http://jsonschema.net/active_account/validated", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - }, - "verified": { - "type":"boolean", - "id": "http://jsonschema.net/verified", - "required":false - } - } - } - example: | - { - "id": "rp_2dlCVjwuvlBoSm", - "object": "recipient", - "created": 1380159281, - "livemode": false, - "type": "individual", - "description": null, - "email": "jesse@mybitfix.com", - "name": "Jessiford P Franklin", - "verified": false, - "metadata": { - }, - "active_account": { - "object": "bank_account", - "bank_name": "STRIPE TEST BANK", - "last4": "6789", - "country": "US", - "currency": "usd", - "validated": false, - "fingerprint": "StvKx0vy9W8cn6pd" - } - } - get: - description: | - Returns a list of your recipients. The recipients are returned sorted by - creation date, with the most recently created recipient appearing first. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - minimum: 1 - maximum: 100 - default: 10 - offset: - description: | - An offset into the list of returned items. The API will return the requested - number of items starting at that offset. - type: integer - default: 0 - verified: - description: Only return recipients that are verified or unverified. - type: string - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "active_account": { - "type": "object", - "id": "http://jsonschema.net/active_account", - "required": false, - "properties": { - "bank_name": { - "type": "string", - "id": "http://jsonschema.net/active_account/bank_name", - "required": false - }, - "country": { - "type": "string", - "id": "http://jsonschema.net/active_account/country", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/active_account/currency", - "required": false - }, - "fingerprint": { - "type": "string", - "id": "http://jsonschema.net/active_account/fingerprint", - "required": false - }, - "last4": { - "type": "string", - "id": "http://jsonschema.net/active_account/last4", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/active_account/object", - "required": false - }, - "validated": { - "type": "boolean", - "id": "http://jsonschema.net/active_account/validated", - "required": false - } - } - }, - "created": { - "type": "number", - "id": "http://jsonschema.net/created", - "required": false - }, - "description": { - "type": "null", - "id": "http://jsonschema.net/description", - "required": false - }, - "email": { - "type": "string", - "id": "http://jsonschema.net/email", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "metadata": { - "type": "object", - "id": "http://jsonschema.net/metadata", - "required": false - }, - "name": { - "type": "string", - "id": "http://jsonschema.net/name", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/type", - "required": false - }, - "verified": { - "type": "boolean", - "id": "http://jsonschema.net/verified", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "v1/recipients", - "count": 1, - "data": [ - { - "id": "rp_2dlCVjwuvlBoSm", - "object": "recipient", - "created": 1380159281, - "livemode": false, - "type": "individual", - "description": null, - "email": "jesse@mybitfix.com", - "name": "Jessiford P Franklin", - "verified": false, - "metadata": { - }, - "active_account": { - "object": "bank_account", - "bank_name": "STRIPE TEST BANK", - "last4": "6789", - "country": "US", - "currency": "usd", - "validated": false, - "fingerprint": "StvKx0vy9W8cn6pd" - } - } - ] - } - /{recipient_ID}: - type: baseResource - uriParameters: - recipient_ID: - description: The identifier of the recipient to be retrieved. - get: - description: | - Retrieves the details of an existing recipient. You need only supply the - unique recipient identifier that was returned upon recipient creation. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "active_account": { - "type":"object", - "id": "http://jsonschema.net/active_account", - "required":false, - "properties":{ - "bank_name": { - "type":"string", - "id": "http://jsonschema.net/active_account/bank_name", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/active_account/country", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/active_account/currency", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/active_account/fingerprint", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/active_account/last4", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/active_account/object", - "required":false - }, - "validated": { - "type":"boolean", - "id": "http://jsonschema.net/active_account/validated", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - }, - "verified": { - "type":"boolean", - "id": "http://jsonschema.net/verified", - "required":false - } - } - } - example: | - { - "id": "rp_2dlCVjwuvlBoSm", - "object": "recipient", - "created": 1380159281, - "livemode": false, - "type": "individual", - "description": null, - "email": "jesse@mybitfix.com", - "name": "Jessiford P Franklin", - "verified": false, - "metadata": { - }, - "active_account": { - "object": "bank_account", - "bank_name": "STRIPE TEST BANK", - "last4": "6789", - "country": "US", - "currency": "usd", - "validated": false, - "fingerprint": "StvKx0vy9W8cn6pd" - } - } - post: - description: | - Updates the specified recipient by setting the values of the parameters - passed. Any parameters not provided will be left unchanged. - If you update the name or tax ID, the identity verification will automatically - be rerun. If you update the bank account, the bank account validation will - automatically be rerun. - body: - application/x-www-form-urlencoded: - formParameters: - name: - description: | - The recipient's full, legal name. For type individual, should be in - the format "First Last", "First Middle Last", or "First M Last" (no - prefixes or suffixes). For corporation, the full incorporated name. - type: string - default: null - tax_id: - description: | - The recipient's tax ID, as a string. For type individual, the full - SSN; for type corporation, the full EIN. - type: string - bank_account: - description: | - A new bank account to attach to the recipient. - **country**: required The country the bank account is in. Currently, only US is supported. - **routing_number**: required The routing number for the bank account in string form. This should be the ACH routing number, not the wire routing number. - **account_number**: required The account number for the bank account in string form. Must be a checking account. - type: string - email: - description: | - The recipient's email address. It is displayed alongside the recipient - in the web interface and can be useful for searching and tracking. - This will be unset if you POST an empty value. - type: string - default: null - description: - description: | - An arbitrary string which you can attach to a recipient object. It is - displayed alongside the recipient in the web interface. This will be - unset if you POST an empty value. - type: string - default: null - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "active_account": { - "type":"object", - "id": "http://jsonschema.net/active_account", - "required":false, - "properties":{ - "bank_name": { - "type":"string", - "id": "http://jsonschema.net/active_account/bank_name", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/active_account/country", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/active_account/currency", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/active_account/fingerprint", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/active_account/last4", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/active_account/object", - "required":false - }, - "validated": { - "type":"boolean", - "id": "http://jsonschema.net/active_account/validated", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/metadata", - "required":false - }, - "name": { - "type":"string", - "id": "http://jsonschema.net/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - }, - "verified": { - "type":"boolean", - "id": "http://jsonschema.net/verified", - "required":false - } - } - } - example: | - { - "id": "rp_2dlCVjwuvlBoSm", - "object": "recipient", - "created": 1380159281, - "livemode": false, - "type": "individual", - "description": null, - "email": "jesse@mybitfix.com", - "name": "Jessiford P Franklin", - "verified": false, - "metadata": { - }, - "active_account": { - "object": "bank_account", - "bank_name": "STRIPE TEST BANK", - "last4": "6789", - "country": "US", - "currency": "usd", - "validated": false, - "fingerprint": "StvKx0vy9W8cn6pd" - } - } - delete: - description: | - Permanently deletes a recipient. It cannot be undone. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "deleted": { - "type":"boolean", - "id": "http://jsonschema.net/deleted", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - } - } - } - example: | - { - "id": "cu_2W2fo9IOza32fP", - "deleted": true - } -/account: - type: baseResource - get: - description: | - Retrieves the details of the account, based on the API key that was used to - make the request. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "charge_enabled": { - "type":"boolean", - "id": "http://jsonschema.net/charge_enabled", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/country", - "required":false - }, - "currencies_supported": { - "type":"array", - "id": "http://jsonschema.net/currencies_supported", - "required":false, - "items": - { - "type":"string", - "id": "http://jsonschema.net/currencies_supported/0", - "required":false - } - - - }, - "default_currency": { - "type":"string", - "id": "http://jsonschema.net/default_currency", - "required":false - }, - "details_submitted": { - "type":"boolean", - "id": "http://jsonschema.net/details_submitted", - "required":false - }, - "email": { - "type":"string", - "id": "http://jsonschema.net/email", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "statement_descriptor": { - "type":"null", - "id": "http://jsonschema.net/statement_descriptor", - "required":false - }, - "transfer_enabled": { - "type":"boolean", - "id": "http://jsonschema.net/transfer_enabled", - "required":false - } - } - } - example: | - { - "id": "BKFamDcAnurQgZDPT6vvOzGJboJhPCcF", - "email": "site@stripe.com", - "statement_descriptor": null, - "details_submitted": false, - "charge_enabled": false, - "transfer_enabled": false, - "currencies_supported": [ - "USD" - ], - "default_currency": "USD", - "country": "US", - "object": "account" - } -/balance: - type: baseResource - get: - description: | - Retrieves the current account balance, based on the API key that was used to - make the request. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "available": { - "type":"array", - "id": "http://jsonschema.net/available", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/available/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/available/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/available/0/currency", - "required":false - } - } - } - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "pending": { - "type":"array", - "id": "http://jsonschema.net/pending", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/pending/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/pending/0/amount", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/pending/0/currency", - "required":false - } - } - } - } - } - } - example: | - { - "pending": [ - { - "amount": 0, - "currency": "cad" - }, - { - "amount": 363361, - "currency": "usd" - } - ], - "available": [ - { - "amount": -358, - "currency": "cad" - }, - { - "amount": -124791940, - "currency": "usd" - } - ], - "livemode": false, - "object": "balance" - } - /history: - type: baseResource - get: - description: | - Returns a list of transactions that have contributed to the Stripe account - balance (includes charges, refunds, transfers, and so on). The transactions - are returned in sorted order, with the most recent transactions appearing - first. - queryParameters: - available_on: - description: | - A filter on the list based on the object available_on field. The value - can be a string with an exact UTC timestamp, or it can be a dictionary - with the following options: - **gt**: optional Return values where the available_on field is after this timestamp. - **gte**: optional Return values where the available_on field is after or equal to this timestamp. - **lt**: optional Return values where the available_on field is before this timestamp. - **lte**: optional Return values where the available_on field is before or equal to this timestamp. - type: string - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - default: 10 - created: - description: | - A filter on the list based on the object created field. The value can be - a string with an exact UTC timestamp, or it can be a dictionary with the - following options: - **gt**: optional Return values where the created field is after this timestamp. - **gte**: optional Return values where the created field is after or equal to this timestamp. - **lt**: optional Return values where the created field is before this timestamp. - **lte**: optional Return values where the created field is before or equal to this timestamp. - type: string - currency: - type: string - offset: - description: | - An offset into the list of returned items. The API will return the - requested number of items starting at that offset. - type: integer - default: 0 - source: - type: string - transfer: - description: | - For automatic Stripe transfers only, only returns transactions that - were transferred out on the specified transfer ID. - type: string - type: - description: | - Only returns transactions of the given type. One of: charge, refund, - adjustment, application_fee, application_fee_refund, transfer, or transfer_failure. - enum: [charge, refund, adjustment, application_fee, application_fee_refund, transfer, transfer_failure] - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/amount", - "required": false - }, - "available_on": { - "type": "number", - "id": "http://jsonschema.net/available_on", - "required": false - }, - "created": { - "type": "number", - "id": "http://jsonschema.net/created", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/currency", - "required": false - }, - "description": { - "type": "null", - "id": "http://jsonschema.net/description", - "required": false - }, - "fee_details": { - "type": "array", - "id": "http://jsonschema.net/fee_details", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net/fee_details/0", - "required": false, - "properties": { - "amount": { - "type": "number", - "id": "http://jsonschema.net/fee_details/0/amount", - "required": false - }, - "application": { - "type": "null", - "id": "http://jsonschema.net/fee_details/0/application", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/fee_details/0/currency", - "required": false - }, - "description": { - "type": "string", - "id": "http://jsonschema.net/fee_details/0/description", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/fee_details/0/type", - "required": false - } - } - } - }, - "fee": { - "type": "number", - "id": "http://jsonschema.net/fee", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "net": { - "type": "number", - "id": "http://jsonschema.net/net", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "source": { - "type": "string", - "id": "http://jsonschema.net/source", - "required": false - }, - "status": { - "type": "string", - "id": "http://jsonschema.net/status", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/type", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/balance/history", - "count": 1, - "data": [ - { - "id": "txn_2hrAStwRKjXiIp", - "object": "balance_transaction", - "source": "ch_2hrAFVP6jlr1jB", - "amount": 100, - "currency": "usd", - "net": 41, - "type": "charge", - "created": 1381104058, - "available_on": 1381104000, - "status": "available", - "fee": 59, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ], - "description": null - } - ] - } - /{TRANSACTION_ID}: - type: baseResource - uriParameters: - TRANSACTION_ID: - description: | - The ID of the desired balance transaction (as found on any API object - that affects the balance, e.g. a charge or transfer). - type: string - get: - description: Retrieves the balance transaction with the given ID. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/amount", - "required":false - }, - "available_on": { - "type":"number", - "id": "http://jsonschema.net/available_on", - "required":false - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/currency", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/description", - "required":false - }, - "fee_details": { - "type":"array", - "id": "http://jsonschema.net/fee_details", - "required":false, - "items": - { - "type":"object", - "id": "http://jsonschema.net/fee_details/0", - "required":false, - "properties":{ - "amount": { - "type":"number", - "id": "http://jsonschema.net/fee_details/0/amount", - "required":false - }, - "application": { - "type":"null", - "id": "http://jsonschema.net/fee_details/0/application", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/fee_details/0/currency", - "required":false - }, - "description": { - "type":"string", - "id": "http://jsonschema.net/fee_details/0/description", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/fee_details/0/type", - "required":false - } - } - } - }, - "fee": { - "type":"number", - "id": "http://jsonschema.net/fee", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "net": { - "type":"number", - "id": "http://jsonschema.net/net", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "source": { - "type":"string", - "id": "http://jsonschema.net/source", - "required":false - }, - "status": { - "type":"string", - "id": "http://jsonschema.net/status", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - } - } - } - example: | - { - "id": "txn_2hrAStwRKjXiIp", - "object": "balance_transaction", - "source": "ch_2hrAFVP6jlr1jB", - "amount": 100, - "currency": "usd", - "net": 41, - "type": "charge", - "created": 1381104058, - "available_on": 1381104000, - "status": "available", - "fee": 59, - "fee_details": [ - { - "amount": 45, - "currency": "usd", - "type": "stripe_fee", - "description": "Stripe processing fees", - "application": null - } - ], - "description": null - } -/events: - type: baseResource - get: - description: List events, going back (at least) up to 30 days. - queryParameters: - count: - description: | - A limit on the number of objects to be returned. Count can range between - 1 and 100 items. - type: integer - minimum: 1 - maximum: 100 - default: 10 - created: - description: | - A filter on the list based on the object created field. The value can be - a string with an exact UTC timestamp, or it can be a dictionary with the - following options: - **gt**: optional Return values where the created field is after this timestamp. - **gte**: optional Return values where the created field is after or equal to this timestamp. - **lt**: optional Return values where the created field is before this timestamp. - **lte**: optional Return values where the created field is before or equal to this timestamp. - type: string - offset: - description: | - An offset into the list of returned items. The API will return the - requested number of items starting at that offset. - type: integer - default: 0 - type: - description: | - A string containing a specific event name, or group of events using * as - a wildcard. The list will be filtered to include only events with a - matching event property - type: string - responses: - 200: - body: - schema: | - { - "type": "object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "count": { - "type": "number", - "id": "http://jsonschema.net/count", - "required": false - }, - "data": { - "type": "array", - "id": "http://jsonschema.net/data", - "required": false, - "items": { - "type": "object", - "id": "http://jsonschema.net", - "required": false, - "properties": { - "created": { - "type": "number", - "id": "http://jsonschema.net/created", - "required": false - }, - "data": { - "type": "object", - "id": "http://jsonschema.net/data", - "required": false, - "properties": { - "object": { - "type": "object", - "id": "http://jsonschema.net/data/object", - "required": false, - "properties": { - "amount_refunded": { - "type": "number", - "id": "http://jsonschema.net/data/object/amount_refunded", - "required": false - }, - "amount": { - "type": "number", - "id": "http://jsonschema.net/data/object/amount", - "required": false - }, - "balance_transaction": { - "type": "string", - "id": "http://jsonschema.net/data/object/balance_transaction", - "required": false - }, - "captured": { - "type": "boolean", - "id": "http://jsonschema.net/data/object/captured", - "required": false - }, - "card": { - "type": "object", - "id": "http://jsonschema.net/data/object/card", - "required": false, - "properties": { - "address_city": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_city", - "required": false - }, - "address_country": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_country", - "required": false - }, - "address_line1_check": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_line1_check", - "required": false - }, - "address_line1": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_line1", - "required": false - }, - "address_line2": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_line2", - "required": false - }, - "address_state": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_state", - "required": false - }, - "address_zip_check": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_zip_check", - "required": false - }, - "address_zip": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/address_zip", - "required": false - }, - "country": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/country", - "required": false - }, - "customer": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/customer", - "required": false - }, - "cvc_check": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/cvc_check", - "required": false - }, - "exp_month": { - "type": "number", - "id": "http://jsonschema.net/data/object/card/exp_month", - "required": false - }, - "exp_year": { - "type": "number", - "id": "http://jsonschema.net/data/object/card/exp_year", - "required": false - }, - "fingerprint": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/fingerprint", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/id", - "required": false - }, - "last4": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/last4", - "required": false - }, - "name": { - "type": "null", - "id": "http://jsonschema.net/data/object/card/name", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/object", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/data/object/card/type", - "required": false - } - } - }, - "created": { - "type": "number", - "id": "http://jsonschema.net/data/object/created", - "required": false - }, - "currency": { - "type": "string", - "id": "http://jsonschema.net/data/object/currency", - "required": false - }, - "customer": { - "type": "null", - "id": "http://jsonschema.net/data/object/customer", - "required": false - }, - "description": { - "type": "null", - "id": "http://jsonschema.net/data/object/description", - "required": false - }, - "dispute": { - "type": "null", - "id": "http://jsonschema.net/data/object/dispute", - "required": false - }, - "failure_code": { - "type": "null", - "id": "http://jsonschema.net/data/object/failure_code", - "required": false - }, - "failure_message": { - "type": "null", - "id": "http://jsonschema.net/data/object/failure_message", - "required": false - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/data/object/id", - "required": false - }, - "invoice": { - "type": "null", - "id": "http://jsonschema.net/data/object/invoice", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/data/object/livemode", - "required": false - }, - "metadata": { - "type": "object", - "id": "http://jsonschema.net/data/object/metadata", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/data/object/object", - "required": false - }, - "paid": { - "type": "boolean", - "id": "http://jsonschema.net/data/object/paid", - "required": false - }, - "refunded": { - "type": "boolean", - "id": "http://jsonschema.net/data/object/refunded", - "required": false - }, - "refunds": { - "type": "array", - "id": "http://jsonschema.net/data/object/refunds", - "required": false - } - } - } - } - }, - "id": { - "type": "string", - "id": "http://jsonschema.net/id", - "required": false - }, - "livemode": { - "type": "boolean", - "id": "http://jsonschema.net/livemode", - "required": false - }, - "object": { - "type": "string", - "id": "http://jsonschema.net/object", - "required": false - }, - "pending_webhooks": { - "type": "number", - "id": "http://jsonschema.net/pending_webhooks", - "required": false - }, - "request": { - "type": "string", - "id": "http://jsonschema.net/request", - "required": false - }, - "type": { - "type": "string", - "id": "http://jsonschema.net/type", - "required": false - } - } - } - } - } - } - example: | - { - "object": "list", - "url": "/v1/events", - "count": 1, - "data": [ - { - "id": "evt_2i0bkMsBaZwLp1", - "created": 1381139159, - "livemode": false, - "type": "charge.succeeded", - "data": { - "object": { - "id": "ch_2i0bEetfZQnWS2", - "object": "charge", - "created": 1381139159, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2i0baJexR7HVae", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ - - ], - "balance_transaction": "txn_2i0bWLMtt8QnOF", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null, - "metadata": { - } - } - }, - "object": "event", - "pending_webhooks": 0, - "request": "iar_2i0bwZ3Bh7TiPp" - } - ] - } - /{EVENT_ID}: - type: baseResource - uriParameters: - EVENT_ID: - description: The identifier of the event. - type: string - get: - description: | - Retrieves the details of an event. Supply the unique identifier of the - event, which you might have received in a webhook. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "data": { - "type":"object", - "id": "http://jsonschema.net/data", - "required":false, - "properties":{ - "object": { - "type":"object", - "id": "http://jsonschema.net/data/object", - "required":false, - "properties":{ - "amount_refunded": { - "type":"number", - "id": "http://jsonschema.net/data/object/amount_refunded", - "required":false - }, - "amount": { - "type":"number", - "id": "http://jsonschema.net/data/object/amount", - "required":false - }, - "balance_transaction": { - "type":"string", - "id": "http://jsonschema.net/data/object/balance_transaction", - "required":false - }, - "captured": { - "type":"boolean", - "id": "http://jsonschema.net/data/object/captured", - "required":false - }, - "card": { - "type":"object", - "id": "http://jsonschema.net/data/object/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_country", - "required":false - }, - "address_line1_check": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_line1_check", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_state", - "required":false - }, - "address_zip_check": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_zip_check", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/customer", - "required":false - }, - "cvc_check": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/cvc_check", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/data/object/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/data/object/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/data/object/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/data/object/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/data/object/created", - "required":false - }, - "currency": { - "type":"string", - "id": "http://jsonschema.net/data/object/currency", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/data/object/customer", - "required":false - }, - "description": { - "type":"null", - "id": "http://jsonschema.net/data/object/description", - "required":false - }, - "dispute": { - "type":"null", - "id": "http://jsonschema.net/data/object/dispute", - "required":false - }, - "failure_code": { - "type":"null", - "id": "http://jsonschema.net/data/object/failure_code", - "required":false - }, - "failure_message": { - "type":"null", - "id": "http://jsonschema.net/data/object/failure_message", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/data/object/id", - "required":false - }, - "invoice": { - "type":"null", - "id": "http://jsonschema.net/data/object/invoice", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/data/object/livemode", - "required":false - }, - "metadata": { - "type":"object", - "id": "http://jsonschema.net/data/object/metadata", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/data/object/object", - "required":false - }, - "paid": { - "type":"boolean", - "id": "http://jsonschema.net/data/object/paid", - "required":false - }, - "refunded": { - "type":"boolean", - "id": "http://jsonschema.net/data/object/refunded", - "required":false - }, - "refunds": { - "type":"array", - "id": "http://jsonschema.net/data/object/refunds", - "required":false - } - } - } - } - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "pending_webhooks": { - "type":"number", - "id": "http://jsonschema.net/pending_webhooks", - "required":false - }, - "request": { - "type":"string", - "id": "http://jsonschema.net/request", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - } - } - } - example: | - { - "id": "evt_2i0bkMsBaZwLp1", - "created": 1381139159, - "livemode": false, - "type": "charge.succeeded", - "data": { - "object": { - "id": "ch_2i0bEetfZQnWS2", - "object": "charge", - "created": 1381139159, - "livemode": false, - "paid": true, - "amount": 500, - "currency": "usd", - "refunded": false, - "card": { - "id": "card_2i0baJexR7HVae", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 1, - "exp_year": 2050, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null, - "cvc_check": "pass", - "address_line1_check": null, - "address_zip_check": null - }, - "captured": true, - "refunds": [ - - ], - "balance_transaction": "txn_2i0bWLMtt8QnOF", - "failure_message": null, - "failure_code": null, - "amount_refunded": 0, - "customer": null, - "invoice": null, - "description": null, - "dispute": null, - "metadata": { - } - } - }, - "object": "event", - "pending_webhooks": 0, - "request": "iar_2i0bwZ3Bh7TiPp" - } -/tokens: - type: baseResource - post: - description: | - Creates a single use token that wraps the details of a credit card. This - token can be used in place of a credit card dictionary with any API method. - These tokens can only be used once: by creating a new charge object, or - attaching them to a customer. - #TODO: one of needed - body: - application/x-www-form-urlencoded: - formParameters: - card: - description: | - optional, either customer or card is required, but not both - The card details this token will represent. - **number**: required The card number, as a string without any separators. - **exp_month**: required Two digit number representing the card's expiration month. - **exp_year**: required Two or four digit number representing the card's expiration year. - **cvc**: optional, highly recommended Card security code. - **name**: optional Cardholder's full name. - **address_line1**: optional - **address_line2**: optional - **address_city**: optional - **address_zip**: optional - **address_state**: optional - **address_country**: optional - type: string - customer: - description: | - optional, either customer or card is required, but not both - For use with Stripe Connect only; the API key used for the request - must be an OAuth access token. For more details, see the shared - customers documentation. - A customer (owned by the application's account) to create a token for. - type: string - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - }, - "used": { - "type":"boolean", - "id": "http://jsonschema.net/used", - "required":false - } - } - } - example: | - { - "id": "tok_1RjCszdhnuTnGF", - "livemode": false, - "created": 1363084496, - "used": false, - "object": "token", - "type": "card", - "card": { - "id": "cc_1RjCGyzfsxF0AF", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 8, - "exp_year": 2014, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null - } - } - /{ID}: - uriParameters: - ID: - description: ID of a token. - get: - description: Retrieves the token with the given ID. - responses: - 200: - body: - schema: | - { - "type":"object", - "$schema": "http://json-schema.org/draft-03/schema", - "id": "http://jsonschema.net", - "required":false, - "properties":{ - "card": { - "type":"object", - "id": "http://jsonschema.net/card", - "required":false, - "properties":{ - "address_city": { - "type":"null", - "id": "http://jsonschema.net/card/address_city", - "required":false - }, - "address_country": { - "type":"null", - "id": "http://jsonschema.net/card/address_country", - "required":false - }, - "address_line1": { - "type":"null", - "id": "http://jsonschema.net/card/address_line1", - "required":false - }, - "address_line2": { - "type":"null", - "id": "http://jsonschema.net/card/address_line2", - "required":false - }, - "address_state": { - "type":"null", - "id": "http://jsonschema.net/card/address_state", - "required":false - }, - "address_zip": { - "type":"null", - "id": "http://jsonschema.net/card/address_zip", - "required":false - }, - "country": { - "type":"string", - "id": "http://jsonschema.net/card/country", - "required":false - }, - "customer": { - "type":"null", - "id": "http://jsonschema.net/card/customer", - "required":false - }, - "exp_month": { - "type":"number", - "id": "http://jsonschema.net/card/exp_month", - "required":false - }, - "exp_year": { - "type":"number", - "id": "http://jsonschema.net/card/exp_year", - "required":false - }, - "fingerprint": { - "type":"string", - "id": "http://jsonschema.net/card/fingerprint", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/card/id", - "required":false - }, - "last4": { - "type":"string", - "id": "http://jsonschema.net/card/last4", - "required":false - }, - "name": { - "type":"null", - "id": "http://jsonschema.net/card/name", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/card/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/card/type", - "required":false - } - } - }, - "created": { - "type":"number", - "id": "http://jsonschema.net/created", - "required":false - }, - "id": { - "type":"string", - "id": "http://jsonschema.net/id", - "required":false - }, - "livemode": { - "type":"boolean", - "id": "http://jsonschema.net/livemode", - "required":false - }, - "object": { - "type":"string", - "id": "http://jsonschema.net/object", - "required":false - }, - "type": { - "type":"string", - "id": "http://jsonschema.net/type", - "required":false - }, - "used": { - "type":"boolean", - "id": "http://jsonschema.net/used", - "required":false - } - } - } - example: | - { - "id": "tok_1RjCszdhnuTnGF", - "livemode": false, - "created": 1363084496, - "used": false, - "object": "token", - "type": "card", - "card": { - "id": "cc_1RjCGyzfsxF0AF", - "object": "card", - "last4": "4242", - "type": "Visa", - "exp_month": 8, - "exp_year": 2014, - "fingerprint": "qhjxpr7DiCdFYTlH", - "customer": null, - "country": "US", - "name": null, - "address_line1": null, - "address_line2": null, - "address_city": null, - "address_state": null, - "address_zip": null, - "address_country": null - } - } \ No newline at end of file diff --git a/dist/examples/twitter.raml b/dist/examples/twitter.raml deleted file mode 100644 index 81ad150da..000000000 --- a/dist/examples/twitter.raml +++ /dev/null @@ -1,34279 +0,0 @@ -#%RAML 0.8 ---- -title: Twitter API -version: "1.1" -baseUri: https://api.twitter.com/{version} -securitySchemes: - - oauth_1_0: - description: | - Twitter offers applications the ability to issue authenticated requests on - behalf of the application itself (as opposed to on behalf of a specific user). - type: OAuth 1.0 - settings: - requestTokenUri: https://api.twitter.com/oauth/request_token - authorizationUri: https://api.twitter.com/oauth/authorize - tokenCredentialsUri: https://api.twitter.com/oauth/access_token -securedBy: [ oauth_1_0 ] -mediaType: application/json -resourceTypes: - - base: - uriParameters: - mediaTypeExtension: - enum: [ .json ] - description: Use .json to specify application/json media type. - get?: &common - responses: - 200: - description: Success! - 304: - description: There was no new data to return. - 400: - description: | - The request was invalid or cannot be otherwise served. An accompanying - error message will explain further. In API v1.1, requests withou - authentication are considered invalid and will yield this response. - 401: - description: Authentication credentials were missing or incorrect. - 403: - description: | - The request is understood, but it has been refused or access is no - allowed. An accompanying error message will explain why. This code is - used when requests are being denied due to update limits. - 404: - description: | - The URI requested is invalid or the resource requested, such as a user, - does not exists. Also returned when the requested format is not supported - by the requested method. - 406: - description: | - Returned by the Search API when an invalid format is specified in the - request. - 410: - description: | - This resource is gone. Used to indicate that an API endpoint has been - turned off. For example: "The Twitter REST API v1 will soon stop - functioning. Please migrate to API v1.1." - 420: - description: | - Returned by the version 1 Search and Trends APIs when you are being rate - limited. - 422: - description: | - Returned when an image uploaded to POST account/update_profile_banner is - unable to be processed. - 429: - description: | - Returned in API v1.1 when a request cannot be served due to the - application's rate limit having been exhausted for the resource. See Rate - Limiting in API v1.1. - 500: - description: | - Something is broken. Please post to the group so the Twitter team can - investigate. - 502: - description: Twitter is down or being upgraded. - 503: - description: | - The Twitter servers are up, but overloaded with requests. Try again later. - 504: - description: | - The Twitter servers are up, but the request couldn't be serviced due to - some failure within our stack. Try again later. - post?: *common -traits: - - nestedable: - queryParameters: - include_entities: - description: The entities node will not be included when set to false. - enum: - - 0 - - 1 - - true - - false - - - - f - - trimmable: - queryParameters: - trim_user: - description: | - When set to either true, t or 1, each tweet returned in a timeline will - include a user object including only the status authors numerical ID. - Omit this parameter to receive the complete user object. - enum: - - 0 - - 1 - - true - - false - - - - f -# Statuses -/statuses: - # Timelines - /mentions_timeline{mediaTypeExtension}: - type: base - get: - is: [ nestedable, trimmable ] - description: | - Returns the 20 most recent mentions (tweets containing a users's @screen_name) - for the authenticating user. - The timeline returned is the equivalent of the one seen when you view your - mentions on twitter.com. - This method can only return up to 800 tweets. - queryParameters: - count: - description: | - Specifies the number of tweets to try and retrieve, up to a maximum of - 200. The value of count is best thought of as a limit to the number of - tweets to return because suspended or deleted content is removed after - the count has been applied. We include retweets in the count, even if - include_rts is not supplied. It is recommended you always send include_rts=1 - when using this API method. - type: integer - maximum: 200 - since_id: - description: | - Returns results with an ID greater than (that is, more recent than) the - specified ID. There are limits to the number of Tweets which can be accessed - through the API. If the limit of Tweets has occured since the since_id, the - since_id will be forced to the oldest ID available. - type: integer - max_id: - description: | - Returns results with an ID less than (that is, older than) or equal to - the specified ID. - type: integer - contributor_details: - description: | - This parameter enhances the contributors element of the status response - to include the screen_name of the contributor. By default only the user_id - of the contributor is included. - type: string - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Mon Sep 03 13:24:14 +0000 2012", - "id_str": "242613977966850048", - "entities": { - "urls": [], - "hashtags": [], - "user_mentions": [ - { - "name": "Jason Costa", - "id_str": "14927800", - "id": 14927800, - "indices": [ - 0, - 11 - ], - "screen_name": "jasoncosta" - }, - { - "name": "Matt Harris", - "id_str": "777925", - "id": 777925, - "indices": [ - 12, - 26 - ], - "screen_name": "themattharris" - }, - { - "name": "ThinkWall", - "id_str": "117426578", - "id": 117426578, - "indices": [ - 109, - 119 - ], - "screen_name": "thinkwall" - } - ] - }, - "in_reply_to_user_id_str": "14927800", - "contributors": null, - "text": "@jasoncosta @themattharris Hey! Going to be in Frisco in October. Was hoping to have a meeting to talk about @thinkwall if you're around?", - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 242613977966850050, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": 14927800, - "place": null, - "user": { - "profile_sidebar_fill_color": "EEEEEE", - "profile_sidebar_border_color": "000000", - "profile_background_tile": false, - "name": "Andrew Spode Miller", - "profile_image_url": "http://a0.twimg.com/profile_images/1227466231/spode-balloon-medium_normal.jpg", - "created_at": "Mon Sep 22 13:12:01 +0000 2008", - "location": "London via Gravesend", - "follow_request_sent": false, - "profile_link_color": "F31B52", - "is_translator": false, - "id_str": "16402947", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://www.linkedin.com/in/spode", - "indices": [ - 0, - 32 - ] - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 16, - "url": "http://www.linkedin.com/in/spode", - "profile_image_url_https": "https://si0.twimg.com/profile_images/1227466231/spode-balloon-medium_normal.jpg", - "utc_offset": 0, - "id": 16402947, - "profile_use_background_image": false, - "listed_count": 129, - "profile_text_color": "262626", - "lang": "en", - "followers_count": 2013, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/16420220/twitter-background-final.png", - "profile_background_color": "FFFFFF", - "verified": false, - "geo_enabled": true, - "time_zone": "London", - "description": "Co-Founder/Dev (PHP/jQuery) @justFDI. Run @thinkbikes and @thinkwall for events. Ex tech journo, helps run @uktjpr. Passion for Linux and customises everything.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/16420220/twitter-background-final.png", - "statuses_count": 11550, - "friends_count": 770, - "following": null, - "show_all_inline_media": true, - "screen_name": "spode" - }, - "in_reply_to_screen_name": "jasoncosta", - "source": "JournoTwit", - "in_reply_to_status_id": null - }, - { - "coordinates": { - "coordinates": [ - 121.0132101, - 14.5191613 - ], - "type": "Point" - }, - "favorited": false, - "truncated": false, - "created_at": "Mon Sep 03 08:08:02 +0000 2012", - "id_str": "242534402280783873", - "entities": { - "urls": [], - "hashtags": [ - { - "text": "twitter", - "indices": [ - 49, - 57 - ] - } - ], - "user_mentions": [ - { - "name": "Jason Costa", - "id_str": "14927800", - "id": 14927800, - "indices": [ - 14, - 25 - ], - "screen_name": "jasoncosta" - } - ] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "Got the shirt @jasoncosta thanks man! Loving the #twitter bird on the shirt :-)", - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "id": 242534402280783870, - "geo": { - "coordinates": [ - 14.5191613, - 121.0132101 - ], - "type": "Point" - }, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "EFEFEF", - "profile_sidebar_border_color": "EEEEEE", - "profile_background_tile": true, - "name": "Mikey", - "profile_image_url": "http://a0.twimg.com/profile_images/1305509670/chatMikeTwitter_normal.png", - "created_at": "Fri Jun 20 15:57:08 +0000 2008", - "location": "Singapore", - "follow_request_sent": false, - "profile_link_color": "009999", - "is_translator": false, - "id_str": "15181205", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://about.me/michaelangelo", - "indices": [ - 0, - 29 - ] - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 11, - "url": "http://about.me/michaelangelo", - "profile_image_url_https": "https://si0.twimg.com/profile_images/1305509670/chatMikeTwitter_normal.png", - "utc_offset": 28800, - "id": 15181205, - "profile_use_background_image": true, - "listed_count": 61, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 577, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme14/bg.gif", - "profile_background_color": "131516", - "verified": false, - "geo_enabled": true, - "time_zone": "Hong Kong", - "description": "Android Applications Developer, Studying Martial Arts, Plays MTG, Food and movie junkie", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme14/bg.gif", - "statuses_count": 11327, - "friends_count": 138, - "following": null, - "show_all_inline_media": true, - "screen_name": "mikedroid" - }, - "in_reply_to_screen_name": null, - "source": "Twitter for Android", - "in_reply_to_status_id": null - } - ] - /user_timeline{mediaTypeExtension}: - type: base - get: - is: [ trimmable ] - description: | - Returns a collection of the most recent Tweets posted by the user indicated - by the screen_name or user_id parameters. - User timelines belonging to protected users may only be requested when the - authenticated user either "owns" the timeline or is an approved follower of - the owner. - The timeline returned is the equivalent of the one seen when you view a user's - profile on twitter.com. - This method can only return up to 3,200 of a user's most recent Tweets. Native - retweets of other statuses by the user is included in this total, regardless - of whether include_rts is set to false when requesting this resource. - queryParameters: - user_id: - description: The ID of the user for whom to return results for. - type: integer - screen_name: - description: The screen name of the user for whom to return results for. - type: string - since_id: - description: | - Returns results with an ID greater than (that is, more recent than) the - specified ID. There are limits to the number of Tweets which can be accessed - through the API. If the limit of Tweets has occured since the since_id, the - since_id will be forced to the oldest ID available. - type: integer - count: - description: | - Specifies the number of tweets to try and retrieve, up to a maximum of - 200 per distinct request. The value of count is best thought of as a - limit to the number of tweets to return because suspended or deleted - content is removed after the count has been applied. We include retweets - in the count, even if include_rts is not supplied. It is recommended you - always send include_rts=1 when using this API method. - type: integer - max_id: - description: | - Returns results with an ID less than (that is, older than) or equal to - the specified ID. - type: integer - contributor_details: - description: | - This parameter enhances the contributors element of the status response - to include the screen_name of the contributor. By default only the user_id - of the contributor is included. - type: string - exclude_replies: - description: | - This parameter will prevent replies from appearing in the returned timeline. - Using exclude_replies with the count parameter will mean you will receive - up-to count tweets - this is because the count parameter retrieves tha - many tweets before filtering out retweets and replies. This parameter is - only supported for JSON and XML responses. - type: string - include_rts: - description: | - When set to false, the timeline will strip any native retweets (though - they will still count toward both the maximal length of the timeline - and the slice selected by the count parameter). Note: If you're using - the trim_user parameter in conjunction with include_rts, the retweets - will still contain a full user object. - type: string - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Wed Aug 29 17:12:58 +0000 2012", - "id_str": "240859602684612608", - "entities": { - "urls": [ - { - "expanded_url": "https://dev.twitter.com/blog/twitter-certified-products", - "url": "https://t.co/MjJ8xAnT", - "indices": [ - 52, - 73 - ], - "display_url": "dev.twitter.com/blog/twitter-c..." - } - ], - "hashtags": [], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "Introducing the Twitter Certified Products Program: https://t.co/MjJ8xAnT", - "retweet_count": 121, - "in_reply_to_status_id_str": null, - "id": 240859602684612600, - "geo": null, - "retweeted": false, - "possibly_sensitive": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "DDEEF6", - "profile_sidebar_border_color": "C0DEED", - "profile_background_tile": false, - "name": "Twitter API", - "profile_image_url": "http://a0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "created_at": "Wed May 23 06:01:13 +0000 2007", - "location": "San Francisco, CA", - "follow_request_sent": false, - "profile_link_color": "0084B4", - "is_translator": false, - "id_str": "6253282", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://dev.twitter.com", - "indices": [ - 0, - 22 - ] - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": true, - "contributors_enabled": true, - "favourites_count": 24, - "url": "http://dev.twitter.com", - "profile_image_url_https": "https://si0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "utc_offset": -28800, - "id": 6253282, - "profile_use_background_image": true, - "listed_count": 10775, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 1212864, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_color": "C0DEED", - "verified": true, - "geo_enabled": true, - "time_zone": "Pacific Time (US & Canada)", - "description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 3333, - "friends_count": 31, - "following": null, - "show_all_inline_media": false, - "screen_name": "twitterapi" - }, - "in_reply_to_screen_name": null, - "source": "YoruFukurou", - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Sat Aug 25 17:26:51 +0000 2012", - "id_str": "239413543487819778", - "entities": { - "urls": [ - { - "expanded_url": "https://dev.twitter.com/issues/485", - "url": "https://t.co/p5bOzH0k", - "indices": [ - 97, - 118 - ], - "display_url": "dev.twitter.com/issues/485" - } - ], - "hashtags": [], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "We are working to resolve issues with application management & logging in to the dev portal: https://t.co/p5bOzH0k ^TS", - "retweet_count": 105, - "in_reply_to_status_id_str": null, - "id": 239413543487819780, - "geo": null, - "retweeted": false, - "possibly_sensitive": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "DDEEF6", - "profile_sidebar_border_color": "C0DEED", - "profile_background_tile": false, - "name": "Twitter API", - "profile_image_url": "http://a0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "created_at": "Wed May 23 06:01:13 +0000 2007", - "location": "San Francisco, CA", - "follow_request_sent": false, - "profile_link_color": "0084B4", - "is_translator": false, - "id_str": "6253282", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://dev.twitter.com", - "indices": [ - 0, - 22 - ] - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": true, - "contributors_enabled": true, - "favourites_count": 24, - "url": "http://dev.twitter.com", - "profile_image_url_https": "https://si0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "utc_offset": -28800, - "id": 6253282, - "profile_use_background_image": true, - "listed_count": 10775, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 1212864, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_color": "C0DEED", - "verified": true, - "geo_enabled": true, - "time_zone": "Pacific Time (US & Canada)", - "description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 3333, - "friends_count": 31, - "following": null, - "show_all_inline_media": false, - "screen_name": "twitterapi" - }, - "in_reply_to_screen_name": null, - "source": "YoruFukurou", - "in_reply_to_status_id": null - } - ] - /home_timeline{mediaTypeExtension}: - type: base - get: - is: [ nestedable, trimmable ] - description: | - Returns a collection of the most recent Tweets and retweets posted by the - authenticating user and the users they follow. The home timeline is central - to how most users interact with the Twitter service. - Up to 800 Tweets are obtainable on the home timeline. It is more volatile - for users that follow many users or follow users who tweet frequently. - See Working with Timelines for instructions on traversing timelines efficiently. - queryParameters: - count: - description: | - Specifies the number of records to retrieve. Must be less than or equal - to 200. - type: integer - maximum: 200 - default: 20 - since_id: - description: | - Returns results with an ID greater than (that is, more recent than) the - specified ID. There are limits to the number of Tweets which can be accessed - through the API. If the limit of Tweets has occured since the since_id, the - since_id will be forced to the oldest ID available. - type: integer - max_id: - description: | - Returns results with an ID less than (that is, older than) or equal to - the specified ID. - type: integer - exclude_replies: - description: | - This parameter will prevent replies from appearing in the returned timeline. - Using exclude_replies with the count parameter will mean you will receive - up-to count tweets - this is because the count parameter retrieves tha - many tweets before filtering out retweets and replies. This parameter is - only supported for JSON and XML responses. - type: string - contributor_details: - description: | - This parameter enhances the contributors element of the status response - to include the screen_name of the contributor. By default only the user_id - of the contributor is included. - type: string - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "coordinates": null, - "truncated": false, - "created_at": "Tue Aug 28 21:16:23 +0000 2012", - "favorited": false, - "id_str": "240558470661799936", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "just another test", - "contributors": null, - "id": 240558470661799940, - "retweet_count": 0, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "source": "OAuth Dancer Reborn", - "user": { - "name": "OAuth Dancer", - "profile_sidebar_fill_color": "DDEEF6", - "profile_background_tile": true, - "profile_sidebar_border_color": "C0DEED", - "profile_image_url": "http://a0.twimg.com/profile_images/730275945/oauth-dancer_normal.jpg", - "created_at": "Wed Mar 03 19:37:35 +0000 2010", - "location": "San Francisco, CA", - "follow_request_sent": false, - "id_str": "119476949", - "is_translator": false, - "profile_link_color": "0084B4", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://bit.ly/oauth-dancer", - "indices": [ - 0, - 26 - ], - "display_url": null - } - ] - }, - "description": null - }, - "default_profile": false, - "url": "http://bit.ly/oauth-dancer", - "contributors_enabled": false, - "favourites_count": 7, - "utc_offset": null, - "profile_image_url_https": "https://si0.twimg.com/profile_images/730275945/oauth-dancer_normal.jpg", - "id": 119476949, - "listed_count": 1, - "profile_use_background_image": true, - "profile_text_color": "333333", - "followers_count": 28, - "lang": "en", - "protected": false, - "geo_enabled": true, - "notifications": false, - "description": "", - "profile_background_color": "C0DEED", - "verified": false, - "time_zone": null, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/80151733/oauth-dance.png", - "statuses_count": 166, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/80151733/oauth-dance.png", - "default_profile_image": false, - "friends_count": 14, - "following": false, - "show_all_inline_media": false, - "screen_name": "oauth_dancer" - }, - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - }, - { - "coordinates": { - "coordinates": [ - -122.25831, - 37.871609 - ], - "type": "Point" - }, - "truncated": false, - "created_at": "Tue Aug 28 21:08:15 +0000 2012", - "favorited": false, - "id_str": "240556426106372096", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [ - { - "expanded_url": "http://blogs.ischool.berkeley.edu/i290-abdt-s12/", - "url": "http://t.co/bfj7zkDJ", - "indices": [ - 79, - 99 - ], - "display_url": "blogs.ischool.berkeley.edu/i290-abdt-s12/" - } - ], - "hashtags": [], - "user_mentions": [ - { - "name": "Cal", - "id_str": "17445752", - "id": 17445752, - "indices": [ - 60, - 64 - ], - "screen_name": "Cal" - }, - { - "name": "Othman Laraki", - "id_str": "20495814", - "id": 20495814, - "indices": [ - 70, - 77 - ], - "screen_name": "othman" - } - ] - }, - "text": "lecturing at the \"analyzing big data with twitter\" class at @cal with @othman http://t.co/bfj7zkDJ", - "contributors": null, - "id": 240556426106372100, - "retweet_count": 3, - "in_reply_to_status_id_str": null, - "geo": { - "coordinates": [ - 37.871609, - -122.25831 - ], - "type": "Point" - }, - "retweeted": false, - "possibly_sensitive": false, - "in_reply_to_user_id": null, - "place": { - "name": "Berkeley", - "country_code": "US", - "country": "United States", - "attributes": {}, - "url": "http://api.twitter.com/1/geo/id/5ef5b7f391e30aff.json", - "id": "5ef5b7f391e30aff", - "bounding_box": { - "coordinates": [ - [ - [ - -122.367781, - 37.835727 - ], - [ - -122.234185, - 37.835727 - ], - [ - -122.234185, - 37.905824 - ], - [ - -122.367781, - 37.905824 - ] - ] - ], - "type": "Polygon" - }, - "full_name": "Berkeley, CA", - "place_type": "city" - }, - "source": "Safari on iOS", - "user": { - "name": "Raffi Krikorian", - "profile_sidebar_fill_color": "DDEEF6", - "profile_background_tile": false, - "profile_sidebar_border_color": "C0DEED", - "profile_image_url": "http://a0.twimg.com/profile_images/1270234259/raffi-headshot-casual_normal.png", - "created_at": "Sun Aug 19 14:24:06 +0000 2007", - "location": "San Francisco, California", - "follow_request_sent": false, - "id_str": "8285392", - "is_translator": false, - "profile_link_color": "0084B4", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://about.me/raffi.krikorian", - "url": "http://t.co/eNmnM6q", - "indices": [ - 0, - 19 - ], - "display_url": "about.me/raffi.krikorian" - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": true, - "url": "http://t.co/eNmnM6q", - "contributors_enabled": false, - "favourites_count": 724, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1270234259/raffi-headshot-casual_normal.png", - "id": 8285392, - "listed_count": 619, - "profile_use_background_image": true, - "profile_text_color": "333333", - "followers_count": 18752, - "lang": "en", - "protected": false, - "geo_enabled": true, - "notifications": false, - "description": "Director of @twittereng's Platform Services. I break things.", - "profile_background_color": "C0DEED", - "verified": false, - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 5007, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "default_profile_image": false, - "friends_count": 701, - "following": true, - "show_all_inline_media": true, - "screen_name": "raffi" - }, - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "truncated": false, - "created_at": "Tue Aug 28 19:59:34 +0000 2012", - "favorited": false, - "id_str": "240539141056638977", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "You'd be right more often if you thought you were wrong.", - "contributors": null, - "id": 240539141056638980, - "retweet_count": 1, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "source": "web", - "user": { - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": true, - "profile_sidebar_border_color": "000000", - "profile_image_url": "http://a0.twimg.com/profile_images/2546730059/f6a8zq58mg1hn0ha8vie_normal.jpeg", - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "location": "San Francisco, CA", - "follow_request_sent": false, - "id_str": "819797", - "is_translator": false, - "profile_link_color": "c71818", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://www.rebelmouse.com/episod/", - "url": "http://t.co/Lxw7upbN", - "indices": [ - 0, - 20 - ], - "display_url": "rebelmouse.com/episod/" - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": false, - "url": "http://t.co/Lxw7upbN", - "contributors_enabled": false, - "favourites_count": 15990, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2546730059/f6a8zq58mg1hn0ha8vie_normal.jpeg", - "id": 819797, - "listed_count": 340, - "profile_use_background_image": true, - "profile_text_color": "D20909", - "followers_count": 7126, - "lang": "en", - "protected": false, - "geo_enabled": true, - "notifications": false, - "description": "Reality Technician, Twitter API team, synthesizer enthusiast; a most excellent adventure in timelines. I know it's hard to believe in something you can't see.", - "profile_background_color": "000000", - "verified": false, - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "statuses_count": 18076, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "default_profile_image": false, - "friends_count": 5444, - "following": true, - "show_all_inline_media": true, - "screen_name": "episod" - }, - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - } - ] - /retweets_of_me{mediaTypeExtension}: - type: base - get: - is: [ nestedable, trimmable ] - description: | - Returns the most recent tweets authored by the authenticating user tha - have been retweeted by others. This timeline is a subset of the user's GET - statuses/user_timeline. - queryParameters: - count: - description: | - Specifies the number of records to retrieve. Must be less than or equal - to 100. If omitted, 20 will be assumed. - type: integer - maximum: 100 - default: 20 - since_id: - description: | - Returns results with an ID greater than (that is, more recent than) the - specified ID. There are limits to the number of Tweets which can be accessed - through the API. If the limit of Tweets has occured since the since_id, the - since_id will be forced to the oldest ID available. - type: integer - max_id: - description: | - Returns results with an ID less than (that is, older than) or equal to - the specified ID. - type: integer - include_user_entities: - description: The user entities node will be disincluded when set to false. - type: string - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "coordinates": null, - "truncated": false, - "favorited": false, - "created_at": "Fri Oct 19 15:51:49 +0000 2012", - "id_str": "259320959964680192", - "entities": { - "urls": [], - "hashtags": [], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "contributors": null, - "text": "It's bring your migraine to work day today!", - "in_reply_to_status_id_str": null, - "id": 259320959964680200, - "retweet_count": 1, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "YoruFukurou", - "user": { - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": false, - "profile_sidebar_border_color": "000000", - "location": "San Francisco, CA", - "profile_image_url": "http://a0.twimg.com/profile_images/2766969649/5e1a50995a9f9bfcdcdc7503e1271422_normal.jpeg", - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "profile_link_color": "CC1442", - "is_translator": false, - "id_str": "819797", - "follow_request_sent": false, - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://soundcloud.com/reality-technician", - "url": "http://t.co/bKlJ80Do", - "indices": [ - 0, - 20 - ], - "display_url": "soundcloud.com/reality-techni..." - } - ] - }, - "description": { - "urls": [] - } - }, - "favourites_count": 17094, - "url": "http://t.co/bKlJ80Do", - "contributors_enabled": false, - "default_profile": false, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2766969649/5e1a50995a9f9bfcdcdc7503e1271422_normal.jpeg", - "profile_banner_url": "https://si0.twimg.com/profile_banners/819797/1351262715", - "utc_offset": -28800, - "id": 819797, - "profile_use_background_image": false, - "listed_count": 351, - "followers_count": 7701, - "profile_text_color": "D20909", - "protected": false, - "lang": "en", - "geo_enabled": true, - "time_zone": "Pacific Time (US & Canada)", - "notifications": false, - "profile_background_color": "6B0F0F", - "description": "Reality Technician, Twitter API team, synth enthusiast. A most excellent adventure in timelines. Through the darkness of future past, the magician longs to see.", - "verified": false, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/686878932/6447abb9f83c76fb4fbd68e626c6c8c1.png", - "friends_count": 5549, - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/686878932/6447abb9f83c76fb4fbd68e626c6c8c1.png", - "statuses_count": 18626, - "screen_name": "episod", - "following": false - }, - "place": null, - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - } - ] - # Tweets - /retweets/{id}{mediaTypeExtension}: - uriParameters: - id: - description: The numerical ID of the desired status. - type: integer - type: base - get: - is: [ trimmable ] - description: | - Returns a collection of the 100 most recent retweets of the tweet specified - by the id parameter. - queryParameters: - count: - description: | - Specifies the number of records to retrieve. Must be less than or equal - to 100. - type: integer - maximum: 100 - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - [ - { - "coordinates": null, - "created_at": "Mon Mar 05 18:31:56 +0000 2012", - "favorited": false, - "truncated": false, - "retweeted_status": { - "coordinates": null, - "created_at": "Mon Jan 03 15:15:36 +0000 2011", - "favorited": false, - "truncated": false, - "id_str": "21947795900469248", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 21947795900469250, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "YoruFukurou", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "000000", - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": true, - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "location": "San Francisco, CA", - "follow_request_sent": false, - "is_translator": false, - "id_str": "819797", - "profile_link_color": "C71818", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://t.co/Lxw7upbN", - "url": "http://t.co/Lxw7upbN", - "indices": [ - 0, - 20 - ], - "display_url": "t.co/Lxw7upbN" - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://t.co/Lxw7upbN", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 16148, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "id": 819797, - "listed_count": 340, - "profile_use_background_image": true, - "profile_text_color": "D20909", - "protected": false, - "lang": "en", - "followers_count": 7235, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Reality Technician, Twitter API team, synth enthusiast. A most excellent adventure in timelines. Namenandclaimen.", - "profile_background_color": "000000", - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "statuses_count": 18189, - "default_profile_image": false, - "friends_count": 5456, - "show_all_inline_media": true, - "screen_name": "episod", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - "id_str": "176736821278019585", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [ - { - "name": "Taylor Singletary", - "id_str": "819797", - "id": 819797, - "indices": [ - 3, - 10 - ], - "screen_name": "episod" - } - ] - }, - "text": "RT @episod: It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 176736821278019600, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "web", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "C0DEED", - "name": "Haodong Yang", - "profile_sidebar_fill_color": "DDEEF6", - "profile_background_tile": false, - "created_at": "Tue Sep 27 19:48:49 +0000 2011", - "profile_image_url": "http://a0.twimg.com/profile_images/1629930876/DD2_11_normal.jpg", - "location": "Philly, PA", - "follow_request_sent": false, - "is_translator": false, - "id_str": "381124736", - "profile_link_color": "0084B4", - "entities": { - "description": { - "urls": [] - } - }, - "url": null, - "default_profile": true, - "contributors_enabled": false, - "favourites_count": 0, - "utc_offset": -18000, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1629930876/DD2_11_normal.jpg", - "id": 381124736, - "listed_count": 0, - "profile_use_background_image": true, - "profile_text_color": "333333", - "protected": false, - "lang": "en", - "followers_count": 4, - "geo_enabled": false, - "verified": false, - "notifications": false, - "description": "", - "profile_background_color": "C0DEED", - "time_zone": "Quito", - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 50, - "default_profile_image": false, - "friends_count": 15, - "show_all_inline_media": false, - "screen_name": "HaodongYang2ll", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "created_at": "Wed Jan 18 00:12:16 +0000 2012", - "favorited": false, - "truncated": false, - "retweeted_status": { - "coordinates": null, - "created_at": "Mon Jan 03 15:15:36 +0000 2011", - "favorited": false, - "truncated": false, - "id_str": "21947795900469248", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 21947795900469250, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "YoruFukurou", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "000000", - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": true, - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "location": "San Francisco, CA", - "follow_request_sent": false, - "is_translator": false, - "id_str": "819797", - "profile_link_color": "C71818", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://t.co/Lxw7upbN", - "url": "http://t.co/Lxw7upbN", - "indices": [ - 0, - 20 - ], - "display_url": "t.co/Lxw7upbN" - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://t.co/Lxw7upbN", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 16148, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "id": 819797, - "listed_count": 340, - "profile_use_background_image": true, - "profile_text_color": "D20909", - "protected": false, - "lang": "en", - "followers_count": 7235, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Reality Technician, Twitter API team, synth enthusiast. A most excellent adventure in timelines. Namenandclaimen.", - "profile_background_color": "000000", - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "statuses_count": 18189, - "default_profile_image": false, - "friends_count": 5456, - "show_all_inline_media": true, - "screen_name": "episod", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - "id_str": "159427850091499521", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [ - { - "name": "Taylor Singletary", - "id_str": "819797", - "id": 819797, - "indices": [ - 3, - 10 - ], - "screen_name": "episod" - } - ] - }, - "text": "RT @episod: It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 159427850091499520, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "web", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "DDDDDD", - "name": "Jed Sundwall", - "profile_sidebar_fill_color": "EEEEEE", - "profile_background_tile": false, - "created_at": "Tue May 01 17:44:32 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/2349550745/545z8g5d160mrg46ia78_normal.jpeg", - "location": "San Diego", - "follow_request_sent": false, - "is_translator": false, - "id_str": "5689832", - "profile_link_color": "003366", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://measuredvoice.com", - "indices": [ - 0, - 24 - ], - "display_url": null - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://measuredvoice.com", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 1379, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2349550745/545z8g5d160mrg46ia78_normal.jpeg", - "id": 5689832, - "listed_count": 102, - "profile_use_background_image": false, - "profile_text_color": "222222", - "protected": false, - "lang": "en", - "followers_count": 1393, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Dad. CEO of @MeasuredVoice. \"Normally, I'm against big things. I think the world's going to be solved by millions of small things.\" - Pete Seeger", - "profile_background_color": "FFFFFF", - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/134971286/twitter-template.png", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/134971286/twitter-template.png", - "statuses_count": 9134, - "default_profile_image": false, - "friends_count": 293, - "show_all_inline_media": true, - "screen_name": "jedsundwall", - "following": true - }, - "place": null, - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "created_at": "Tue Jan 10 05:31:38 +0000 2012", - "favorited": false, - "truncated": false, - "retweeted_status": { - "coordinates": null, - "created_at": "Mon Jan 03 15:15:36 +0000 2011", - "favorited": false, - "truncated": false, - "id_str": "21947795900469248", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 21947795900469250, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "YoruFukurou", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "000000", - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": true, - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "location": "San Francisco, CA", - "follow_request_sent": false, - "is_translator": false, - "id_str": "819797", - "profile_link_color": "C71818", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://t.co/Lxw7upbN", - "url": "http://t.co/Lxw7upbN", - "indices": [ - 0, - 20 - ], - "display_url": "t.co/Lxw7upbN" - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://t.co/Lxw7upbN", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 16148, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "id": 819797, - "listed_count": 340, - "profile_use_background_image": true, - "profile_text_color": "D20909", - "protected": false, - "lang": "en", - "followers_count": 7235, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Reality Technician, Twitter API team, synth enthusiast. A most excellent adventure in timelines. Namenandclaimen.", - "profile_background_color": "000000", - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "statuses_count": 18189, - "default_profile_image": false, - "friends_count": 5456, - "show_all_inline_media": true, - "screen_name": "episod", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - "id_str": "156609121603432448", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [ - { - "name": "Taylor Singletary", - "id_str": "819797", - "id": 819797, - "indices": [ - 3, - 10 - ], - "screen_name": "episod" - } - ] - }, - "text": "RT @episod: It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 156609121603432450, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "Morning Brief", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "C0DEED", - "name": "SEUNGMAN KIM", - "profile_sidebar_fill_color": "DDEEF6", - "profile_background_tile": false, - "created_at": "Tue Jun 08 15:50:31 +0000 2010", - "profile_image_url": "http://a0.twimg.com/profile_images/1694740268/image_normal", - "location": "", - "follow_request_sent": false, - "is_translator": false, - "id_str": "153449734", - "profile_link_color": "0084B4", - "entities": { - "description": { - "urls": [] - } - }, - "url": null, - "default_profile": true, - "contributors_enabled": false, - "favourites_count": 0, - "utc_offset": -36000, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1694740268/image_normal", - "id": 153449734, - "listed_count": 0, - "profile_use_background_image": true, - "profile_text_color": "333333", - "protected": false, - "lang": "en", - "followers_count": 2, - "geo_enabled": false, - "verified": false, - "notifications": false, - "description": "", - "profile_background_color": "C0DEED", - "time_zone": "Hawaii", - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 36, - "default_profile_image": false, - "friends_count": 3, - "show_all_inline_media": false, - "screen_name": "MrGoldsman", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - { - "coordinates": null, - "created_at": "Mon Jan 03 15:17:31 +0000 2011", - "favorited": false, - "truncated": false, - "retweeted_status": { - "coordinates": null, - "created_at": "Mon Jan 03 15:15:36 +0000 2011", - "favorited": false, - "truncated": false, - "id_str": "21947795900469248", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [] - }, - "text": "It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 21947795900469250, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "YoruFukurou", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "000000", - "name": "Taylor Singletary", - "profile_sidebar_fill_color": "FBFBFB", - "profile_background_tile": true, - "created_at": "Wed Mar 07 22:23:19 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "location": "San Francisco, CA", - "follow_request_sent": false, - "is_translator": false, - "id_str": "819797", - "profile_link_color": "C71818", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://t.co/Lxw7upbN", - "url": "http://t.co/Lxw7upbN", - "indices": [ - 0, - 20 - ], - "display_url": "t.co/Lxw7upbN" - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://t.co/Lxw7upbN", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 16148, - "utc_offset": -28800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png", - "id": 819797, - "listed_count": 340, - "profile_use_background_image": true, - "profile_text_color": "D20909", - "protected": false, - "lang": "en", - "followers_count": 7235, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Reality Technician, Twitter API team, synth enthusiast. A most excellent adventure in timelines. Namenandclaimen.", - "profile_background_color": "000000", - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/643655842/hzfv12wini4q60zzrthg.png", - "statuses_count": 18189, - "default_profile_image": false, - "friends_count": 5456, - "show_all_inline_media": true, - "screen_name": "episod", - "following": false - }, - "place": null, - "in_reply_to_status_id": null - }, - "id_str": "21948274806095872", - "in_reply_to_user_id_str": null, - "entities": { - "urls": [], - "media": [], - "hashtags": [], - "user_mentions": [ - { - "name": "Taylor Singletary", - "id_str": "819797", - "id": 819797, - "indices": [ - 3, - 10 - ], - "screen_name": "episod" - } - ] - }, - "text": "RT @episod: It's 2011. I work at Twitter. And so let's go kick some ass.", - "contributors": null, - "id": 21948274806095870, - "retweet_count": 4, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "source": "web", - "in_reply_to_screen_name": null, - "user": { - "profile_sidebar_border_color": "303030", - "name": "Keef M", - "profile_sidebar_fill_color": "9FBAC9", - "profile_background_tile": false, - "created_at": "Thu Mar 22 15:35:51 +0000 2007", - "profile_image_url": "http://a0.twimg.com/profile_images/1258930645/new-wee-mee_normal.jpg", - "location": "London, UK", - "follow_request_sent": false, - "is_translator": false, - "id_str": "1891481", - "profile_link_color": "0B57A1", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://keefmoon.tumblr.com", - "indices": [ - 0, - 26 - ], - "display_url": null - } - ] - }, - "description": { - "urls": [] - } - }, - "url": "http://keefmoon.tumblr.com", - "default_profile": false, - "contributors_enabled": false, - "favourites_count": 1513, - "utc_offset": 0, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1258930645/new-wee-mee_normal.jpg", - "id": 1891481, - "listed_count": 59, - "profile_use_background_image": true, - "profile_text_color": "303030", - "protected": false, - "lang": "en", - "followers_count": 1242, - "geo_enabled": true, - "verified": false, - "notifications": false, - "description": "Tech and gadget enthusiast. iOS Developer and Co-founder of @SonarSync", - "profile_background_color": "303030", - "time_zone": "London", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/64877359/mqglacierlake.br.jpg", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/64877359/mqglacierlake.br.jpg", - "statuses_count": 17295, - "default_profile_image": false, - "friends_count": 1995, - "show_all_inline_media": false, - "screen_name": "keefmoon", - "following": true - }, - "place": null, - "in_reply_to_status_id": null - } - ] - /show/{id}{mediaTypeExtension}: - uriParameters: - id: - description: The numerical ID of the desired Tweet. - type: integer - type: base - get: - is: [ nestedable, trimmable ] - description: | - Returns a single Tweet, specified by the id parameter. The Tweet's author - will also be embedded within the tweet. - - Extended description - About Geo - If there is no geotag for a status, then there will be an empty or - "geo" : {}. This can only be populated if the user has used the Geotagging - API to send a statuses/update. - The JSON response mostly uses conventions laid out in GeoJSON. Unfortunately, - the coordinates that Twitter renders are reversed from the GeoJSON specification - (GeoJSON specifies a longitude then a latitude, whereas we are currently - representing it as a latitude then a longitude). Our JSON renders as: - ------------- - "geo": { "type":"Point", "coordinates":[37.78029, -122.39697] } - - Contributors - If there are no contributors for a Tweet, then there will be an empty or - "contributors" : {}. This field will only be populated if the user has - contributors enabled on his or her account -- this is a beta feature tha - is not yet generally available to all. - This object contains an array of user IDs for users who have contributed - to this status (an example of a status that has been contributed to is this - one). In practice, there is usually only one ID in this array. The JSON - renders as such - ------------- - "contributors":[8285392]. - queryParameters: - include_my_retweet: - description: | - When set to either true, t or 1, any Tweets returned that have been - retweeted by the authenticating user will include an additional - current_user_retweet node, containing the ID of the source status for - the retweet. - enum: - - 0 - - 1 - - true - - false - - - - f - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "coordinates": null, - "favorited": false, - "truncated": false, - "created_at": "Wed Jun 06 20:07:10 +0000 2012", - "id_str": "210462857140252672", - "entities": { - "urls": [ - { - "expanded_url": "https://dev.twitter.com/terms/display-guidelines", - "url": "https://t.co/Ed4omjYs", - "indices": [ - 76, - 97 - ], - "display_url": "dev.twitter.com/terms/display-..." - } - ], - "hashtags": [ - { - "text": "Twitterbird", - "indices": [ - 19, - 31 - ] - } - ], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "contributors": [ - 14927800 - ], - "text": "Along with our new #Twitterbird, we've also updated our Display Guidelines: https://t.co/Ed4omjYs ^JC", - "retweet_count": 66, - "in_reply_to_status_id_str": null, - "id": 210462857140252670, - "geo": null, - "retweeted": true, - "possibly_sensitive": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "profile_sidebar_fill_color": "DDEEF6", - "profile_sidebar_border_color": "C0DEED", - "profile_background_tile": false, - "name": "Twitter API", - "profile_image_url": "http://a0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "created_at": "Wed May 23 06:01:13 +0000 2007", - "location": "San Francisco, CA", - "follow_request_sent": false, - "profile_link_color": "0084B4", - "is_translator": false, - "id_str": "6253282", - "entities": { - "url": { - "urls": [ - { - "expanded_url": null, - "url": "http://dev.twitter.com", - "indices": [ - 0, - 22 - ] - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": true, - "contributors_enabled": true, - "favourites_count": 24, - "url": "http://dev.twitter.com", - "profile_image_url_https": "https://si0.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png", - "utc_offset": -28800, - "id": 6253282, - "profile_use_background_image": true, - "listed_count": 10774, - "profile_text_color": "333333", - "lang": "en", - "followers_count": 1212963, - "protected": false, - "notifications": null, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png", - "profile_background_color": "C0DEED", - "verified": true, - "geo_enabled": true, - "time_zone": "Pacific Time (US & Canada)", - "description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", - "default_profile_image": false, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png", - "statuses_count": 3333, - "friends_count": 31, - "following": true, - "show_all_inline_media": false, - "screen_name": "twitterapi" - }, - "in_reply_to_screen_name": null, - "source": "web", - "in_reply_to_status_id": null - } - /destroy/{id}{mediaTypeExtension}: - type: base - uriParameters: - id: - description: The numerical ID of the desired status. - type: integer - post: - description: | - Destroys the status specified by the required ID parameter. The authenticating - user must be the author of the specified status. Returns the destroyed status - if successful. - body: - application/x-www-form-urlencoded: - formParameters: - trim_user: - description: | - When set to either true, t or 1, each tweet returned in a timeline will - include a user object including only the status authors numerical ID. - Omit this parameter to receive the complete user object. - enum: - - 0 - - 1 - - true - - false - - - - f - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "coordinates": null, - "favorited": false, - "created_at": "Wed Aug 29 16:54:38 +0000 2012", - "truncated": false, - "id_str": "240854986559455234", - "entities": { - "urls": [ - { - "expanded_url": "http://venturebeat.com/2012/08/29/vimeo-dropbox/#.UD5JLsYptSs.twitter", - "url": "http://t.co/7UlkvZzM", - "indices": [ - 69, - 89 - ], - "display_url": "venturebeat.com/2012/08/29/vim..." - } - ], - "hashtags": [], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "text": "\"Vimeo integrates with Dropbox for easier video uploads and shares\": http://t.co/7UlkvZzM", - "contributors": null, - "retweet_count": 1, - "id": 240854986559455230, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "possibly_sensitive": false, - "place": null, - "user": { - "name": "Jason Costa", - "profile_sidebar_border_color": "86A4A6", - "profile_sidebar_fill_color": "A0C5C7", - "profile_background_tile": false, - "profile_image_url": "http://a0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "created_at": "Wed May 28 00:20:15 +0000 2008", - "location": "", - "is_translator": true, - "follow_request_sent": false, - "id_str": "14927800", - "profile_link_color": "FF3300", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://www.jason-costa.blogspot.com/", - "url": "http://t.co/YCA3ZKY", - "indices": [ - 0, - 19 - ], - "display_url": "jason-costa.blogspot.com" - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": false, - "contributors_enabled": false, - "url": "http://t.co/YCA3ZKY", - "favourites_count": 883, - "utc_offset": -28800, - "id": 14927800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "profile_use_background_image": true, - "listed_count": 150, - "profile_text_color": "333333", - "protected": false, - "lang": "en", - "followers_count": 8760, - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme6/bg.gif", - "verified": false, - "profile_background_color": "709397", - "notifications": false, - "description": "Platform at Twitter", - "geo_enabled": true, - "statuses_count": 5531, - "default_profile_image": false, - "friends_count": 166, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme6/bg.gif", - "show_all_inline_media": true, - "screen_name": "jasoncosta", - "following": false - }, - "possibly_sensitive_editable": true, - "source": "Tweet Button", - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - } - /update{mediaTypeExtension}: - type: base - post: - description: | - Updates the authenticating user's current status, also known as tweeting. - To upload an image to accompany the tweet, use `POST statuses/update_with_media`. - For each update attempt, the update text is compared with the authenticating - user's recent tweets. Any attempt that would result in duplication will be - blocked, resulting in a 403 error. Therefore, a user cannot submit the same - status twice in a row. - While not rate limited by the API a user is limited in the number of tweets - they can create at a time. If the number of updates posted by the user reaches - the current allowed limit this method will return an HTTP 403 error. - body: - application/x-www-form-urlencoded: - formParameters: - status: - description: | - The text of your status update, typically up to 140 characters. URL encode - as necessary. t.co link wrapping may effect character counts. - There are some special commands in this field to be aware of. For instance, - preceding a message with "D " or "M " and following it with a screen name - can create a direct message to that user if the relationship allows for it. - type: string - maxLength: 140 - required: true - in_reply_to_status_id: - description: | - The ID of an existing status that the update is in reply to. - Note: This parameter will be ignored unless the author of the tweet this - parameter references is mentioned within the status text. Therefore, you - must include @username, where username is the author of the referenced - tweet, within the update. - type: integer - lat: - description: | - The latitude of the location this tweet refers to. This parameter will - be ignored unless it is inside the range -90.0 to +90.0 (North is positive) - inclusive. It will also be ignored if there isn't a corresponding long - parameter. - type: number - maximum: 90 - minimum: -90 - long: - description: | - The longitude of the location this tweet refers to. The valid ranges for - longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter - will be ignored if outside that range, if it is not a number, if geo_enabled - is disabled, or if there not a corresponding lat parameter. - type: number - maximum: 180 - minimum: -180 - place_id: - description: | - A place in the world. These IDs can be retrieved from GET geo/reverse_geocode. - type: string - display_coordinates: - description: | - Whether or not to put a pin on the exact coordinates a twee - has been sent from. - enum: - - 0 - - 1 - - true - - false - - - - f - trim_user: - description: | - When set to either true, t or 1, each tweet returned in a timeline will - include a user object including only the status authors numerical ID. - Omit this parameter to receive the complete user object. - enum: - - 0 - - 1 - - true - - false - - - - f - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "coordinates": null, - "favorited": false, - "created_at": "Wed Sep 05 00:37:15 +0000 2012", - "truncated": false, - "id_str": "243145735212777472", - "entities": { - "urls": [], - "hashtags": [ - { - "text": "peterfalk", - "indices": [ - 35, - 45 - ] - } - ], - "user_mentions": [] - }, - "in_reply_to_user_id_str": null, - "text": "Maybe he'll finally find his keys. #peterfalk", - "contributors": null, - "retweet_count": 0, - "id": 243145735212777470, - "in_reply_to_status_id_str": null, - "geo": null, - "retweeted": false, - "in_reply_to_user_id": null, - "place": null, - "user": { - "name": "Jason Costa", - "profile_sidebar_border_color": "86A4A6", - "profile_sidebar_fill_color": "A0C5C7", - "profile_background_tile": false, - "profile_image_url": "http://a0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "created_at": "Wed May 28 00:20:15 +0000 2008", - "location": "", - "is_translator": true, - "follow_request_sent": false, - "id_str": "14927800", - "profile_link_color": "FF3300", - "entities": { - "url": { - "urls": [ - { - "expanded_url": "http://www.jason-costa.blogspot.com/", - "url": "http://t.co/YCA3ZKY", - "indices": [ - 0, - 19 - ], - "display_url": "jason-costa.blogspot.com" - } - ] - }, - "description": { - "urls": [] - } - }, - "default_profile": false, - "contributors_enabled": false, - "url": "http://t.co/YCA3ZKY", - "favourites_count": 883, - "utc_offset": -28800, - "id": 14927800, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "profile_use_background_image": true, - "listed_count": 150, - "profile_text_color": "333333", - "protected": false, - "lang": "en", - "followers_count": 8760, - "time_zone": "Pacific Time (US & Canada)", - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme6/bg.gif", - "verified": false, - "profile_background_color": "709397", - "notifications": false, - "description": "Platform at Twitter", - "geo_enabled": true, - "statuses_count": 5532, - "default_profile_image": false, - "friends_count": 166, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme6/bg.gif", - "show_all_inline_media": true, - "screen_name": "jasoncosta", - "following": false - }, - "source": "My Shiny App", - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null - } - 403: - description: | - User is duplicating status or rate limit is exceeded. - /retweet/{id}{mediaTypeExtension}: - uriParameters: - id: - description: The numerical ID of the desired status. - type: integer - type: base - post: - description: | - Retweets a tweet. Returns the original tweet with retweet details embedded. - body: - application/x-www-form-urlencoded: - formParameters: - trim_user: - description: | - When set to either true, t or 1, each tweet returned in a timeline will - include a user object including only the status authors numerical ID. - Omit this parameter to receive the complete user object. - enum: - - 0 - - 1 - - true - - false - - - - f - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "truncated": false, - "retweeted": false, - "id_str": "243149503589400576", - "coordinates": null, - "in_reply_to_screen_name": null, - "in_reply_to_status_id_str": null, - "geo": null, - "in_reply_to_status_id": null, - "contributors": null, - "source": "My Shiny App", - "in_reply_to_user_id_str": null, - "created_at": "Wed Sep 05 00:52:13 +0000 2012", - "favorited": false, - "entities": { - "user_mentions": [ - { - "indices": [ - 3, - 10 - ], - "id_str": "7588892", - "screen_name": "kurrik", - "name": "Arne Roomann-Kurrik", - "id": 7588892 - } - ], - "hashtags": [], - "urls": [] - }, - "user": { - "following": false, - "geo_enabled": true, - "profile_background_image_url": "http://a0.twimg.com/images/themes/theme6/bg.gif", - "description": "Platform at Twitter", - "notifications": false, - "friends_count": 166, - "profile_link_color": "FF3300", - "location": "", - "id_str": "14927800", - "default_profile_image": false, - "profile_image_url_https": "https://si0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "favourites_count": 883, - "profile_background_color": "709397", - "url": "http://t.co/YCA3ZKY", - "screen_name": "jasoncosta", - "profile_background_tile": false, - "contributors_enabled": false, - "verified": false, - "created_at": "Wed May 28 00:20:15 +0000 2008", - "profile_sidebar_fill_color": "A0C5C7", - "followers_count": 8761, - "lang": "en", - "listed_count": 150, - "profile_sidebar_border_color": "86A4A6", - "protected": false, - "entities": { - "description": { - "urls": [] - }, - "url": { - "urls": [ - { - "indices": [ - 0, - 19 - ], - "url": "http://t.co/YCA3ZKY", - "display_url": "jason-costa.blogspot.com", - "expanded_url": "http://www.jason-costa.blogspot.com/" - } - ] - } - }, - "show_all_inline_media": true, - "follow_request_sent": false, - "statuses_count": 5533, - "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme6/bg.gif", - "name": "Jason Costa", - "default_profile": false, - "profile_use_background_image": true, - "profile_image_url": "http://a0.twimg.com/profile_images/1751674923/new_york_beard_normal.jpg", - "id": 14927800, - "is_translator": true, - "time_zone": "Pacific Time (US & Canada)", - "utc_offset": -28800, - "profile_text_color": "333333" - }, - "place": null, - "id": 243149503589400580, - "retweeted_status": { - "truncated": false, - "retweeted": false, - "id_str": "241259202004267009", - "coordinates": null, - "in_reply_to_screen_name": null, - "in_reply_to_status_id_str": null, - "geo": null, - "in_reply_to_status_id": null, - "contributors": null, - "source": "web", - "in_reply_to_user_id_str": null, - "created_at": "Thu Aug 30 19:40:50 +0000 2012", - "favorited": false, - "entities": { - "user_mentions": [], - "hashtags": [], - "urls": [] - }, - "user": { - "following": true, - "geo_enabled": true, - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/342542280/background7.png", - "description": "Developer Advocate at Twitter, practitioner of dark sandwich arts. ", - "notifications": false, - "friends_count": 500, - "profile_link_color": "0084B4", - "location": "Scan Francesco", - "id_str": "7588892", - "default_profile_image": false, - "profile_image_url_https": "https://si0.twimg.com/profile_images/24229162/arne001_normal.jpg", - "favourites_count": 624, - "profile_background_color": "8FC1FF", - "url": "http://t.co/bGmVjSox", - "screen_name": "kurrik", - "profile_background_tile": true, - "contributors_enabled": false, - "verified": false, - "created_at": "Thu Jul 19 15:58:07 +0000 2007", - "profile_sidebar_fill_color": "C7E0FF", - "followers_count": 3514, - "lang": "en", - "listed_count": 165, - "profile_sidebar_border_color": "6BAEFF", - "protected": false, - "entities": { - "description": { - "urls": [] - }, - "url": { - "urls": [ - { - "indices": [ - 0, - 20 - ], - "url": "http://t.co/bGmVjSox", - "display_url": "start.roomanna.com", - "expanded_url": "http://start.roomanna.com/" - } - ] - } - }, - "show_all_inline_media": false, - "follow_request_sent": false, - "statuses_count": 2963, - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/342542280/background7.png", - "name": "Arne Roomann-Kurrik", - "default_profile": false, - "profile_use_background_image": true, - "profile_image_url": "http://a0.twimg.com/profile_images/24229162/arne001_normal.jpg", - "id": 7588892, - "is_translator": false, - "time_zone": "Pacific Time (US & Canada)", - "utc_offset": -28800, - "profile_text_color": "000000" - }, - "place": null, - "id": 241259202004267000, - "retweet_count": 1, - "in_reply_to_user_id": null, - "text": "tcptrace and imagemagick - two command line tools TOTALLY worth learning" - }, - "retweet_count": 1, - "in_reply_to_user_id": null, - "text": "RT @kurrik: tcptrace and imagemagick - two command line tools TOTALLY worth learning" - } - /update_with_media{mediaTypeExtension}: - type: base - post: - description: | - Updates the authenticating user's current status and attaches media for - upload. In other words, it creates a Tweet with a picture attached. - Unlike POST statuses/update, this method expects raw multipart data. Your - POST request's Content-Type should be set to multipart/form-data with the - media[] parameter - The Tweet text will be rewritten to include the media URL(s), which will - reduce the number of characters allowed in the Tweet text. If the URL(s) - cannot be appended without text truncation, the tweet will be rejected and - this method will return an HTTP 403 error. - body: - application/x-www-form-urlencoded: - formParameters: - status: - description: | - The text of your status update. URL encode as necessary. t.co link - wrapping may affect character counts if the post contains URLs. You mus - additionally account for the characters_reserved_per_media per uploaded - media, additionally accounting for space characters in between finalized - URLs. - Note: Request the GET help/configuration endpoint to get the curren - characters_reserved_per_media and max_media_per_upload values. - type: string - maxLength: 140 - required: true - media[]: - description: | - Up to max_media_per_upload files may be specified in the request, each - named media[]. Supported image formats are PNG, JPG and GIF. Animated - GIFs are not supported. This data must be the raw image bytes - base64 - encoded images are currently not supported. - Note: Request the GET help/configuration endpoint to get the curren - max_media_per_upload and photo_size_limit values. - type: string - required: true - possibly_sensitive: - description: | - Set to true for content which may not be suitable for every audience. - enum: - - 0 - - 1 - - true - - false - - - - f - in_reply_to_status_id: - description: | - The ID of an existing status that the update is in reply to. - Note: This parameter will be ignored unless the author of the tweet this - parameter references is mentioned within the status text. Therefore, you - must include @username, where username is the author of the referenced - tweet, within the update. - type: integer - lat: - description: | - The latitude of the location this tweet refers to. This parameter will - be ignored unless it is inside the range -90.0 to +90.0 (North is positive) - inclusive. It will also be ignored if there isn't a corresponding long - parameter. - type: number - maximum: 90 - minimum: -90 - long: - description: | - The longitude of the location this tweet refers to. The valid ranges for - longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter - will be ignored if outside that range, if it is not a number, if geo_enabled - is disabled, or if there not a corresponding lat parameter. - type: number - maximum: 180 - minimum: -180 - place_id: - description: | - A place in the world. These IDs can be retrieved from GET geo/reverse_geocode. - type: string - display_coordinates: - description: | - Whether or not to put a pin on the exact coordinates a twee - has been sent from. - enum: - - 0 - - 1 - - true - - false - - - - f - responses: - 200: - body: - schema: | - { - "": "http://json-schema.org/draft-03/schema", - "type": "object", - "properties": { - "": [ - { - "properties": { - "coordinates": { - "properties": { - "coordinates": [ - { - "type": "number" - } - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "truncated": { - "type": "boolean" - }, - "favorited": { - "type": "boolean" - }, - "created_at": { - "type": "string" - }, - "id_str": { - "type": "string" - }, - "in_reply_to_user_id_str": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "text": { - "type": "string" - }, - "contributors": [ - { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - } - } - ], - "type": "array", - "id": { - "type": "integer" - }, - "retweet_count": { - "type": "integer" - }, - "in_reply_to_status_id_str": { - "type": "string" - }, - "geo": { - "type": "string" - }, - "retweeted": { - "type": "boolean" - }, - "in_reply_to_user_id": { - "type": "string" - }, - "in_reply_to_screen_name": { - "type": "string" - }, - "source": { - "type": "string" - }, - "user": { - "properties": { - "profile_sidebar_fill_color": { - "type": "string" - }, - "profile_background_tile": { - "type": "boolean" - }, - "profile_sidebar_border_color": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profile_image_url": { - "type": "string" - }, - "location": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "follow_request_sent": { - "type": "boolean" - }, - "is_translator": { - "type": "boolean" - }, - "id_str": { - "type": "string" - }, - "profile_link_color": { - "type": "string" - }, - "entities": { - "media": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "media_url_https": { - "type": "string" - }, - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "sizes": { - "large": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "medium": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "small": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - }, - "thumb": { - "w": { - "type": "integer" - }, - "resize": [ - "crop", - "fit" - ], - "h": { - "type": "integer" - } - } - }, - "type": "array", - "indices": [ - { - "type": "integer" - } - ] - }, - "type": "object" - } - ], - "type": "array", - "urls": [ - { - "properties": { - "url": { - "type": "string" - }, - "display_url": { - "type": "string" - }, - "expanded_url": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "hashtags": [ - { - "properties": { - "text": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ], - "user_mentions": [ - { - "properties": { - "id": { - "type": "integer" - }, - "id_str": { - "type": "string" - }, - "screen_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "indices": [ - { - "type": "integer" - } - ], - "type": "array" - }, - "type": "object" - } - ] - }, - "favourites_count": { - "type": "integer" - }, - "url": { - "type": "string" - }, - "default_profile": { - "type": "boolean" - }, - "contributors_enabled": { - "type": "boolean" - }, - "profile_image_url_https": { - "type": "string" - }, - "utc_offset": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "listed_count": { - "type": "integer" - }, - "profile_use_background_image": { - "type": "boolean" - }, - "followers_count": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "profile_text_color": { - "type": "string" - }, - "lang": { - "type": "string" - }, - "profile_background_color": { - "type": "string" - }, - "time_zone": { - "type": "string" - }, - "verified": { - "type": "boolean" - }, - "profile_background_image_url_https": { - "type": "string" - }, - "description": { - "type": "string" - }, - "geo_enabled": { - "type": "boolean" - }, - "notifications": { - "type": "boolean" - }, - "default_profile_image": { - "type": "boolean" - }, - "friends_count": { - "type": "integer" - }, - "profile_background_image_url": { - "type": "string" - }, - "statuses_count": { - "type": "integer" - }, - "following": { - "type": "boolean" - }, - "screen_name": { - "type": "string" - }, - "show_all_inline_media": { - "type": "boolean" - } - }, - "type": "object" - }, - "place": { - "name": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "country": { - "type": "string" - }, - "attributes": { - "properties": { - "street_address": { - "type": "string" - }, - "623:id": { - "type": "string" - }, - "twitter": { - "type": "string" - } - }, - "type": "object" - }, - "url": { - "type": "string" - }, - "id": { - "type": "string" - }, - "bounding_box": { - "properties": { - "coordinates": [ - [ - { - "properties": { - "": [ - { - "type": "number" - } - ] - }, - "type": "object" - } - ] - ], - "type": { - "type": "string" - } - }, - "type": "object" - }, - "full_name": { - "type": "string" - }, - "place_type": { - "type": "string" - } - }, - "in_reply_to_status_id": { - "type": "string" - } - }, - "type": "object" - } - ] - } - } - example: | - { - "contributors": null, - "coordinates": null, - "created_at": "Fri Sep 07 22:46:18 +0000 2012", - "entities": { - "hashtags": [], - "media": [ - { - "display_url": "pic.twitter.com/lX5LVZO", - "expanded_url": "http://twitter.com/fakekurrik/status/244204973972410368/photo/1", - "id": 244204973989187600, - "id_str": "244204973989187584", - "indices": [ - 44, - 63 - ], - "media_url": "http://pbs.twimg.com/media/A2OXIUcCUAAXj9k.png", - "media_url_https": "https://pbs.twimg.com/media/A2OXIUcCUAAXj9k.png", - "sizes": { - "large": { - "h": 175, - "resize": "fit", - "w": 333 - }, - "medium": { - "h": 175, - "resize": "fit", - "w": 333 - }, - "small": { - "h": 175, - "resize": "fit", - "w": 333 - }, - "thumb": { - "h": 150, - "resize": "crop", - "w": 150 - } - }, - "type": "photo", - "url": "http://t.co/lX5LVZO" - } - ], - "urls": [], - "user_mentions": [] - }, - "favorited": false, - "geo": null, - "id": 244204973972410370, - "id_str": "244204973972410368", - "in_reply_to_screen_name": null, - "in_reply_to_status_id": null, - "in_reply_to_status_id_str": null, - "in_reply_to_user_id": null, - "in_reply_to_user_id_str": null, - "place": null, - "possibly_sensitive": false, - "retweet_count": 0, - "retweeted": false, - "source": "Fakekurrik's Test Application", - "text": "Hello 2012-09-07 15:48:27.889593 -0700 PDT! http://t.co/lX5LVZO", - "truncated": false, - "user": { - "contributors_enabled": false, - "created_at": "Fri Sep 09 16:13:20 +0000 2011", - "default_profile": false, - "default_profile_image": false, - "description": "I am just a testing account, following me probably won't gain you very much", - "entities": { - "description": { - "urls": [] - }, - "url": { - "urls": [ - { - "display_url": null, - "expanded_url": null, - "indices": [ - 0, - 24 - ], - "url": "http://blog.roomanna.com" - } - ] - } - }, - "favourites_count": 1, - "follow_request_sent": false, - "followers_count": 2, - "following": false, - "friends_count": 5, - "geo_enabled": true, - "id": 370773112, - "id_str": "370773112", - "is_translator": false, - "lang": "en", - "listed_count": 0, - "location": "Trapped in factory", - "name": "fakekurrik", - "notifications": false, - "profile_background_color": "C0DEED", - "profile_background_image_url": "http://a0.twimg.com/profile_background_images/616512781/iarz5lvj7lg7zpg3zv8j.jpeg", - "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/616512781/iarz5lvj7lg7zpg3zv8j.jpeg", - "profile_background_tile": true, - "profile_image_url": "http://a0.twimg.com/profile_images/2440719659/x47xdzkguqxr1w1gg5un_normal.png", - "profile_image_url_https": "https://si0.twimg.com/profile_images/2440719659/x47xdzkguqxr1w1gg5un_normal.png", - "profile_link_color": "0084B4", - "profile_sidebar_border_color": "C0DEED", - "profile_sidebar_fill_color": "FFFFFF", - "profile_text_color": "333333", - "profile_use_background_image": true, - "protected": true, - "screen_name": "fakekurrik", - "show_all_inline_media": false, - "statuses_count": 546, - "time_zone": "Pacific Time (US & Canada)", - "url": "http://blog.roomanna.com", - "utc_offset": -28800, - "verified": false - } - } - 403: - description: The URL(s) cannot be appended without text truncation. - /oembed{mediaTypeExtension}: - type: base - get: - description: | - Returns information allowing the creation of an embedded representation - of a Tweet on third party sites. See the oEmbed specification for information - about the response format. - While this endpoint allows a bit of customization for the final appearance - of the embedded Tweet, be aware that the appearance of the rendered Tweet may - change over time to be consistent with Twitter's Display Requirements. Do no - rely on any class or id parameters to stay constant in the returned markup. - queryParameters: - id: - description: The Tweet/status ID to return embed code for. - type: integer - required: true - url: - description: The URL of the Tweet/status to be embedded. - type: string - required: true - maxwidth: - description: | - The maximum width in pixels that the embed should be rendered at. - type: integer - minimum: 250 - maximum: 550 - hide_media: - description: | - Specifies whether the embedded Tweet should automatically expand - images which were uploaded via POST statuses/update_with_media. - When set to either true, t or 1 images will not be expanded. - enum: - - 0 - - 1 - - true - - false - - - - f - default: false - hide_thread: - description: | - Specifies whether the embedded Tweet should automatically show the - original message in the case that the embedded Tweet is a reply. When - set to either true, t or 1 the original Tweet will not be shown. - enum: - - 0 - - 1 - - true - - false - - - - f - default: false - omit_script: - description: | - Specifies whether the embedded Tweet HTML should include a - - - - diff --git a/dist/scripts/api-console-vendor.js b/dist/scripts/api-console-vendor.js deleted file mode 100644 index 5ae2ab0f2..000000000 --- a/dist/scripts/api-console-vendor.js +++ /dev/null @@ -1,72443 +0,0 @@ -/** - * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked - */ - -;(function() { - -/** - * Block-Level Grammar - */ - -var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: noop, - hr: /^( *[-*_]){3,} *(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, - nptable: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, - def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, - table: noop, - paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, - text: /^[^\n]+/ -}; - -block.bullet = /(?:[*+-]|\d+\.)/; -block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; -block.item = replace(block.item, 'gm') - (/bull/g, block.bullet) - (); - -block.list = replace(block.list) - (/bull/g, block.bullet) - ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') - ('def', '\\n+(?=' + block.def.source + ')') - (); - -block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - -block._tag = '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' - + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' - + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; - -block.html = replace(block.html) - ('comment', //) - ('closed', /<(tag)[\s\S]+?<\/\1>/) - ('closing', /])*?>/) - (/tag/g, block._tag) - (); - -block.paragraph = replace(block.paragraph) - ('hr', block.hr) - ('heading', block.heading) - ('lheading', block.lheading) - ('blockquote', block.blockquote) - ('tag', '<' + block._tag) - ('def', block.def) - (); - -/** - * Normal Block Grammar - */ - -block.normal = merge({}, block); - -/** - * GFM Block Grammar - */ - -block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, - paragraph: /^/, - heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ -}); - -block.gfm.paragraph = replace(block.paragraph) - ('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - (); - -/** - * GFM + Tables Block Grammar - */ - -block.tables = merge({}, block.gfm, { - nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, - table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ -}); - -/** - * Block Lexer - */ - -function Lexer(options) { - this.tokens = []; - this.tokens.links = {}; - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } -} - -/** - * Expose Block Rules - */ - -Lexer.rules = block; - -/** - * Static Lex Method - */ - -Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); -}; - -/** - * Preprocessing - */ - -Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); -}; - -/** - * Lexing - */ - -Lexer.prototype.token = function(src, top, bq) { - var src = src.replace(/^ +$/gm, '') - , next - , loose - , cap - , bull - , b - , item - , space - , i - , l; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2], - text: cap[3] || '' - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i].split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top, true); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - - this.tokens.push({ - type: 'list_start', - ordered: bull.length > 1 - }); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) +/, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (this.options.smartLists && i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull !== b && !(bull.length > 1 && b.length > 1)) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' - }); - - // Recurse. - this.token(item, false, bq); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: !this.options.sanitizer - && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), - text: cap[0] - }); - continue; - } - - // def - if ((!bq && top) && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.links[cap[1].toLowerCase()] = { - href: cap[2], - title: cap[3] - }; - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i] - .replace(/^ *\| *| *\| *$/g, '') - .split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; -}; - -/** - * Inline-Level Grammar - */ - -var inline = { - escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, - autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, - url: noop, - tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, - link: /^!?\[(inside)\]\(href\)/, - reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, - nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, - strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, - br: /^ {2,}\n(?!\s*$)/, - del: noop, - text: /^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/; - -inline.link = replace(inline.link) - ('inside', inline._inside) - ('href', inline._href) - (); - -inline.reflink = replace(inline.reflink) - ('inside', inline._inside) - (); - -/** - * Normal Inline Grammar - */ - -inline.normal = merge({}, inline); - -/** - * Pedantic Inline Grammar - */ - -inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ -}); - -/** - * GFM Inline Grammar - */ - -inline.gfm = merge({}, inline.normal, { - escape: replace(inline.escape)('])', '~|])')(), - url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, - text: replace(inline.text) - (']|', '~]|') - ('|', '|https?://|') - () -}); - -/** - * GFM + Line Breaks Inline Grammar - */ - -inline.breaks = merge({}, inline.gfm, { - br: replace(inline.br)('{2,}', '*')(), - text: replace(inline.gfm.text)('{2,}', '*')() -}); - -/** - * Inline Lexer & Compiler - */ - -function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer; - this.renderer.options = this.options; - - if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); - } - - if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } else if (this.options.pedantic) { - this.rules = inline.pedantic; - } -} - -/** - * Expose Inline Rules - */ - -InlineLexer.rules = inline; - -/** - * Static Lexing/Compiling Method - */ - -InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); -}; - -/** - * Lexing/Compiling - */ - -InlineLexer.prototype.output = function(src) { - var out = '' - , link - , text - , href - , cap; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += cap[1]; - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = cap[1].charAt(6) === ':' - ? this.mangle(cap[1].substring(7)) - : this.mangle(cap[1]); - href = this.mangle('mailto:') + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - src = src.substring(cap[0].length); - text = escape(cap[1]); - href = text; - out += this.renderer.link(href, null, text); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^/i.test(cap[0])) { - this.inLink = false; - } - src = src.substring(cap[0].length); - out += this.options.sanitize - ? this.options.sanitizer - ? this.options.sanitizer(cap[0]) - : escape(cap[0]) - : cap[0] - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - src = src.substring(cap[0].length); - this.inLink = true; - out += this.outputLink(cap, { - href: cap[2], - title: cap[3] - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2], true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.text(escape(this.smartypants(cap[0]))); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; -}; - -/** - * Compile Link - */ - -InlineLexer.prototype.outputLink = function(cap, link) { - var href = escape(link.href) - , title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); -}; - -/** - * Smartypants Transformations - */ - -InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/---/g, '\u2014') - // en-dashes - .replace(/--/g, '\u2013') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); -}; - -/** - * Mangle Links - */ - -InlineLexer.prototype.mangle = function(text) { - if (!this.options.mangle) return text; - var out = '' - , l = text.length - , i = 0 - , ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; -}; - -/** - * Renderer - */ - -function Renderer(options) { - this.options = options || {}; -} - -Renderer.prototype.code = function(code, lang, escaped) { - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
'
-      + (escaped ? code : escape(code, true))
-      + '\n
'; - } - - return '
'
-    + (escaped ? code : escape(code, true))
-    + '\n
\n'; -}; - -Renderer.prototype.blockquote = function(quote) { - return '
\n' + quote + '
\n'; -}; - -Renderer.prototype.html = function(html) { - return html; -}; - -Renderer.prototype.heading = function(text, level, raw) { - return '' - + text - + '\n'; -}; - -Renderer.prototype.hr = function() { - return this.options.xhtml ? '
\n' : '
\n'; -}; - -Renderer.prototype.list = function(body, ordered) { - var type = ordered ? 'ol' : 'ul'; - return '<' + type + '>\n' + body + '\n'; -}; - -Renderer.prototype.listitem = function(text) { - return '
  • ' + text + '
  • \n'; -}; - -Renderer.prototype.paragraph = function(text) { - return '

    ' + text + '

    \n'; -}; - -Renderer.prototype.table = function(header, body) { - return '\n' - + '\n' - + header - + '\n' - + '\n' - + body - + '\n' - + '
    \n'; -}; - -Renderer.prototype.tablerow = function(content) { - return '\n' + content + '\n'; -}; - -Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' style="text-align:' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '\n'; -}; - -// span level renderer -Renderer.prototype.strong = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.em = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.codespan = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.br = function() { - return this.options.xhtml ? '
    ' : '
    '; -}; - -Renderer.prototype.del = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.link = function(href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) { - return ''; - } - } - var out = '
    '; - return out; -}; - -Renderer.prototype.image = function(href, title, text) { - var out = '' + text + '' : '>'; - return out; -}; - -Renderer.prototype.text = function(text) { - return text; -}; - -/** - * Parsing & Compiling - */ - -function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer; - this.renderer = this.options.renderer; - this.renderer.options = this.options; -} - -/** - * Static Parse Method - */ - -Parser.parse = function(src, options, renderer) { - var parser = new Parser(options, renderer); - return parser.parse(src); -}; - -/** - * Parse Loop - */ - -Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options, this.renderer); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; -}; - -/** - * Next Token - */ - -Parser.prototype.next = function() { - return this.token = this.tokens.pop(); -}; - -/** - * Preview Next Token - */ - -Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; -}; - -/** - * Parse Text Tokens - */ - -Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); -}; - -/** - * Parse Current Token - */ - -Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - this.token.text); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '' - , body = '' - , i - , row - , cell - , flags - , j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - flags = { header: true, align: this.token.align[i] }; - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - var body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - var body = '' - , ordered = this.token.ordered; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered); - } - case 'list_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'loose_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - var html = !this.token.pre && !this.options.pedantic - ? this.inline.output(this.token.text) - : this.token.text; - return this.renderer.html(html); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - } -}; - -/** - * Helpers - */ - -function escape(html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); -} - -function unescape(html) { - // explicitly match decimal, hex, and named HTML entities - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); -} - -function replace(regex, opt) { - regex = regex.source; - opt = opt || ''; - return function self(name, val) { - if (!name) return new RegExp(regex, opt); - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return self; - }; -} - -function noop() {} -noop.exec = noop; - -function merge(obj) { - var i = 1 - , target - , key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; -} - - -/** - * Marked - */ - -function marked(src, opt, callback) { - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight - , tokens - , pending - , i = 0; - - try { - tokens = Lexer.lex(src, opt) - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/chjj/marked.'; - if ((opt || marked.defaults).silent) { - return '

    An error occured:

    '
    -        + escape(e.message + '', true)
    -        + '
    '; - } - throw e; - } -} - -/** - * Options - */ - -marked.options = -marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; -}; - -marked.defaults = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - sanitizer: null, - mangle: true, - smartLists: false, - silent: false, - highlight: null, - langPrefix: 'lang-', - smartypants: false, - headerPrefix: '', - renderer: new Renderer, - xhtml: false -}; - -/** - * Expose - */ - -marked.Parser = Parser; -marked.parser = Parser.parse; - -marked.Renderer = Renderer; - -marked.Lexer = Lexer; -marked.lexer = Lexer.lex; - -marked.InlineLexer = InlineLexer; -marked.inlineLexer = InlineLexer.output; - -marked.parse = marked; - -if (typeof module !== 'undefined' && typeof exports === 'object') { - module.exports = marked; -} else if (typeof define === 'function' && define.amd) { - define(function() { return marked; }); -} else { - this.marked = marked; -} - -}).call(function() { - return this || (typeof window !== 'undefined' ? window : global); -}()); - -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("typescript"),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),function(){try{return require("RAML.XmlValidation")}catch(e){}}()):"function"==typeof define&&define.amd?define(["typescript","RAML.JsonValidation","RAML.XmlValidation"],t):"object"==typeof exports?exports.Parser=t(require("typescript"),function(){try{return require("RAML.JsonValidation")}catch(e){}}(),function(){try{return require("RAML.XmlValidation")}catch(e){}}()):(e.RAML=e.RAML||{},e.RAML.Parser=t(e.typescript,e["RAML.JsonValidation"],e["RAML.XmlValidation"]))}(this,function(__WEBPACK_EXTERNAL_MODULE_160__,__WEBPACK_EXTERNAL_MODULE_176__,__WEBPACK_EXTERNAL_MODULE_177__){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t){return m.load(e,t)}function i(e,t){return m.loadSync(e,t)}function a(e,t,n){return m.loadApi(e,t,n).getOrElse(null)}function o(e,t,n){return m.loadApi(e,t,n).getOrElse(null)}function s(e,t,n){return{fsResolver:{content:function(r){return r===(n||y.resolve("/","#local.raml")).replace(/\\/,"/")?e:t&&t.fsResolver?t.fsResolver.content(r):void 0},contentAsync:function(r){return r===(n||y.resolve("/","#local.raml")).replace(/\\/,"/")?Promise.resolve(e):t&&t.fsResolver?t.fsResolver.contentAsync(r):void 0}},httpResolver:t?t.httpResolver:null,rejectOnErrors:t?t.rejectOnErrors:!1,attributeDefaults:t?t.attributeDefaults:!0}}function u(e,t){var n=null;return t&&t.filePath&&(n=t.filePath),m.loadApi(n||"/#local.raml",[],s(e,t,n)).getOrElse(null)}function l(e,t){var n=null;return t&&t.filePath&&(n=t.filePath),m.loadApiAsync(n||"/#local.raml",[],s(e,t,n))}function p(e,t,n){return m.loadApiAsync(e,t,n)}function c(e,t,n){return m.loadRAMLAsync(e,t,n)}function f(e){return m.getLanguageElementByRuntimeType(e)}function d(e){return t.api10.isFragment(e)}function h(e){return t.api10.asFragment(e)}var m=n(8),y=n(15),v=n(23);t.api10=n(11),t.api08=n(12),t.load=r,t.loadSync=i,t.loadApiSync=a,t.loadRAMLSync=o,t.parseRAMLSync=u,t.parseRAML=l,t.loadApi=p,t.loadRAML=c,t.getLanguageElementByRuntimeType=f,t.isFragment=d,t.asFragment=h,t.hl=n(9),t.ll=n(10),t.search=n(13),t.stubs=n(1),t.utils=n(2),t.project=n(3),t.universeHelpers=n(14),t.ds=n(39),t.schema=n(4),t.universes=t.ds.universesInfo,t.parser=n(5),t.expander=n(6),t.wrapperHelper=n(7),"undefined"==typeof Promise&&"undefined"!=typeof window&&(window.Promise=v)},function(e,t,n){"use strict";function r(e,t,n,r){return void 0===n&&(n=null),S.createStubNode(e,t,n,r)}function i(e,t,n){return S.createStub(e,t,n)}function a(e,t,n){return S.createStub0(e,t,n)}function o(e,t){return S.createResourceStub(e,t)}function s(e,t){return S.createMethodStub(e,t)}function u(e,t){return S.createResponseStub(e,t)}function l(e,t){return S.createBodyStub(e,t)}function p(e,t){return S.createUriParameterStub(e,t)}function c(e,t){return S.createQueryParameterStub(e,t)}function f(e,t,n,r,i){return void 0===i&&(i=!1),new E.ASTPropImpl(e,t,n,r,i)}function d(e,t,n,r){return new E.ASTNodeImpl(e,t,n,r)}function h(e,t,n,r){return new b(e,t,n,r)}function m(e,t,n,r){return new _(e,t,n,r)}function y(e,t){return T.createMapping(e,t)}function v(){return T.createMap([])}function g(e,t){return S.createAttr(e,t)}var A=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},E=n(16),T=n(24),S=n(17);t.createStubNode=r,t.createStub=i,t.createStubNoParentPatch=a,t.createResourceStub=o,t.createMethodStub=s,t.createResponseStub=u,t.createBodyStub=l,t.createUriParameterStub=p,t.createQueryParameterStub=c,t.createASTPropImpl=f,t.createASTNodeImpl=d,t.createVirtualASTPropImpl=h,t.createVirtualNodeImpl=m;var b=function(e){function t(){e.apply(this,arguments)}return A(t,e),t.prototype.value=function(){return""},t}(E.ASTPropImpl),_=function(e){function t(){e.apply(this,arguments)}return A(t,e),t.prototype.value=function(){return""},t}(E.ASTNodeImpl);t.createMapping=y,t.createMap=v,t.createAttr=g},function(e,t,n){"use strict";function r(){return l.hasAsyncRequests()}function i(e){l.addLoadCallback(e)}function a(){return d.getTransformNames()}function o(e){return p.getFragmentDefenitionName(e)}function s(e,t,n){if(c.ReferenceType.isInstance(n.range())){var r=(n.range(),f.createNode(e));return new p.StructuredValue(r,t,n)}return e}function u(e){return(new h.UrlParameterNameValidator).parseUrl(e)}var l=n(25),p=n(16),c=n(39),f=n(24),d=n(27),h=n(28),m=n(29),y=n(18);t.hasAsyncRequests=r,t.addLoadCallback=i,t.getTransformerNames=a,t.updateType=function(e){var t=m.doDescrimination(e);null==t&&e.property()&&(t=e.property().range()),t&&e.patchType(t)},t.getFragmentDefenitionName=o,t.genStructuredValue=s,t.parseUrl=u;var v=function(){function e(e,t){this.node=e,this.targetUnitRoot=t}return e}();t.UnitLink=v;var g=function(){function e(e,t){this.errors=e,this.primaryUnitRoot=t}return e.prototype.accept=function(e){this.transformIssue(e),this.errors.push(e)},e.prototype.transformIssue=function(e){var t=this,n=null,r=this.findIssueTail(e);r.node&&(n=r.node.lowLevel().unit());var i=this.primaryUnitRoot.lowLevel().unit();if(n&&i&&n!=i){var a=this.findPathToNodeUnit(this.primaryUnitRoot,r.node);if(a&&a.length>0){var o=a.map(function(n){return t.convertConnectingNodeToError(n,e)});if(o&&o.length>0)for(var s=r,u=o.length-1;u>=0;u--){var l=o[u];s.extras=[],s.extras.push(l),s=l}}}},e.prototype.begin=function(){},e.prototype.end=function(){},e.prototype.acceptUnique=function(e){for(var t=0,n=this.errors;ts?e:T.basename(e),l=o.unit(u);n&&!i&&(i=null);var p;if(l)if(i&&i.length>0){var c=[];i.forEach(function(e){if(!e||0==e.trim().length)throw new Error("Extensions and overlays list should contain legal file paths")}),i.forEach(function(e){c.push(o.unit(e,T.isAbsolute(e)))}),c.forEach(function(e){return m(e,a)}),p=m(w.mergeAPIs(l,c,_.OverlayMergeMode.MERGE),a)}else p=m(l,a),p.setMergeMode(_.OverlayMergeMode.MERGE);if(!l)throw new Error("Can not resolve :"+e);if(a.rejectOnErrors&&p&&p.errors().filter(function(e){return!e.isWarning}).length)throw y(p);return p}function l(e,t,n){var r=p(e,t,n);return r.then(function(e){return e})}function p(e,t,n){return c(e,t,n).then(function(e){if(!e)return null;for(var r=Array.isArray(t),i=r?n:t,a=e;null!=a;){var o=a.wrapperNode();A(o,i);var s=a.getMaster();a=s?s.asElement():null}return e.wrapperNode()})}function c(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=h(e,a),s=e.indexOf("://"),u=-1!=s&&6>s?e:T.basename(e);return n&&!i&&(i=null),i&&0!=i.length?(i.forEach(function(e){if(!e||0==e.trim().length)throw new Error("Extensions and overlays list should contain legal file paths")}),d(o,u,a).then(function(e){var t=[];return i.forEach(function(e){t.push(d(o,e,a))}),Promise.all(t).then(function(t){var n=[];t.forEach(function(e){return n.push(e.lowLevel().unit())});var r=w.mergeAPIs(e.lowLevel().unit(),n,_.OverlayMergeMode.MERGE);return r}).then(function(e){return m(e,a)})})):d(o,u,a).then(function(e){return e.setMergeMode(_.OverlayMergeMode.MERGE),e})}function f(e){if(null==e)return null;var t=e.getAdapter(M.RAMLService).getDeclaringNode();return null==t?null:t.wrapperNode()}function d(e,t,n){return N.fetchIncludesAndMasterAsync(e,t).then(function(e){try{var t=m(e,n);return n.rejectOnErrors&&t&&t.errors().filter(function(e){return!e.isWarning}).length?Promise.reject(y(t)):t}catch(r){return Promise.reject(r)}})}function h(e,t){t=t||{};var n,r=t.fsResolver,i=t.httpResolver,a=t.reusedNode;if(a)n=a.lowLevel().unit().project(),n.deleteUnit(T.basename(e)),r&&n.setFSResolver(r),i&&n.setHTTPResolver(i);else{var o=T.dirname(e);n=new b.Project(o,r,i)}return n}function m(e,t,n){if(void 0===n&&(n=!1),t=t||{},!e)return null;var r=null,i=null;e.isRAMLUnit?r=e:(i=e,r=i.lowLevel().unit());var a=r.contents(),o=_.ramlFirstLine(a);if(!o)throw new Error("Invalid first line. A RAML document is expected to start with '#%RAML '.");var s,u,l=o[1];o[2];if("0.8"==l?u="RAML08":"1.0"==l&&(u="RAML10"),!u)throw new Error("Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'");if("RAML08"==u&&n)throw new Error("Extensions and overlays are not supported in RAML 0.8.");var p=O(u);p.type(s);return i||(i=_.fromUnit(r),t.reusedNode&&t.reusedNode.lowLevel().unit().absolutePath()==r.absolutePath()&&g(i,t.reusedNode)&&i.setReusedNode(t.reusedNode)),i}function y(e){var t=new Error("Api contains errors.");return t.parserErrors=_.toParserErrors(e.errors(),e),t}function v(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var r=O("RAML10"),i=r.type(I.Universe10.Api.name),a=new b.Project(e),o=[];return a.units().forEach(function(e){var r=e.ast();t&&(r=N.toChildCachingNode(r));var a=new E.ApiImpl(new _.ASTNodeImpl(r,null,i,null));n&&(a=w.expandTraitsAndResourceTypes(a)),o.push(a)}),o}function g(e,t){if(!t)return!1;for(var n=e.lowLevel().unit().contents(),r=t.lowLevel().unit().contents(),i=Math.min(n.length,r.length),a=-1,o=0;i>o;o++)if(n.charAt(o)!=r.charAt(o)){a=o;break}for(;a>0&&""==n.charAt(a).replace(/\s/,"");)a--;0>a&&n.length!=r.length&&(a=i);var s=P.deepFindNode(t,a,a+1);if(!s)return!0;if(s.lowLevel().unit().absolutePath()!=e.lowLevel().unit().absolutePath())return!0;var u=s.isElement()?s.asElement():s.parent();if(!u)return!0;var l=u.property();if(!l)return!0;if(L.isAnnotationsProperty(l)&&(u=u.parent()),!u)return!0;for(var p=u;p;){var c=p.definition();if(L.isResourceTypeType(c)||L.isTraitType(c))return!1;var f=p.property();if(!f)return!0;if(L.isTypeDeclarationDescendant(c)&&(L.isTypesProperty(f)||L.isAnnotationTypesProperty(f)))return!1;var d=f.range();if(L.isResourceTypeRefType(d)||L.isTraitRefType(d))return!1;p=p.parent()}return!0}function A(e,t){t=t||{},null!=t.attributeDefaults&&e?e.setAttributeDefaults(t.attributeDefaults):e&&e.setAttributeDefaults(!0)}var E=n(21),T=n(15),S=n(22),b=n(24),_=n(16),N=n(24),w=n(27),R=n(30),I=n(18),M=n(37),C=n(32),L=n(14),P=n(13),O=n(38);t.load=r,t.loadSync=i,t.loadApi=a,t.loadRAML=o,t.loadRAMLHL=s,t.loadApiAsync=l,t.loadRAMLAsync=p,t.loadRAMLAsyncHL=c,t.getLanguageElementByRuntimeType=f,t.toError=y,t.loadApis1=v},function(e,t,n){(function(e){"use strict";function n(e){return e.asElement&&e.getKind&&e.asAttr&&e.lowLevel}function r(){var t=e.ramlValidation;if(t){var n=t.nodeValidators;if(Array.isArray(n))return n}return[]}function i(){var t=e.ramlValidation;if(t){var n=t.astAnnotationValidators;if(Array.isArray(n))return n}return[]}!function(e){e[e.BASIC=0]="BASIC",e[e.NODE=1]="NODE",e[e.ATTRIBUTE=2]="ATTRIBUTE"}(t.NodeKind||(t.NodeKind={}));t.NodeKind;!function(e){e[e.RAML10=0]="RAML10",e[e.RAML08=1]="RAML08"}(t.RAMLVersion||(t.RAMLVersion={}));t.RAMLVersion;t.isParseResult=n,function(e){e[e.UNRESOLVED_REFERENCE=0]="UNRESOLVED_REFERENCE",e[e.YAML_ERROR=1]="YAML_ERROR",e[e.UNKNOWN_NODE=2]="UNKNOWN_NODE",e[e.MISSING_REQUIRED_PROPERTY=3]="MISSING_REQUIRED_PROPERTY",e[e.PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE=4]="PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE",e[e.KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT=5]="KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT",e[e.UNABLE_TO_RESOLVE_INCLUDE_FILE=6]="UNABLE_TO_RESOLVE_INCLUDE_FILE",e[e.INVALID_VALUE_SCHEMA=7]="INVALID_VALUE_SCHEMA",e[e.MISSED_CONTEXT_REQUIREMENT=8]="MISSED_CONTEXT_REQUIREMENT",e[e.NODE_HAS_VALUE=9]="NODE_HAS_VALUE",e[e.ONLY_OVERRIDE_ALLOWED=10]="ONLY_OVERRIDE_ALLOWED",e[e.ILLEGAL_PROPERTY_VALUE=11]="ILLEGAL_PROPERTY_VALUE",e[e.ILLEGAL_PROPERTY=12]="ILLEGAL_PROPERTY",e[e.INVALID_PROPERTY=13]="INVALID_PROPERTY"}(t.IssueCode||(t.IssueCode={}));t.IssueCode;t.getNodeValidationPlugins=r,t.getNodeAnnotationValidationPlugins=i}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t){return new E(v.CHANGE_VALUE,e,t,-1)}function i(e,t){return new E(v.CHANGE_VALUE,e,t.lowLevel(),-1)}function a(e,t){return new E(v.CHANGE_KEY,e,t,-1)}function o(e,t){return new E(v.REMOVE_CHILD,e,t,-1)}function s(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var i=new E(v.ADD_CHILD,e,t,-1);return i.insertionPoint=n,i.toSeq=r,i}function u(e,t){return new E(v.INIT_RAML_FILE,e,t,-1)}function l(e,t,n){if(d.isAbsolute(e)){var r=d.extname(t);".xsd"!=r&&(e=e.substr(1),t=p(n,d.basename(t)))}return c(e)||d.isAbsolute(e)?e:c(t)||d.isAbsolute(t)?p(d.dirname(t),e):p(d.dirname(p(n,t)),e)}function p(e,t){if(c(t))return t;var n;if(c(e)){var r=m.stringEndsWith(e,"/")?e:e+"/";n=h.resolve(r,t).replace(/\\/g,"/")}else n=d.resolve(e,t).replace(/\\/g,"/");return n}function c(e){return null==e?!1:m.stringStartsWith(e,"http://")||m.stringStartsWith(e,"https://")}function f(e){return e.start&&e.end&&e.unit&&e.key&&e.value&&e.children&&e.includePath}var d=n(15),h=n(40),m=n(33),y=function(){function e(){}return e}();t.ASTDelta=y,function(e){e[e.ADD_CHILD=0]="ADD_CHILD",e[e.REMOVE_CHILD=1]="REMOVE_CHILD",e[e.MOVE_CHILD=2]="MOVE_CHILD",e[e.CHANGE_KEY=3]="CHANGE_KEY",e[e.CHANGE_VALUE=4]="CHANGE_VALUE",e[e.INIT_RAML_FILE=5]="INIT_RAML_FILE"}(t.CommandKind||(t.CommandKind={}));var v=t.CommandKind,g=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.offset=e,this.replacementLength=t,this.text=n,this.unit=r,this.target=i}return e}();t.TextChangeCommand=g;var A=function(){function e(){this.commands=[]}return e}();t.CompositeCommand=A,function(e){e[e.NONE=0]="NONE",e[e.START=1]="START",e[e.END=2]="END",e[e.POINT=3]="POINT"}(t.InsertionPointType||(t.InsertionPointType={}));var E=(t.InsertionPointType,function(){function e(e,t,n,r){this.toSeq=!1,this.kind=e,this.target=t,this.value=n,this.position=r}return e}());t.ASTChangeCommand=E,t.setAttr=r,t.setAttrStructured=i,t.setKey=a,t.removeNode=o,t.insertNode=s,t.initRamlFile=u;var T=function(){function e(e,t){this.content=e,this.absPath=t}return e.prototype.position=function(e){var t=e;this.initMapping();for(var n=0;nt)return{line:n,column:t,position:e};t-=r}if(0==t)return{line:this.mapping.length-1,column:this.mapping[this.mapping.length-1],position:this.content.length};if(1==t)return{line:this.mapping.length-1,column:this.mapping[this.mapping.length-1]-1,position:e-1};throw new Error("Character position exceeds text length: "+e+" > + "+this.content.length+".\nUnit path: "+this.absPath)},e.prototype.initMapping=function(){if(null==this.mapping){if(null==this.content)throw new Error("Line Mapper has been given null content"+(null!=this.absPath?". Path: "+this.absPath:" and null path."));this.mapping=[];for(var e=0,t=this.content.length,n=0;t>n;n++)"\r"==this.content.charAt(n)?t-1>n&&"\n"==this.content.charAt(n+1)?(this.mapping.push(n-e+2),e=n+2,n++):(this.mapping.push(n-e+1),e=n+1):"\n"==this.content.charAt(n)&&(this.mapping.push(n-e+1),e=n+1);this.mapping.push(t-e)}},e.prototype.toPosition=function(e,t){var n=t;this.initMapping();for(var r=e;rn){for(var a=n,o=0;r>o;o++)a+=this.mapping[o];return{line:r,column:n,position:a}}n-=i}return{line:r,column:n,position:this.content.length}},e}();t.LineMapperImpl=T,t.buildPath=l,t.toAbsolutePath=p,t.isWebPath=c,t.isLowLevelNode=f},function(e,t,n){"use strict";function r(e){return"Api"==e.kind()&&"RAML10"==e.RAMLVersion()}function i(e){return"LibraryBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function a(e){return"Annotable"==e.kind()&&"RAML10"==e.RAMLVersion()}function o(e){return"AnnotationRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function s(e){return"Reference"==e.kind()&&"RAML10"==e.RAMLVersion()}function u(e){return"ValueType"==e.kind()&&"RAML10"==e.RAMLVersion()}function l(e){return"StringType"==e.kind()&&"RAML10"==e.RAMLVersion()}function p(e){return"UriTemplate"==e.kind()&&"RAML10"==e.RAMLVersion()}function c(e){return"RelativeUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function f(e){return"FullUriTemplateString"==e.kind()&&"RAML10"==e.RAMLVersion()}function d(e){return"StatusCodeString"==e.kind()&&"RAML10"==e.RAMLVersion()}function h(e){return"FixedUriString"==e.kind()&&"RAML10"==e.RAMLVersion()}function m(e){return"ContentType"==e.kind()&&"RAML10"==e.RAMLVersion()}function y(e){return"MarkdownString"==e.kind()&&"RAML10"==e.RAMLVersion()}function v(e){return"SchemaString"==e.kind()&&"RAML10"==e.RAMLVersion()}function g(e){return"MimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function A(e){return"AnyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function E(e){return"NumberType"==e.kind()&&"RAML10"==e.RAMLVersion()}function T(e){return"IntegerType"==e.kind()&&"RAML10"==e.RAMLVersion()}function S(e){return"NullType"==e.kind()&&"RAML10"==e.RAMLVersion()}function b(e){return"TimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function _(e){return"DateOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function N(e){return"DateTimeOnlyType"==e.kind()&&"RAML10"==e.RAMLVersion()}function w(e){return"DateTimeType"==e.kind()&&"RAML10"==e.RAMLVersion()}function R(e){return"FileType"==e.kind()&&"RAML10"==e.RAMLVersion()}function I(e){return"BooleanType"==e.kind()&&"RAML10"==e.RAMLVersion()}function M(e){return"AnnotationTarget"==e.kind()&&"RAML10"==e.RAMLVersion()}function C(e){return"TraitRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function L(e){return"Trait"==e.kind()&&"RAML10"==e.RAMLVersion()}function P(e){return"MethodBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function O(e){return"Operation"==e.kind()&&"RAML10"==e.RAMLVersion()}function D(e){return"TypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function x(e){return"ModelLocation"==e.kind()&&"RAML10"==e.RAMLVersion()}function U(e){return"LocationKind"==e.kind()&&"RAML10"==e.RAMLVersion()}function k(e){return"ExampleSpec"==e.kind()&&"RAML10"==e.RAMLVersion()}function F(e){return"UsesDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function B(e){return"XMLFacetInfo"==e.kind()&&"RAML10"==e.RAMLVersion()}function K(e){return"ArrayTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function V(e){return"UnionTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function j(e){return"ObjectTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function W(e){return"StringTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function q(e){return"BooleanTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function Y(e){return"NumberTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function H(e){return"IntegerTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function $(e){return"DateOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function G(e){return"TimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function X(e){return"DateTimeOnlyTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function z(e){return"DateTimeTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function J(e){return"FileTypeDeclaration"==e.kind()&&"RAML10"==e.RAMLVersion()}function Q(e){return"Response"==e.kind()&&"RAML10"==e.RAMLVersion()}function Z(e){return"SecuritySchemePart"==e.kind()&&"RAML10"==e.RAMLVersion()}function ee(e){return"SecuritySchemeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function te(e){return"AbstractSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ne(e){return"SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function re(e){return"OAuth1SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ie(e){return"OAuth2SecuritySchemeSettings"==e.kind()&&"RAML10"==e.RAMLVersion()}function ae(e){return"OAuth2SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function oe(e){return"OAuth1SecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function se(e){return"PassThroughSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ue(e){return"BasicSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function le(e){return"DigestSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function pe(e){return"CustomSecurityScheme"==e.kind()&&"RAML10"==e.RAMLVersion()}function ce(e){return"Method"==e.kind()&&"RAML10"==e.RAMLVersion()}function fe(e){return"ResourceTypeRef"==e.kind()&&"RAML10"==e.RAMLVersion()}function de(e){return"ResourceType"==e.kind()&&"RAML10"==e.RAMLVersion()}function he(e){return"ResourceBase"==e.kind()&&"RAML10"==e.RAMLVersion()}function me(e){return"Resource"==e.kind()&&"RAML10"==e.RAMLVersion()}function ye(e){return"DocumentationItem"==e.kind()&&"RAML10"==e.RAMLVersion()}function ve(e){return"Library"==e.kind()&&"RAML10"==e.RAMLVersion()}function ge(e){return"Overlay"==e.kind()&&"RAML10"==e.RAMLVersion()}function Ae(e){return"Extension"==e.kind()&&"RAML10"==e.RAMLVersion()}function Ee(e){return null==e.highLevel().parent()}function Te(e){return Ee(e)?e:null}t.isApi=r,t.isLibraryBase=i,t.isAnnotable=a,t.isAnnotationRef=o,t.isReference=s,t.isValueType=u,t.isStringType=l,t.isUriTemplate=p,t.isRelativeUriString=c,t.isFullUriTemplateString=f,t.isStatusCodeString=d,t.isFixedUriString=h,t.isContentType=m,t.isMarkdownString=y,t.isSchemaString=v,t.isMimeType=g,t.isAnyType=A,t.isNumberType=E,t.isIntegerType=T,t.isNullType=S,t.isTimeOnlyType=b,t.isDateOnlyType=_,t.isDateTimeOnlyType=N,t.isDateTimeType=w,t.isFileType=R,t.isBooleanType=I,t.isAnnotationTarget=M,t.isTraitRef=C,t.isTrait=L,t.isMethodBase=P,t.isOperation=O,t.isTypeDeclaration=D,t.isModelLocation=x,t.isLocationKind=U,t.isExampleSpec=k,t.isUsesDeclaration=F,t.isXMLFacetInfo=B,t.isArrayTypeDeclaration=K,t.isUnionTypeDeclaration=V,t.isObjectTypeDeclaration=j,t.isStringTypeDeclaration=W,t.isBooleanTypeDeclaration=q,t.isNumberTypeDeclaration=Y,t.isIntegerTypeDeclaration=H,t.isDateOnlyTypeDeclaration=$,t.isTimeOnlyTypeDeclaration=G,t.isDateTimeOnlyTypeDeclaration=X,t.isDateTimeTypeDeclaration=z,t.isFileTypeDeclaration=J,t.isResponse=Q,t.isSecuritySchemePart=Z,t.isSecuritySchemeRef=ee,t.isAbstractSecurityScheme=te,t.isSecuritySchemeSettings=ne,t.isOAuth1SecuritySchemeSettings=re,t.isOAuth2SecuritySchemeSettings=ie,t.isOAuth2SecurityScheme=ae,t.isOAuth1SecurityScheme=oe,t.isPassThroughSecurityScheme=se,t.isBasicSecurityScheme=ue,t.isDigestSecurityScheme=le,t.isCustomSecurityScheme=pe,t.isMethod=ce,t.isResourceTypeRef=fe,t.isResourceType=de,t.isResourceBase=he,t.isResource=me,t.isDocumentationItem=ye,t.isLibrary=ve,t.isOverlay=ge,t.isExtension=Ae,t.isFragment=Ee,t.asFragment=Te},function(e,t,n){"use strict";function r(e){return"Api"==e.kind()&&"RAML08"==e.RAMLVersion()}function i(e){return"FullUriTemplateString"==e.kind()&&"RAML08"==e.RAMLVersion()}function a(e){return"UriTemplate"==e.kind()&&"RAML08"==e.RAMLVersion()}function o(e){return"StringType"==e.kind()&&"RAML08"==e.RAMLVersion()}function s(e){return"ValueType"==e.kind()&&"RAML08"==e.RAMLVersion()}function u(e){return"AnyType"==e.kind()&&"RAML08"==e.RAMLVersion()}function l(e){return"NumberType"==e.kind()&&"RAML08"==e.RAMLVersion()}function p(e){return"BooleanType"==e.kind()&&"RAML08"==e.RAMLVersion()}function c(e){return"Reference"==e.kind()&&"RAML08"==e.RAMLVersion()}function f(e){return"ResourceTypeRef"==e.kind()&&"RAML08"==e.RAMLVersion()}function d(e){return"ResourceType"==e.kind()&&"RAML08"==e.RAMLVersion()}function h(e){return"Method"==e.kind()&&"RAML08"==e.RAMLVersion()}function m(e){return"MethodBase"==e.kind()&&"RAML08"==e.RAMLVersion()}function y(e){return"Response"==e.kind()&&"RAML08"==e.RAMLVersion()}function v(e){return"StatusCodeString"==e.kind()&&"RAML08"==e.RAMLVersion()}function g(e){return"Parameter"==e.kind()&&"RAML08"==e.RAMLVersion()}function A(e){return"ParameterLocation"==e.kind()&&"RAML08"==e.RAMLVersion()}function E(e){return"MarkdownString"==e.kind()&&"RAML08"==e.RAMLVersion()}function T(e){return"StringTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function S(e){return"BooleanTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function b(e){return"NumberTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function _(e){return"IntegerTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function N(e){return"DateTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function w(e){return"FileTypeDeclaration"==e.kind()&&"RAML08"==e.RAMLVersion()}function R(e){return"BodyLike"==e.kind()&&"RAML08"==e.RAMLVersion()}function I(e){return"SchemaString"==e.kind()&&"RAML08"==e.RAMLVersion()}function M(e){return"JSonSchemaString"==e.kind()&&"RAML08"==e.RAMLVersion()}function C(e){return"XMLSchemaString"==e.kind()&&"RAML08"==e.RAMLVersion()}function L(e){return"ExampleString"==e.kind()&&"RAML08"==e.RAMLVersion()}function P(e){return"JSONExample"==e.kind()&&"RAML08"==e.RAMLVersion()}function O(e){return"XMLExample"==e.kind()&&"RAML08"==e.RAMLVersion()}function D(e){return"XMLBody"==e.kind()&&"RAML08"==e.RAMLVersion()}function x(e){return"JSONBody"==e.kind()&&"RAML08"==e.RAMLVersion()}function U(e){return"SecuritySchemeRef"==e.kind()&&"RAML08"==e.RAMLVersion()}function k(e){return"AbstractSecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function F(e){return"SecuritySchemePart"==e.kind()&&"RAML08"==e.RAMLVersion()}function B(e){return"TraitRef"==e.kind()&&"RAML08"==e.RAMLVersion()}function K(e){return"Trait"==e.kind()&&"RAML08"==e.RAMLVersion()}function V(e){return"SecuritySchemeSettings"==e.kind()&&"RAML08"==e.RAMLVersion()}function j(e){return"OAuth1SecuritySchemeSettings"==e.kind()&&"RAML08"==e.RAMLVersion()}function W(e){return"FixedUri"==e.kind()&&"RAML08"==e.RAMLVersion()}function q(e){return"OAuth2SecuritySchemeSettings"==e.kind()&&"RAML08"==e.RAMLVersion()}function Y(e){return"OAuth2SecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function H(e){return"OAuth1SecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function $(e){return"BasicSecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function G(e){return"DigestSecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function X(e){return"CustomSecurityScheme"==e.kind()&&"RAML08"==e.RAMLVersion()}function z(e){return"MimeType"==e.kind()&&"RAML08"==e.RAMLVersion()}function J(e){return"RelativeUriString"==e.kind()&&"RAML08"==e.RAMLVersion()}function Q(e){return"GlobalSchema"==e.kind()&&"RAML08"==e.RAMLVersion()}function Z(e){return"RAMLSimpleElement"==e.kind()&&"RAML08"==e.RAMLVersion()}function ee(e){return"DocumentationItem"==e.kind()&&"RAML08"==e.RAMLVersion()}function te(e){return"Resource"==e.kind()&&"RAML08"==e.RAMLVersion()}t.isApi=r,t.isFullUriTemplateString=i,t.isUriTemplate=a,t.isStringType=o,t.isValueType=s,t.isAnyType=u,t.isNumberType=l,t.isBooleanType=p,t.isReference=c,t.isResourceTypeRef=f,t.isResourceType=d,t.isMethod=h,t.isMethodBase=m,t.isResponse=y,t.isStatusCodeString=v,t.isParameter=g,t.isParameterLocation=A,t.isMarkdownString=E,t.isStringTypeDeclaration=T,t.isBooleanTypeDeclaration=S,t.isNumberTypeDeclaration=b,t.isIntegerTypeDeclaration=_,t.isDateTypeDeclaration=N,t.isFileTypeDeclaration=w,t.isBodyLike=R,t.isSchemaString=I,t.isJSonSchemaString=M,t.isXMLSchemaString=C,t.isExampleString=L,t.isJSONExample=P,t.isXMLExample=O,t.isXMLBody=D,t.isJSONBody=x,t.isSecuritySchemeRef=U,t.isAbstractSecurityScheme=k,t.isSecuritySchemePart=F,t.isTraitRef=B,t.isTrait=K,t.isSecuritySchemeSettings=V,t.isOAuth1SecuritySchemeSettings=j,t.isFixedUri=W,t.isOAuth2SecuritySchemeSettings=q,t.isOAuth2SecurityScheme=Y,t.isOAuth1SecurityScheme=H,t.isBasicSecurityScheme=$,t.isDigestSecurityScheme=G,t.isCustomSecurityScheme=X,t.isMimeType=z,t.isRelativeUriString=J,t.isGlobalSchema=Q,t.isRAMLSimpleElement=Z,t.isDocumentationItem=ee,t.isResource=te},function(e,t,n){"use strict";function r(e,t,n){return _.findDeclaration(e,t,n)}function i(e,t){return _.findUsages(e,t)}function a(e){return _.globalDeclarations(e)}function o(e,t,n){_.refFinder(e,t,n)}function s(e,t){return _.findDeclarationByNode(e,t)}function u(e,t){return _.determineCompletionKind(e,t)}function l(e,t){return _.enumValues(e,t)}function p(e,t){return N.qName(e,t)}function c(e,t){return _.subTypesWithLocals(e,t)}function f(e,t){return _.nodesDeclaringType(e,t)}function d(e){return _.isExampleNodeContent(e)}function h(e){return _.findExampleContentType(e)}function m(e,t){return _.parseDocumentationContent(e,t)}function y(e,t){return _.parseStructuredExample(e,t)}function v(e){return _.isExampleNode(e)}function g(e,t){return _.referenceTargets(e,t)}function A(e){return w.getNominalTypeSource(e)}function E(e,t){ -return _.findAllSubTypes(e,t)}function T(e){return _.declRoot(e)}function S(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!0),_.deepFindNode(e,t,n,r,i)}function b(e){return _.allChildren(e)}var _=n(35),N=n(16),w=n(36);t.findDeclaration=r,t.findUsages=i,t.globalDeclarations=a,t.refFinder=o,t.findDeclarationByNode=s,function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(t.LocationKind||(t.LocationKind={}));t.LocationKind;t.determineCompletionKind=u,t.enumValues=l,t.qName=p,t.subTypesWithLocals=c,t.nodesDeclaringType=f,t.isExampleNodeContent=d,t.findExampleContentType=h,t.parseDocumentationContent=m,t.parseStructuredExample=y,t.isExampleNode=v,t.referenceTargets=g,t.getNominalTypeSource=A,t.findAllSubTypes=E,t.declRoot=T,t.deepFindNode=S,t.allChildren=b},function(e,t,n){"use strict";function r(e){return e?e.nameId()===$e.Universe10.Api.properties.documentation.name||e.nameId()===$e.Universe08.Api.properties.documentation.name:!1}function i(e){return e===$e.Universe10.Trait.properties.usage.name||e===$e.Universe08.Trait.properties.usage.name||e===$e.Universe10.ResourceType.properties.usage.name||e===$e.Universe08.ResourceType.properties.usage.name||e===$e.Universe10.Library.properties.usage.name||e===$e.Universe10.Overlay.properties.usage.name||e===$e.Universe10.Extension.properties.usage.name}function a(e){return e?i(e.nameId()):!1}function o(e){return e?e.nameId()==$e.Universe10.Overlay.properties["extends"].name||e.nameId()==$e.Universe10.Extension.properties["extends"].name:!1}function s(e){return e===$e.Universe10.TypeDeclaration.properties.description.name||"description"===e}function u(e){return e?s(e.nameId()):!1}function l(e){return e===$e.Universe10.TypeDeclaration.properties.required.name||e===$e.Universe08.Parameter.properties.required.name||"required"===e}function p(e){return e===$e.Universe10.TypeDeclaration.properties.displayName.name||"displayName"===e}function c(e){return e?p(e.nameId()):!1}function f(e){return e?l(e.nameId()):!1}function d(e){return e===$e.Universe10.Api.properties.title.name||e===$e.Universe08.Api.properties.title.name||e===$e.Universe10.DocumentationItem.properties.title.name||e===$e.Universe08.DocumentationItem.properties.title.name||e===$e.Universe10.Overlay.properties.title.name||e===$e.Universe10.Extension.properties.title.name}function h(e){return e?d(e.nameId()):!1}function m(e){return e?y(e.nameId()):!1}function y(e){return e===$e.Universe08.MethodBase.properties.headers.name||e===$e.Universe08.Response.properties.headers.name||e===$e.Universe08.SecuritySchemePart.properties.headers.name||e===$e.Universe10.MethodBase.properties.headers.name||e===$e.Universe10.Response.properties.headers.name}function v(e){return e?g(e.nameId()):!1}function g(e){return e===$e.Universe08.BodyLike.properties.formParameters.name}function A(e){return e?E(e.nameId()):!1}function E(e){return e===$e.Universe08.MethodBase.properties.queryParameters.name||e===$e.Universe08.SecuritySchemePart.properties.queryParameters.name||e===$e.Universe10.MethodBase.properties.queryParameters.name}function T(e){return e?e.nameId()===$e.Universe10.Api.properties.annotations.name||e.nameId()===$e.Universe10.TypeDeclaration.properties.annotations.name||e.nameId()===$e.Universe10.Response.properties.annotations.name:!1}function S(e){return e?e.nameId()===$e.Universe10.AnnotationRef.properties.annotation.name:!1}function b(e){return e?e.nameId()===$e.Universe10.MethodBase.properties.is.name||e.nameId()===$e.Universe08.Method.properties.is.name||e.nameId()===$e.Universe10.ResourceBase.properties.is.name||e.nameId()===$e.Universe08.ResourceType.properties.is.name||e.nameId()===$e.Universe08.Resource.properties.is.name:!1}function _(e){return e?e.nameId()===$e.Universe10.Api.properties.securedBy.name||e.nameId()===$e.Universe08.Api.properties.securedBy.name||e.nameId()===$e.Universe10.MethodBase.properties.securedBy.name||e.nameId()===$e.Universe08.MethodBase.properties.securedBy.name||e.nameId()===$e.Universe08.ResourceType.properties.securedBy.name||e.nameId()===$e.Universe08.Resource.properties.securedBy.name||e.nameId()===$e.Universe10.ResourceBase.properties.securedBy.name:!1}function N(e){return e?e.nameId()===$e.Universe10.LibraryBase.properties.securitySchemes.name||e.nameId()===$e.Universe08.Api.properties.securitySchemes.name:!1}function w(e){return e?e.nameId()===$e.Universe10.SecuritySchemeRef.properties.securityScheme.name||e.nameId()===$e.Universe08.SecuritySchemeRef.properties.securityScheme.name:!1}function R(e){return I(e)||k(e)}function I(e){return e?e.nameId()===$e.Universe10.AbstractSecurityScheme.properties.type.name||e.nameId()===$e.Universe08.AbstractSecurityScheme.properties.type.name||e.nameId()===$e.Universe08.ResourceType.properties.type.name||e.nameId()===$e.Universe08.Resource.properties.type.name||e.nameId()===$e.Universe08.Parameter.properties.type.name||e.nameId()===$e.Universe10.ResourceBase.properties.type.name||e.nameId()===$e.Universe10.TypeDeclaration.properties.type.name:!1}function M(e){return e?e.nameId()===$e.Universe10.ArrayTypeDeclaration.properties.items.name:!1}function C(e){return e?e.nameId()===$e.Universe10.ArrayTypeDeclaration.properties.structuredItems.name:!1}function L(e){return e?e.nameId()===$e.Universe10.ObjectTypeDeclaration.properties.properties.name:!1}function P(e){return e?e.nameId()===$e.Universe10.MethodBase.properties.responses.name||e.nameId()===$e.Universe08.MethodBase.properties.responses.name:!1}function O(e){return e?e.nameId()===$e.Universe10.Api.properties.protocols.name||e.nameId()===$e.Universe08.Api.properties.protocols.name||e.nameId()===$e.Universe10.MethodBase.properties.protocols.name:!1}function D(e){return e?e.nameId()===$e.Universe10.TypeDeclaration.properties.name.name||e.nameId()===$e.Universe10.TypeDeclaration.properties.name.name||e.nameId()===$e.Universe08.AbstractSecurityScheme.properties.name.name||e.nameId()===$e.Universe10.AbstractSecurityScheme.properties.name.name||e.nameId()===$e.Universe08.Trait.properties.name.name||e.nameId()===$e.Universe10.Trait.properties.name.name||"name"===e.nameId():!1}function x(e){return e?e.nameId()===$e.Universe10.MethodBase.properties.body.name||e.nameId()===$e.Universe08.MethodBase.properties.body.name||e.nameId()===$e.Universe10.Response.properties.body.name||e.nameId()===$e.Universe08.Response.properties.body.name:!1}function U(e){return e?e.nameId()===$e.Universe10.TypeDeclaration.properties["default"].name||e.nameId()===$e.Universe08.Parameter.properties["default"].name:!1}function k(e){return e?e.nameId()===$e.Universe08.BodyLike.properties.schema.name||e.nameId()===$e.Universe08.XMLBody.properties.schema.name||e.nameId()===$e.Universe08.JSONBody.properties.schema.name||e.nameId()===$e.Universe10.TypeDeclaration.properties.schema.name:!1}function F(e){return e?e.nameId()===$e.Universe08.Api.properties.traits.name||e.nameId()===$e.Universe10.LibraryBase.properties.traits.name:!1}function B(e){return e?e.nameId()===$e.Universe08.TraitRef.properties.trait.name||e.nameId()===$e.Universe10.TraitRef.properties.trait.name:!1}function K(e){return e?e.nameId()===$e.Universe08.Api.properties.resourceTypes.name||e.nameId()===$e.Universe10.LibraryBase.properties.resourceTypes.name:!1}function V(e){return e?e.nameId()===$e.Universe08.ResourceTypeRef.properties.resourceType.name||e.nameId()===$e.Universe10.ResourceTypeRef.properties.resourceType.name:!1}function j(e){return e?e.nameId()===$e.Universe10.TypeDeclaration.properties.facets.name:!1}function W(e){return e?e.nameId()===$e.Universe08.Api.properties.schemas.name||e.nameId()===$e.Universe10.LibraryBase.properties.schemas.name:!1}function q(e){return e?e.nameId()===$e.Universe10.Api.properties.resources.name||e.nameId()===$e.Universe08.Api.properties.resources.name||e.nameId()===$e.Universe10.Resource.properties.resources.name||e.nameId()===$e.Universe08.Resource.properties.resources.name:!1}function Y(e){return e?e.nameId()===$e.Universe10.ResourceBase.properties.methods.name||e.nameId()===$e.Universe08.Resource.properties.methods.name||e.nameId()===$e.Universe08.ResourceType.properties.methods.name:!1}function H(e){return e&&e.nameId()===$e.Universe10.LibraryBase.properties.types.name}function $(e){return e?e.nameId()===$e.Universe10.TypeDeclaration.properties.example.name||"example"===e.nameId():!1}function G(e){return e?e.nameId()===$e.Universe10.StringTypeDeclaration.properties["enum"].name||e.nameId()===$e.Universe10.NumberTypeDeclaration.properties["enum"].name||e.nameId()===$e.Universe08.StringTypeDeclaration.properties["enum"].name:!1}function X(e){return e?e.nameId()===$e.Universe10.TypeDeclaration.properties.example.name||e.nameId()===$e.Universe10.TypeDeclaration.properties.examples.name:!1}function z(e){return e?e.nameId()===$e.Universe08.GlobalSchema.properties.value.name:!1}function J(e){return e?e.nameId()===$e.Universe08.Api.properties.uriParameters.name||e.nameId()===$e.Universe08.ResourceType.properties.uriParameters.name||e.nameId()===$e.Universe08.Resource.properties.uriParameters.name||e.nameId()===$e.Universe10.ResourceBase.properties.uriParameters.name:!1}function Q(e){return e?e.nameId()===$e.Universe08.Resource.properties.baseUriParameters.name||e.nameId()===$e.Universe08.Api.properties.baseUriParameters.name||e.nameId()===$e.Universe10.Api.properties.baseUriParameters.name:!1}function Z(e){return e?e.nameId()===$e.Universe08.Api.properties.RAMLVersion.name||e.nameId()===$e.Universe10.Api.properties.RAMLVersion.name:!1}function ee(e){return e?e.nameId()===$e.Universe10.FragmentDeclaration.properties.uses.name:!1}function te(e){return e?e.nameId()===$e.Universe10.LibraryBase.properties.annotationTypes.name:!1}function ne(e){return e.key()==$e.Universe10.Method||e.key()==$e.Universe08.Method}function re(e){return e.key()==$e.Universe10.Api||e.key()==$e.Universe08.Api}function ie(e){return e.key()==$e.Universe10.BooleanType||e.key()==$e.Universe08.BooleanType}function ae(e){return e.key()==$e.Universe10.MarkdownString||e.key()==$e.Universe08.MarkdownString}function oe(e){return e.key()==$e.Universe10.Resource||e.key()==$e.Universe08.Resource}function se(e){return e.key()==$e.Universe10.Trait||e.key()==$e.Universe08.Trait}function ue(e){return e.key()==$e.Universe10.TraitRef||e.key()==$e.Universe08.TraitRef}function le(e){return e.key()==$e.Universe10.ResourceTypeRef||e.key()==$e.Universe08.ResourceTypeRef}function pe(e){return e.key()==$e.Universe08.GlobalSchema}function ce(e){return e.key()==$e.Universe10.AbstractSecurityScheme||e.key()==$e.Universe08.AbstractSecurityScheme}function fe(e){return e.isAssignableFrom($e.Universe10.AbstractSecurityScheme.name)}function de(e){return e.key()==$e.Universe10.SecuritySchemeRef||e.key()==$e.Universe08.SecuritySchemeRef}function he(e){return e.key()==$e.Universe10.TypeDeclaration}function me(e){return e.key()==$e.Universe10.Response||e.key()==$e.Universe08.Response}function ye(e){return e.key()==$e.Universe08.BodyLike}function ve(e){return e.key()==$e.Universe10.Overlay}function ge(e){return!1}function Ae(e){return e.key()==$e.Universe10.ResourceType||e.key()==$e.Universe08.ResourceType}function Ee(e){return e.key()==$e.Universe10.SchemaString||e.key()==$e.Universe08.SchemaString}function Te(e){return e.key()==$e.Universe10.MethodBase||e.key()==$e.Universe08.MethodBase}function Se(e){return e.key()==$e.Universe10.Library}function be(e){return e.key()==$e.Universe10.StringType||e.key()==$e.Universe08.StringType}function _e(e){return e.key()==$e.Universe10.AnyType||e.key()==$e.Universe08.AnyType}function Ne(e){return e.key()==$e.Universe10.ExampleSpec}function we(e){return e.key()==$e.Universe10.Extension}function Re(e){return e.isAssignableFrom($e.Universe10.TypeDeclaration.name)}function Ie(e){return e.key()==$e.Universe10.DocumentationItem||e.key()==$e.Universe08.DocumentationItem}function Me(e){return e.isAssignableFrom($e.Universe10.AnnotationRef.name)}function Ce(e){return e.isAssignableFrom($e.Universe10.Api.name)||e.isAssignableFrom($e.Universe08.Api.name)}function Le(e){return e.isAssignableFrom($e.Universe10.LibraryBase.name)}function Pe(e){return e.isAssignableFrom($e.Universe10.ResourceBase.name)||e.isAssignableFrom($e.Universe08.Resource.name)}function Oe(e){return e.isAssignableFrom($e.Universe10.ObjectTypeDeclaration.name)}function De(e){return e.isAssignableFrom($e.Universe10.ArrayTypeDeclaration.name)}function xe(e){return e.isAssignableFrom($e.Universe10.TypeDeclaration.name)}function Ue(e){return e.isAssignableFrom($e.Universe10.StringTypeDeclaration.name)}function ke(e){return e.isAssignableFrom($e.Universe10.TypeDeclaration.name)}function Fe(e){return e.isAssignableFrom($e.Universe10.MethodBase.name)||e.isAssignableFrom($e.Universe08.MethodBase.name)}function Be(e){return e.key()==$e.Universe10.SecuritySchemePart||e.key()==$e.Universe08.SecuritySchemePart}function Ke(e){return e.nameId()===$e.Universe08.Api.properties.mediaType.name||e.nameId()===$e.Universe10.Api.properties.mediaType.name}function Ve(e){return"RAML08"==e.universe().version()}function je(e){return"RAML10"==e.universe().version()}function We(e){return Ve(e.definition())}function qe(e){return Ve(e.definition())}function Ye(e){return je(e.definition())}function He(e){return je(e.definition())}var $e=n(18);t.isDocumentationProperty=r,t.isUsagePropertyName=i,t.isUsageProperty=a,t.isMasterRefProperty=o,t.isDescriptionPropertyName=s,t.isDescriptionProperty=u,t.isRequiredPropertyName=l,t.isDisplayNamePropertyName=p,t.isDisplayNameProperty=c,t.isRequiredProperty=f,t.isTitlePropertyName=d,t.isTitleProperty=h,t.isHeadersProperty=m,t.isHeadersPropertyName=y,t.isFormParametersProperty=v,t.isFormParametersPropertyName=g,t.isQueryParametersProperty=A,t.isQueryParametersPropertyName=E,t.isAnnotationsProperty=T,t.isAnnotationProperty=S,t.isIsProperty=b,t.isSecuredByProperty=_,t.isSecuritySchemesProperty=N,t.isSecuritySchemeProperty=w,t.isTypeOrSchemaProperty=R,t.isTypeProperty=I,t.isItemsProperty=M,t.isStructuredItemsProperty=C,t.isPropertiesProperty=L,t.isResponsesProperty=P,t.isProtocolsProperty=O,t.isNameProperty=D,t.isBodyProperty=x,t.isDefaultValue=U,t.isSchemaProperty=k,t.isTraitsProperty=F,t.isTraitProperty=B,t.isResourceTypesProperty=K,t.isResourceTypeProperty=V,t.isFacetsProperty=j,t.isSchemasProperty=W,t.isResourcesProperty=q,t.isMethodsProperty=Y,t.isTypesProperty=H,t.isExampleProperty=$,t.isEnumProperty=G,t.isExamplesProperty=X,t.isValueProperty=z,t.isUriParametersProperty=J,t.isBaseUriParametersProperty=Q,t.isRAMLVersionProperty=Z,t.isUsesProperty=ee,t.isAnnotationTypesProperty=te,t.isMethodType=ne,t.isApiType=re,t.isBooleanTypeType=ie,t.isMarkdownStringType=ae,t.isResourceType=oe,t.isTraitType=se,t.isTraitRefType=ue,t.isResourceTypeRefType=le,t.isGlobalSchemaType=pe,t.isSecuritySchemaType=ce,t.isSecuritySchemaTypeDescendant=fe,t.isSecuritySchemeRefType=de,t.isTypeDeclarationType=he,t.isResponseType=me,t.isBodyLikeType=ye,t.isOverlayType=ve,t.isAnnotationTypeType=ge,t.isResourceTypeType=Ae,t.isSchemaStringType=Ee,t.isMethodBaseType=Te,t.isLibraryType=Se,t.isStringTypeType=be,t.isAnyTypeType=_e,t.isExampleSpecType=Ne,t.isExtensionType=we,t.isTypeDeclarationTypeOrDescendant=Re,t.isDocumentationType=Ie,t.isAnnotationRefTypeOrDescendant=Me,t.isApiSibling=Ce,t.isLibraryBaseSibling=Le,t.isResourceBaseSibling=Pe,t.isObjectTypeDeclarationSibling=Oe,t.isArrayTypeDeclarationSibling=De,t.isTypeDeclarationDescendant=xe,t.isStringTypeDeclarationDescendant=Ue,t.isTypeDeclarationSibling=ke,t.isMethodBaseSibling=Fe,t.isSecuritySchemePartType=Be,t.isMediaTypeProperty=Ke,t.isRAML08Type=Ve,t.isRAML10Type=je,t.isRAML08Node=We,t.isRAML08Attribute=qe,t.isRAML10Node=Ye,t.isRAML10Attribute=He},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(r(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return e=n(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;o>u;u++)if(i[u]!==a[u]){s=u;break}for(var l=[],u=s;ut&&(t=e.length+t),e.substr(t,n)}}).call(t,n(64))},function(e,t,n){"use strict";function r(e,t){var n=e.name();if(S.LowLevelProxyNode.isInstance(t.lowLevel())){if(S.LowLevelProxyNode.isInstance(e.lowLevel()))return n;var r=t.root().lowLevel().unit(),i=r.project().namespaceResolver(),a=e.lowLevel().unit(),o=i.resolveNamespace(t.lowLevel().unit(),a);if(null!=o){var s=o.namespace();if(null!=s)return s+"."+n}}if(e.lowLevel().unit()!=t.lowLevel().unit())for(var u=t;;){if(u.lowLevel().includePath()||null==u.parent()){u.unitMap||(u.unitMap={},u.asElement().elements().forEach(function(e){if(e.definition().key()==C.Universe10.UsesDeclaration){var t=e.attr("value");if(t){var n=e.root().lowLevel().unit().resolve(t.value());if(null!=n){var r=e.attr("key");r&&(u.unitMap[n.absolutePath()]=r.value())}}}}));var l=u.unitMap[e.lowLevel().unit().absolutePath()];if(l)return l+"."+n}if(!u.parent())break;u=u.parent()}return n}function i(e){var t=e;return t&&t.valueName&&t.toHighLevel&&t.toHighLevel2}function a(e){var t=e;return t&&t.isString&&t.isFromKey&&t.isEmbedded}function o(e){var t=D.newMap([D.newMapping(D.newScalar("example"),e.lowLevel().actual())]),n=D.newMapping(D.newScalar("types"),D.newMap([D.newMapping(D.newScalar("__AUX_TYPE__"),t)])),r=D.newMap([n]),i=new L.ASTNode(r,e.lowLevel().unit(),null,null,null),a=K.parseFromAST(new G(i,e)),o=K.toNominal(a.types()[0],function(e){return null});return o}function s(e){return e.match(/^\s*#%RAML\s+(\d\.\d)\s*(\w*)\s*$/m)}function u(e){var t=e.lowLevel()&&e.lowLevel().unit()&&e.lowLevel().unit().contents();return null==t?null:J(t,e.lowLevel()).ptype}function l(e){if(null==e)return null;var t=e.contents(),n=e.ast(),r=J(t,n),i=r.ptype,a=r.localUniverse,o=a.type(i);o||(o=a.type("Api"));var s=new z(n,null,o,null);s.setUniverse(a);var u=o&&o.universe();return u&&"RAML10"==u.version()?o.isAssignableFrom(b.universesInfo.Universe10.LibraryBase.name)||s.children():s.children(),s}function p(e,t){if(t){var n=t.root().lowLevel().unit();return n?new j.PointOfViewValidationAcceptorImpl(e,t.root()):{accept:function(t){e.push(t)},begin:function(){},end:function(){},acceptUnique:function(t){for(var n=0,r=e;n0&&(s.trace=e.extras.map(function(e){return v(e,t)})),s}var g=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},A=n(39),E=n(9),T=n(70),S=n(44),b=A,_=n(29),N=n(13),w=n(45),R=n(28),I=n(27),M=n(46),C=n(18),L=n(24),P=n(43),O=b,D=n(77),x=n(34),U=n(47),k=n(48),F=n(14),B=n(25),K=A.rt,V=n(31),j=n(2);t.qName=r;var W=function(){function e(e,t){this._node=e,this._parent=t,this._implicit=!1,this.values={},e&&e.setHighLevelParseResult(this)}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.getKind=function(){return E.NodeKind.BASIC},e.prototype.asAttr=function(){return null},e.prototype.asElement=function(){return null},e.prototype.hashkey=function(){return this._hashkey||(this._hashkey=this.parent()?this.parent().hashkey()+"/"+this.name():this.name()),this._hashkey},e.prototype.root=function(){return this.parent()?this.parent().root():this},e.prototype.version=function(){return""},e.prototype.getLowLevelStart=function(){return this.lowLevel().kind()===L.Kind.SCALAR?this.lowLevel().start():this.lowLevel().keyStart()},e.prototype.getLowLevelEnd=function(){return this.lowLevel().kind()===L.Kind.SCALAR?this.lowLevel().end():this.lowLevel().keyEnd()},e.prototype.isSameNode=function(e){return e&&e.lowLevel().actual()==this.lowLevel().actual()?!0:!1},e.prototype.checkContextValue=function(e,t,n){var r=this.computedValue(e);return r&&-1!=r.indexOf(t)?!0:t==r||"false"==t},e.prototype.printDetails=function(e){return(e?e:"")+"Unkown\n"},e.prototype.testSerialize=function(e){return(e?e:"")+"Unkown\n"},e.prototype.errors=function(){var e=[],t=p(e,this);return this.validate(t),e},e.prototype.markCh=function(){for(var e=this.lowLevel();S.LowLevelProxyNode.isInstance(e);)e=e.originalNode();return e=e._node?e._node:e,e.markCh?!0:void(e.markCh=1)},e.prototype.unmarkCh=function(){for(var e=this.lowLevel();S.LowLevelProxyNode.isInstance(e);)e=e.originalNode();e=e._node?e._node:e,delete e.markCh},e.prototype.validate=function(e){R.validate(this,e);for(var t=0,n=d(this);t1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedId=t,t}return this.cachedId="",this.cachedId},e.prototype.localId=function(){return this.name()},e.prototype.resetIDs=function(){this.cachedId=null,this.cachedFullId=null},e.prototype.fullLocalId=function(){var e=this;if(this.cachedFullId)return this.cachedFullId;if(this._parent){var t=".";t+=null!=this.property()&&F.isAnnotationsProperty(this.property())?this.lowLevel().key():this.name();var n=this.parent().directChildren().filter(function(t){return t.name()==e.name()});if(n.length>1){var r=n.indexOf(this);t+="["+r+"]"}return this.cachedFullId=t,t}return this.cachedFullId=this.localId(),this.cachedFullId},e.prototype.property=function(){return null},e.prototype.reuseMode=function(){return this._reuseMode},e.prototype.setReuseMode=function(e){this._reuseMode=e},e.prototype.isReused=function(){return this._isReused},e.prototype.setReused=function(e){this._isReused=e,this.children().forEach(function(t){return t.setReused(e)})},e.prototype.setJSON=function(e){this._jsonCache=e},e.prototype.getJSON=function(){return this._jsonCache},e.CLASS_IDENTIFIER="highLevelImpl.BasicASTNode",e}();t.BasicASTNode=W;var q=function(){function e(e,t,n,r){void 0===r&&(r=null),this.node=e,this._parent=t,this.kv=r,this._pr=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&T.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.valueName=function(){var e=null;return this.kv&&(e=this.kv),e=this.node.key(),this._pr&&this._pr.isAnnotation()&&e&&"("==e.charAt(0)&&(e=e.substring(1,e.length-1)),e},e.prototype.children=function(){return this.node.children().map(function(t){return new e(t,null,null)})},e.prototype.lowLevel=function(){return this.node},e.prototype.toHighLevel=function(e){if(!e&&this._parent&&(e=this._parent),this._hl)return this._hl;var t=this.valueName(),n=e;if(S.LowLevelProxyNode.isInstance(this.node)){var i=this.node.definingUnitSequence(),a=i&&i[0]&&i[0].highLevel().asElement(),o=a&&a.lowLevel().unit().absolutePath();o==e.lowLevel().unit().absolutePath()?a=e:o==e.root().lowLevel().unit().absolutePath()&&(a=e.root()),n=a||n}var s=N.referenceTargets(this._pr,n).filter(function(e){return r(e,n)==t});if(s&&s[0]){var u=s[0].localType(),l=new z(this.node,e,u,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){l.setComputed(e.name,e.value)}),this._hl=l,l}return null},e.prototype.toHighLevel2=function(e){!e&&this._parent&&(e=this._parent);var t=this.valueName(),n=N.referenceTargets(this._pr,e).filter(function(n){return r(n,e)==t});if(n&&n[0]){var i=n[0].localType(),a=new z(this.node,e,i,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}if(this._pr.range()){var a=new z(this.node.parent(),e,this._pr.range(),this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}return null},e.prototype.resetHighLevelNode=function(){this._hl=null},e.CLASS_IDENTIFIER="highLevelImpl.StructuredValue",e}();t.StructuredValue=q,t.isStructuredValue=i;var Y=function(e){function t(t,n,r,i,a){void 0===a&&(a=!1),e.call(this,t,n),this._def=r,this._prop=i,this.fromKey=a}return g(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.definition=function(){return this._def},t.prototype.asAttr=function(){return this},t.prototype.errors=function(){var e=[],t=p(e,this);return this.parent().validate(t),e},t.prototype.isString=function(){return!this._def||this._def.key()!==C.Universe08.StringType&&this._def.key()!=C.Universe10.StringType?!1:!0},t.prototype.isAnnotatedScalar=function(){return this.property().isAnnotation()||this.property().isKey()?!1:this.lowLevel().isAnnotatedScalar()},t.prototype.annotations=function(){var e=this.lowLevel().children(),n=[],r=this.definition().universe().type(C.Universe10.Annotable.name);if(!r)return n;for(var i=r.property("annotations"),a=0;a0&&this.property()&&(F.isTypeOrSchemaProperty(this.property())||F.isItemsProperty(this.property()))&&this.parent()&&F.isTypeDeclarationDescendant(this.parent().definition())?new q(this._node,this.parent(),this._prop):i},t.prototype.name=function(){return this._prop.nameId()},t.prototype.printDetails=function(e){var t=this.definition().nameId(),n=this.property().range().nameId(),r=(e?e:"")+(this.name()+" : "+t+"["+n+"] = "+this.value())+(this.property().isKey()&&this.optional()?"?":"")+"\n";if(q.isInstance(this.value())){var i=this.value().toHighLevel();i&&i.printDetails&&(r+=i.printDetails(e+" "))}return r},t.prototype.testSerialize=function(e){var t=this.definition().nameId(),n=(e?e:"")+(this.name()+" : "+t+" = "+this.value())+"\n";if(q.isInstance(this.value())){var r=this.value().toHighLevel();if(r&&r.testSerialize)n+=r.testSerialize((e?e:"")+" ");else{var i=this.value().lowLevel(),a=i.dumpToObject(),o=JSON.stringify(a),s="",u=o.split("\n");u.forEach(function(t){return s+=(e?e:"")+" "+t+"\n"}),n+=s+"\n"}}return n},t.prototype.isAttr=function(){return!0},t.prototype.isUnknown=function(){return!1},t.prototype.setValue=function(e){w.setValue(this,e),this._value=null},t.prototype.setKey=function(e){w.setKey(this,e),this._value=null},t.prototype.children=function(){return[]},t.prototype.addStringValue=function(e){w.addStringValue(this,e),this._value=null},t.prototype.addStructuredValue=function(e){w.addStructuredValue(this,e),this._value=null},t.prototype.addValue=function(e){if(!this.property().isMultiValue())throw new Error("setValue(string) only apply to multi-values properties");"string"==typeof e?this.addStringValue(e):this.addStructuredValue(e),this._value=null},t.prototype.isEmbedded=function(){var e=this.lowLevel().asMapping().key.value;return this.property().canBeValue()&&e!=this.property().nameId()},t.prototype.remove=function(){w.removeAttr(this)},t.prototype.setValues=function(e){w.setValues(this,e),this._value=null},t.prototype.isEmpty=function(){if(!this.property().isMultiValue())throw new Error("isEmpty() only apply to multi-values attributes");var e=this.parent(),t=(e.lowLevel(),e.attributes(this.name()));if(0==t.length)return!0;if(1==t.length){var n=t[0].lowLevel();return n.isMapping()&&null==n.value()?!0:!1}return!1},t.prototype.isFromKey=function(){return this.fromKey},t.CLASS_IDENTIFIER_ASTPropImpl="highLevelImpl.ASTPropImpl",t}(W);t.ASTPropImpl=Y,t.isASTPropImpl=a;var H=new _.BasicNodeBuilder;!function(e){e[e.MERGE=0]="MERGE",e[e.AGGREGATE=1]="AGGREGATE"}(t.OverlayMergeMode||(t.OverlayMergeMode={}));var $=t.OverlayMergeMode,G=function(e){function t(n,r){e.call(this),this._node=n,this._highLevelRoot=r;var i=r.root(),a=i.getMaster();if(a&&this._node===r.lowLevel()){var o=r.getMasterCounterPart();o&&(this._toMerge=new t(o.lowLevel(),o))}}return g(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&T.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.contentProvider=function(){var e=this._node&&this._node.includeBaseUnit()&&(this._node.includePath&&this._node.includePath()?this._node.includeBaseUnit().resolve(this._node.includePath()):this._node.includeBaseUnit());return new V.ContentProvider(e)},t.prototype.key=function(){var e=this._node.key();return this._node.optional()&&(e+="?"),e},t.prototype.value=function(){var e=this._node.resolvedValueKind();if(e===D.Kind.SEQ)return this.children().map(function(e){return e.value()});if(e===D.Kind.MAP){var t=this._node.dumpToObject(!1);return t[this.key()]}if(this._node.kind()==D.Kind.MAP){var t=this._node.dumpToObject(!1);return t}var n=this._node.value();return n},t.prototype.children=function(){var e=this;if(this._children)return this._children;"uses"!=this.key()||this._node.parent().parent()?this._children=this._node.children().map(function(n){return new t(n,e._highLevelRoot)}):this._children=this._node.children().map(function(t){return new X(t,e._highLevelRoot)}),this.childByKey={};for(var n=0;n0?K.NodeKind.MAP:K.NodeKind.SCALAR},t.prototype.getSource=function(){if(!this._node)return null;var e=this._node.highLevelNode();if(!e){var t=this._node.start(),n=N.deepFindNode(this._highLevelRoot,t,t,!0,!1);return n&&(this._node.setHighLevelParseResult(n),z.isInstance(n)&&this._node.setHighLevelNode(n)),n}return e},t.prototype.node=function(){return this._node},t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem="highLevelImpl.LowLevelWrapperForTypeSystem",t}(A.SourceProvider);t.LowLevelWrapperForTypeSystem=G;var X=function(e){function t(){e.apply(this,arguments)}return g(t,e),t.prototype.children=function(){var e=this._node.unit().resolve(this.value());return e&&e.isRAMLUnit()&&e.contents().trim().length>0?new G(e.ast(),this._highLevelRoot).children():[]},t.prototype.anchor=function(){return this._node.actual()},t.prototype.childWithKey=function(e){for(var t=this.children(),n=0;n=0)for(var r=this.parent();null!=r;){if(F.isResourceTypeType(r.definition())||F.isTraitType(r.definition())){e=!0;break}r=r.parent()}}return e},t.prototype.localType=function(){return M.typeFromNode(this)},t.prototype.patchProp=function(e){this._prop=e},t.prototype.getKind=function(){return E.NodeKind.NODE},t.prototype.wrapperNode=function(){if(!this._wrapperNode){if(F.isExampleSpecType(this.definition())){var e=o(this),t=x.examplesFromNominal(e,this,!0,!1);return t[0]}var n=this.definition()&&this.definition().universe();n&&"RAML10"==n.version()?this.definition()&&this.definition().isAssignableFrom(b.universesInfo.Universe10.LibraryBase.name)||this.children():this.children(),this._wrapperNode=this.buildWrapperNode()}return this._wrapperNode},t.prototype.asElement=function(){return this},t.prototype.buildWrapperNode=function(){var e=this.definition().universe().version();return"RAML10"==e?U.buildWrapperNode(this):"RAML08"==e?k.buildWrapperNode(this):null},t.prototype.propertiesAllowedToUse=function(){var e=this;return this.definition().allProperties().filter(function(t){return e.isAllowedToUse(t)})},t.prototype.isAllowedToUse=function(e){var t=this,n=!0;return e.getAdapter(O.RAMLPropertyService).isSystem()?!1:(e.getContextRequirements().forEach(function(e){if(-1!=e.name.indexOf("("))return!0;var r=t.computedValue(e.name);r?n=n&&r==e.value:e.value&&(n=!1)}),n)},t.prototype.allowRecursive=function(){return this.definition().getAdapter(O.RAMLService).isUserDefined()?!0:!1},t.prototype.setWrapperNode=function(e){this._wrapperNode=e},t.prototype.setAssociatedType=function(e){this._associatedDef=e},t.prototype.associatedType=function(){return this._associatedDef},t.prototype.knownIds=function(){return this.isAuxilary(),this._knownIds?this._knownIds:{}},t.prototype.findById=function(e){var t=this,n=this.root();if(n!=this)return n.findById(e);if(!this._knownIds){this._knownIds={};var r=N.allChildren(this);r.forEach(function(e){return t._knownIds[e.id()]=e})}if(this.isAuxilary()){if(!this._slaveIds){this._slaveIds={};var r=N.allChildren(this);r.forEach(function(e){return t._slaveIds[e.id()]=e})}var i=this._slaveIds[e];if(i)return i}return this._knownIds[e]},t.prototype.isAuxilary=function(){if(this._isAux)return!0;if(this._auxChecked)return!1;this._auxChecked=!0;var e=this.getMaster();return e?(this._isAux=!0,this.initilizeKnownIDs(e),!0):!1},t.prototype.initilizeKnownIDs=function(e){var t=this;this._knownIds={};var n=N.allChildren(e);n.forEach(function(e){return t._knownIds[e.id()]=e}),this._knownIds[""]=e},t.prototype.getMaster=function(){if(this.masterApi)return this.masterApi;var e=this.calculateMasterByRef();return e&&e.setSlave(this),e},t.prototype.overrideMaster=function(e){this.masterApi=e,this.resetAuxilaryState(),e&&e.setSlave(this)},t.prototype.setSlave=function(e){this.slave=e},t.prototype.setMergeMode=function(e){this.overlayMergeMode=e,this.resetAuxilaryState()},t.prototype.getMergeMode=function(){return this.overlayMergeMode},t.prototype.calculateMasterByRef=function(){var e=this.lowLevel().unit();if(!e)return null;var t=e.getMasterReferenceNode();if(!t||!t.value())return null;var n=this.lowLevel();if(n.master)return n.master;var r=t.value(),i=this.lowLevel().unit().project().resolve(this.lowLevel().unit().path(),r);if(!i)return null;var a=i.expandedHighLevel();return a.setMergeMode(this.overlayMergeMode),n.master=a,a},t.prototype.resetAuxilaryState=function(){this._isAux=!1,this._auxChecked=!1,this._knownIds=null,this.clearChildrenCache()},t.prototype.printDetails=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().range().nameId():"",i=this.property()?this.property().nameId():"";return t+=e+n+"["+r+"] <--- "+i+"\n",this.children().forEach(function(n){t+=n.printDetails(e+" ")}),t},t.prototype.testSerialize=function(e){var t="";e||(e="");var n=this.definition().nameId(),r=this.property()?this.property().nameId():"";return t+=e+n+" <-- "+r+"\n",this.children().forEach(function(n){n.testSerialize&&(t+=n.testSerialize(e+" "))}),t},t.prototype.getExtractedChildren=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];if(t){var n=t.children();return n}}return[]}return[]},t.prototype.getMasterCounterPart=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];return t}return null}return null},t.prototype.getSlaveCounterPart=function(){var e=this.root();return e.slave?e.slave.findById(this.id()):null},t.prototype.getLastSlaveCounterPart=function(){var e=this.root(),t=e.slave;if(null==t)return null;for(;null!=t.slave;)t=t.slave;return""==this.id()?t:t.findById(this.id())},t.prototype.getExtractedLowLevelChildren=function(e){var t=this.root();if(t.isAuxilary()){if(t._knownLowLevelIds){var n=t._knownLowLevelIds[this.id()];if(n)return n.children()}return[]}return[]},t.prototype.allowsQuestion=function(){return this._allowQuestion||this.definition().getAdapter(O.RAMLService).getAllowQuestion()},t.prototype.findReferences=function(){var e=this,t=[];N.refFinder(this.root(),this,t),t.length>1&&(t=t.filter(function(t){return t!=e&&t.parent()!=e}));var n=[];return t.forEach(function(e){T.find(n,function(t){return t==e})||n.push(e)}),n},t.prototype.setNamePatch=function(e){this._patchedName=e},t.prototype.isNamePatch=function(){return this._patchedName},t.prototype.name=function(){if(this._patchedName)return this._patchedName;var t=T.find(this.directChildren(),function(e){return e.property()&&e.property().getAdapter(O.RAMLPropertyService).isKey()});if(t&&Y.isInstance(t)){var n=null,r=this.definition(),i=r.universe().version();if(r&&"RAML10"==i&&t.isFromKey()){var a=this._node.key();n=this._node.optional()?a+"?":a}else n=t.value();return n}return e.prototype.name.call(this)},t.prototype.findElementAtOffset=function(e){return this._findNode(this,e,e)},t.prototype.isElement=function(){return!0},t.prototype.universe=function(){return this._universe?this._universe:this.definition().universe()},t.prototype.setUniverse=function(e){this._universe=e},t.prototype._findNode=function(e,t,n){var r=this;if(null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){var i=e;return e.elements().forEach(function(a){if(a.lowLevel().unit()==e.lowLevel().unit()){var o=r._findNode(a,t,n);o&&(i=o)}}),i}return null},t.prototype.isStub=function(){return!this.lowLevel().unit()||this.lowLevel().unit().isStubUnit()},t.prototype.add=function(e){w.addToNode(this,e)},t.prototype.remove=function(e){w.removeNodeFrom(this,e)},t.prototype.dump=function(e){return this._node.dump()},t.prototype.patchType=function(e){this._def=e;this._associatedDef;this._associatedDef=null,this._children=null,this._mergedChildren=null},t.prototype.children=function(){var e=this.lowLevel();return e&&e.isValueInclude&&e.isValueInclude()&&B.isWaitingFor(e.includePath())?(this._children=null,[]):this._children?this._mergedChildren?this._mergedChildren:(this._mergedChildren=this.mergeChildren(this._children,this.getExtractedChildren()),this._mergedChildren):this._node?(this._children=H.process(this,this._node.children()),this._children=this._children.filter(function(e){return null!=e}),this.mergeChildren(this._children,this.getExtractedChildren())):[]},t.prototype.mergeChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==$.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==$.MERGE){var i=[];return e.forEach(function(e){var r=T.find(t,function(t){return t.fullLocalId()==e.fullLocalId()});r?n.mergeChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=T.find(e,function(e){return t.fullLocalId()==e.fullLocalId()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==$.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==$.MERGE){var i=[];return e.forEach(function(e){var r=T.find(t,function(t){return t.key()==e.key()});r?n.mergeLowLevelChild(i,e,r):i.push(e)}),t.forEach(function(t){var n=T.find(e,function(e){return t.key()==e.key()});n||i.push(t)}),i}return null},t.prototype.mergeLowLevelChild=function(e,t,n){return t.kind()!=n.kind()?(e.push(t),void e.push(n)):void e.push(t)},t.prototype.mergeChild=function(e,t,n){return t.getKind()!=n.getKind()?(e.push(t),void e.push(n)):t.getKind()==E.NodeKind.NODE?void e.push(t):t.getKind()==E.NodeKind.ATTRIBUTE?void e.push(t):t.getKind()==E.NodeKind.BASIC?(e.push(t),void e.push(n)):void 0},t.prototype.directChildren=function(){return this._children?this._children:this._node?(this._children=H.process(this,this._node.children()),this._mergedChildren=null,this._children):[]},t.prototype.resetChildren=function(){this._children=null,this._mergedChildren=null},t.prototype.isEmptyRamlFile=function(){var e=this.lowLevel().root();return e.isScalar()},t.prototype.initRamlFile=function(){w.initEmptyRAMLFile(this)},t.prototype.createAttr=function(e,t){w.createAttr(this,e,t)},t.prototype.isAttr=function(){return!1},t.prototype.isUnknown=function(){return!1},t.prototype.value=function(){return this._node.value()},t.prototype.valuesOf=function(e){var t=this._def.property(e);return null!=t?this.elements().filter(function(e){return e.property()==t}):[]},t.prototype.attr=function(e){return T.find(this.attrs(),function(t){return t.name()==e})},t.prototype.attrOrCreate=function(e){var t=this.attr(e);return t||this.createAttr(e,""),this.attr(e)},t.prototype.attrValue=function(e){var t=this.attr(e);return t?t.value():null},t.prototype.attributes=function(e){return T.filter(this.attrs(),function(t){return t.name()==e})},t.prototype.attrs=function(){var e=this.children().filter(function(e){return e.isAttr()});if(this._patchedName){var t=T.find(this.definition().allProperties(),function(e){return e.getAdapter(O.RAMLPropertyService).isKey()});if(t){var n=new Y(this.lowLevel(),this,t.range(),t,!0);return n._value=this._patchedName,[n].concat(e)}}return e},t.prototype.elements=function(){return this.children().filter(function(e){return!e.isAttr()&&!e.isUnknown()})},t.prototype.element=function(e){var t=this.elementsOfKind(e);return t.length>0?t[0]:null},t.prototype.elementsOfKind=function(e){var t=this.elements().filter(function(t){return t.property().nameId()==e});return t},t.prototype.definition=function(){return this._def},t.prototype.property=function(){return this._prop},t.prototype.isExpanded=function(){return this._expanded},t.prototype.copy=function(){return new t(this.lowLevel().copy(),this.parent(),this.definition(),this.property())},t.prototype.clearChildrenCache=function(){this._children=null,this._mergedChildren=null},t.prototype.optionalProperties=function(){var e=this.definition();if(null==e)return[];var t=[],n={},r=this.lowLevel().children();r.forEach(function(e){e.optional()&&(n[e.key()]=!0)});var i=e.allProperties();return i.forEach(function(e){var r=e;n[r.nameId()]&&t.push(r.nameId())}),t},t.prototype.setReuseMode=function(e){this._reuseMode=e,this._children&&this.lowLevel().valueKind()!=D.Kind.SEQ&&this._children.forEach(function(t){return t.setReuseMode(e)})},t.prototype.reusedNode=function(){return this._reusedNode},t.prototype.setReusedNode=function(e){this._reusedNode=e},t.prototype.resetRuntimeTypes=function(){delete this._associatedDef,this.elements().forEach(function(e){return e.resetRuntimeTypes()})},t.CLASS_IDENTIFIER_ASTNodeImpl="highLevelImpl.ASTNodeImpl",t}(W);t.ASTNodeImpl=z,t.universeProvider=n(38);var J=function(e,n){var r=s(e),i=r&&r[1]||"",a=r&&r.length>2&&r[2]||"Api",o=r&&r.length>2&&r[2],u="1.0"==i?new b.Universe(null,"RAML10",t.universeProvider("RAML10"),"RAML10"):new b.Universe(null,"RAML08",t.universeProvider("RAML08"));return"API"==a?a="Api":"NamedExample"==a?a="ExampleSpec":"DataType"==a?a="TypeDeclaration":"SecurityScheme"==a?a="AbstractSecurityScheme":"AnnotationTypeDeclaration"==a&&(a="TypeDeclaration"),u.setOriginalTopLevelText(o),u.setTopLevel(a),u.setTypedVersion(i),{ptype:a,localUniverse:u}};t.ramlFirstLine=s,t.getFragmentDefenitionName=u,t.fromUnit=l,t.createBasicValidationAcceptor=p,t.isAnnotationTypeFragment=c;var Q=function(){function e(e){this._node=e}return e.prototype.kind=function(){return"AnnotatedNode"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){var n=t.name(),r=n.lastIndexOf(".");r>=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){if(!this._annotations){var e=[];this._node.isElement()?e=this._node.asElement().attributes(b.universesInfo.Universe10.Annotable.properties.annotations.name):this._node.isAttr()&&(e=this._node.asAttr().annotations()),this._annotations=e.map(function(e){return new Z(e)})}return this._annotations},e.prototype.value=function(){if(this._node.isElement())return this._node.asElement().wrapperNode().toJSON();if(this._node.isAttr()){var e=this._node.asAttr().value();return q.isInstance(e)?e.lowLevel().dump():e}return this._node.lowLevel().dump()},e.prototype.name=function(){return this._node.name()},e.prototype.entry=function(){return this._node},e}();t.AnnotatedNode=Q;var Z=function(){function e(e){this.attr=e}return e.prototype.name=function(){return this.attr.value().valueName()},e.prototype.value=function(){var e=this.attr.value();if(q.isInstance(e)){var t=e.lowLevel().dumpToObject(),n=Object.keys(t)[0];return t[n]}return e},e.prototype.definition=function(){var e=this.attr.parent(),t=this.name(),n=N.referenceTargets(this.attr.property(),e).filter(function(n){return r(n,e)==t});return 0==n.length?null:n[0].parsedType()},e}();t.AnnotationInstance=Z,t.applyNodeValidationPlugins=d,t.applyNodeAnnotationValidationPlugins=h,t.toParserErrors=m},function(e,t,n){"use strict";function r(e,t,n){var r=e.definition().property(t);if(!r)return null;var i=r.range(),a=d(i,r,n);return a}function i(e,t,n,r){var i=y.newMap(n.map(function(e){return y.newMapping(y.newScalar(e.key),y.newScalar(e.value))})),a=new h.ASTNode(i,r?r.lowLevel().unit():null,r?r.lowLevel():null,null,null);return new m.StructuredValue(a,r,r?r.definition().property(e):null,t)}function a(e,t,n){var r=e.definition().property(t);if(!r)return null;var i=r.range(),a=e.lowLevel().unit().stub(),o=d(i,r,n,a);return o.isInEdit=!0,o.lowLevel()._unit=a,o._parent=e.copy(),o._parent.lowLevel()._unit=a,o}function o(e,t){return a(e,"resources",t)}function s(e,t){return a(e,"methods",t)}function u(e,t){return a(e,"responses",t)}function l(e,t){return a(e,"body",t)}function p(e,t){return a(e,"uriParameters",t)}function c(e,t){return a(e,"queryParameters",t)}function f(e,t){var n=h.createMapping(e.nameId(),t),r=new m.ASTPropImpl(n,null,e.range(),e);return r}function d(e,t,n,r){void 0===n&&(n=null);var i=h.createNode(n?n:"key",null,r),a=new m.ASTNodeImpl(i,null,e,t);return i.unit()||(i._unit=r),a.children(),a}var h=n(24),m=n(16),y=n(77);t.createStub0=r,t.genStructuredValue=i,t.createStub=a,t.createResourceStub=o,t.createMethodStub=s,t.createResponseStub=u,t.createBodyStub=l,t.createUriParameterStub=p,t.createQueryParameterStub=c,t.createAttr=f,t.createStubNode=d},function(e,t,n){"use strict";var r=n(39);e.exports=r.universesInfo},function(e,t,n){"use strict";var r=n(70),i=n(43),a=n(21),o=function(){function e(){}return e.prototype.generateText=function(e){var t=this,n=JSON.parse(e),r=n.items;if(!r)return"";var i="",a=r instanceof Array?r:[r];return i+="types:\n",a.forEach(function(e){i+=" - "+e.title+":\n",i+=t.generateObj(e,3)}),i},e.prototype.generateObj=function(e,t){var n="";if(n+=i.indent(t,"type: "+e.type)+"\n",e.properties){n+=i.indent(t,"properties:\n");for(var r in e.properties){var a=e.properties[r];n+=i.indent(t+1,r+":\n"),n+="object"==a.type?this.generateObj(a,t+2):i.indent(t+2,"type: "+a.type)+"\n"}return n}},e.prototype.generateTo=function(e,t,n){var r=this,i=JSON.parse(t),o=i.items;if(o){var s=o instanceof Array?o:[o],u=[];return s.forEach(function(t){var n=new a.ObjectTypeDeclarationImpl(t.title);r.generateObjTo(n,t),new a.BasicSecuritySchemeImpl(e).addToProp(n,"types"),u.push(t.title)}),u}i.title&&(n=i.title);var l=new a.ObjectTypeDeclarationImpl(n);return this.generateObjTo(l,i),new a.BasicSecuritySchemeImpl(e).addToProp(l,"types"),[n]},e.prototype.generateObjTo=function(e,t){if(e.setType(t.type),t.properties)for(var n in t.properties){var r=t.properties[n],i=this.makeTypeField(n,r);"array"==r.type,e.addToProp(i,"properties")}},e.prototype.makeTypeField=function(e,t){var n=this.makeType(e,t.type);if(t.type&&n.setType(t.type),"number"==t.type){var r=n;void 0!=t.minimum&&r.setMinimum(t.minimum),void 0!=t.maximum&&r.setMaximum(t.maximum)}if("array"==t.type){var i=t.items.type;n.setType(i+"[]");var a=n;void 0!=t.minItems&&a.setMinItems(t.minItems),void 0!=t.maxItems&&a.setMaxItems(t.maxItems),void 0!=t.uniqueItems&&a.setUniqueItems(t.uniqueItems)}return"object"==t.type&&this.generateObjTo(n,t),n},e.prototype.makeType=function(e,t){return"number"==t?new a.NumberTypeDeclarationImpl(e):"string"==t?new a.StringTypeDeclarationImpl(e):"array"==t?new a.ArrayTypeDeclarationImpl(e):new a.ObjectTypeDeclarationImpl(e)},e.prototype.generateItemsTo=function(e,t){var n=t.items;if(n){var r=n instanceof Array?n:[n];r.forEach(function(e){})}},e}();t.SchemaToModelGenerator=o;var s=function(){function e(){}return e.prototype.generateSchema=function(e){var t=this.generateType(e);return t.$schema="http://json-schema.org/draft-04/schema#",t},e.prototype.isSimpleType=function(e){return"string"==e||"number"==e||"boolean"==e||"object"==e},e.prototype.generateType=function(e){var t=this.allTypes(e),n={};n.title=e.attrValue("name");if(e.attrValue("type")){var i=e.attributes("type"),a=!1,o=!1;for(var s in i){var u=i[s].value(),l=i[s].lowLevel();if(n.type="",l.isValueInclude()){var p=JSON.parse(u);n.type="object",n.properties=p.properties}else if(this.isSimpleType(u)){if(n.type=u,o=!0,a)throw new Error("couldn't mix user defined and basic types in inheritance")}else{var c=this.resolveType(e,u);if(c){var f=this.generateTypeExp(u,t);if(n.properties?r.extend(n.properties,f.properties):n.properties=f.properties,n.type="object",a=!0,o)throw new Error("couldn't mix user defined and basic types in inheritance")}else{var f=this.generateTypeExp(u,t);n.type="object",a=!0,f.anyOf&&(n.anyOf=f.anyOf)}}}}else n.type="object";var d=this.generateProperties(e);return n.properties?r.extend(n.properties,d):n.properties=d,n},e.prototype.makeUnion=function(e,t){var n=this,r=[];return e.forEach(function(e){e=e.trim(),t[e]?r.push({type:"object",properties:n.generateType(t[e]).properties}):r.push({type:e})}),r},e.prototype.generateTypeExp=function(e,t){var n={};if(i.endsWith(e,"[]"))n.type="array",n.items={type:e.substring(0,e.length-2)};else if(e.indexOf("|")>0){var r=e.split("|");n.anyOf=this.makeUnion(r,t)}else if(t[e]){var a=this.generateType(t[e]);n.type="object",n.properties=a.properties}else n.type=e;return n},e.prototype.allTypes=function(e){var t=e.root(),n=t.elementsOfKind("types"),r={};return n.forEach(function(e){r[e.name()]=e}),r},e.prototype.resolveType=function(e,t){var n=this.allTypes(e);return n[t]},e.prototype.generateProperty=function(e,t){var n=this,i=this.allTypes(e),a={},o=e.definition().allProperties();o.forEach(function(t){if("name"!=t.nameId()){var o=e.attrValue(t.nameId());if(null!=o&&void 0!=o&&"undefined"!=o)if("type"==t.nameId()){var s=n.generateTypeExp(o,i);r.extend(a,s)}else if("enum"==t.nameId()){var u=e.attributes("enum"),l=u.map(function(e){return e.value()});a["enum"]=l}else a[t.nameId()]=o}}),t&&(a.required=!1);var s=(e.elements(),this.generateProperties(e));return Object.getOwnPropertyNames(s).length>0&&(a.properties=s),a},e.prototype.generateProperties=function(e){var t=this,n={},r=e.elements(),i=!0;return r.forEach(function(e){var r=e.attrValue("name");if("string"==typeof r){r=r.trim();var a=e.optional();n[r]=t.generateProperty(e,a),i=!1}}),n},e}();t.ModelToSchemaGenerator=s},function(e,t,n){"use strict";function r(e){return new u.TypeDeclarationImpl(e)}function i(e){return new u.ObjectTypeDeclarationImpl(e)}function a(e,t){e.setSchema(t)}function o(e,t){var n=(l.getUniverse("RAML10").type(l.universesInfo.Universe10.ExampleSpec.name),l.universesInfo.Universe10.TypeDeclaration.properties.example.name),r=e.highLevel(),i=r.lowLevel(),a=r.children().filter(function(e){return e.lowLevel().key()==n}),o=p.createNode(n);c.setAttr(o,t),a.length>0&&(c.removeNode(i,a[0].lowLevel()),a[0]._node=o,c.insertNode(i,o)),r.createAttr&&r.createAttr(n,t)}function s(e,t){e.add(t)}var u=n(21),l=n(39),p=n(24),c=n(10);t.createTypeDeclaration=r,t.createObjectTypeDeclaration=i,t.setTypeDeclarationSchema=a,t.setTypeDeclarationExample=o,t.addChild=s},function(e,t,n){"use strict";function r(e){var t=J.getUniverse("RAML10"),n=t.type("Api"),r=z.createStubNode(n,null,e);return r}function i(e){var t=J.getUniverse("RAML10"),n=t.type("LibraryBase"),r=z.createStubNode(n,null,e);return r}function a(e){var t=J.getUniverse("RAML10"),n=t.type("FragmentDeclaration"),r=z.createStubNode(n,null,e);return r}function o(e){var t=J.getUniverse("RAML10"),n=t.type("Trait"),r=z.createStubNode(n,null,e);return r}function s(e){var t=J.getUniverse("RAML10"),n=t.type("MethodBase"),r=z.createStubNode(n,null,e);return r}function u(e){var t=J.getUniverse("RAML10"),n=t.type("Operation"),r=z.createStubNode(n,null,e);return r}function l(e){var t=J.getUniverse("RAML10"),n=t.type("TypeDeclaration"),r=z.createStubNode(n,null,e);return r}function p(e){var t=J.getUniverse("RAML10"),n=t.type("UsesDeclaration"),r=z.createStubNode(n,null,e);return r}function c(e){var t=J.getUniverse("RAML10"),n=t.type("XMLFacetInfo"),r=z.createStubNode(n,null,e);return r}function f(e){var t=J.getUniverse("RAML10"),n=t.type("ArrayTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function d(e){var t=J.getUniverse("RAML10"),n=t.type("UnionTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function h(e){var t=J.getUniverse("RAML10"),n=t.type("ObjectTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function m(e){var t=J.getUniverse("RAML10"),n=t.type("StringTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function y(e){var t=J.getUniverse("RAML10"),n=t.type("BooleanTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function v(e){var t=J.getUniverse("RAML10"),n=t.type("NumberTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function g(e){var t=J.getUniverse("RAML10"),n=t.type("IntegerTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function A(e){var t=J.getUniverse("RAML10"),n=t.type("DateOnlyTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function E(e){var t=J.getUniverse("RAML10"),n=t.type("TimeOnlyTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function T(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeOnlyTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function S(e){var t=J.getUniverse("RAML10"),n=t.type("DateTimeTypeDeclaration"),r=z.createStubNode(n,null,e); -return r}function b(e){var t=J.getUniverse("RAML10"),n=t.type("FileTypeDeclaration"),r=z.createStubNode(n,null,e);return r}function _(e){var t=J.getUniverse("RAML10"),n=t.type("Response"),r=z.createStubNode(n,null,e);return r}function N(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemePart"),r=z.createStubNode(n,null,e);return r}function w(e){var t=J.getUniverse("RAML10"),n=t.type("AbstractSecurityScheme"),r=z.createStubNode(n,null,e);return r}function R(e){var t=J.getUniverse("RAML10"),n=t.type("SecuritySchemeSettings"),r=z.createStubNode(n,null,e);return r}function I(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecuritySchemeSettings"),r=z.createStubNode(n,null,e);return r}function M(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecuritySchemeSettings"),r=z.createStubNode(n,null,e);return r}function C(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth2SecurityScheme"),r=z.createStubNode(n,null,e);return r}function L(e){var t=J.getUniverse("RAML10"),n=t.type("OAuth1SecurityScheme"),r=z.createStubNode(n,null,e);return r}function P(e){var t=J.getUniverse("RAML10"),n=t.type("PassThroughSecurityScheme"),r=z.createStubNode(n,null,e);return r}function O(e){var t=J.getUniverse("RAML10"),n=t.type("BasicSecurityScheme"),r=z.createStubNode(n,null,e);return r}function D(e){var t=J.getUniverse("RAML10"),n=t.type("DigestSecurityScheme"),r=z.createStubNode(n,null,e);return r}function x(e){var t=J.getUniverse("RAML10"),n=t.type("CustomSecurityScheme"),r=z.createStubNode(n,null,e);return r}function U(e){var t=J.getUniverse("RAML10"),n=t.type("Method"),r=z.createStubNode(n,null,e);return r}function k(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceType"),r=z.createStubNode(n,null,e);return r}function F(e){var t=J.getUniverse("RAML10"),n=t.type("ResourceBase"),r=z.createStubNode(n,null,e);return r}function B(e){var t=J.getUniverse("RAML10"),n=t.type("Resource"),r=z.createStubNode(n,null,e);return r}function K(e){var t=J.getUniverse("RAML10"),n=t.type("DocumentationItem"),r=z.createStubNode(n,null,e);return r}function V(e){var t=J.getUniverse("RAML10"),n=t.type("Library"),r=z.createStubNode(n,null,e);return r}function j(e){var t=J.getUniverse("RAML10"),n=t.type("Overlay"),r=z.createStubNode(n,null,e);return r}function W(e){var t=J.getUniverse("RAML10"),n=t.type("Extension"),r=z.createStubNode(n,null,e);return r}function q(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function Y(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function H(e,t,n){return Z.loadApiAsync(e,t,n)}function $(e,t,n){return Z.loadRAMLAsync(e,t,n)}function G(e){return Z.getLanguageElementByRuntimeType(e)}var X=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},z=n(17),J=n(39),Q=n(51),Z=n(8),ee=n(34),te=function(e){function t(){e.apply(this,arguments)}return X(t,e),t.prototype.annotations=function(){return e.prototype.attributes.call(this,"annotations",function(e){return new Lt(e)})},t.prototype.wrapperClassName=function(){return"AnnotableImpl"},t.prototype.kind=function(){return"Annotable"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Annotable")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML10.AnnotableImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();tt;t++)a(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e(function(e){n||(n=!0,o(t,e))},function(e){n||(n=!0,s(t,e))})}catch(r){if(n)return;n=!0,s(t,r)}}var c=setTimeout,f="function"==typeof setImmediate&&setImmediate||function(e){c(e,0)},d=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var r=new this.constructor(n);return a(this,new l(e,t,r)),r},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(a,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,function(e){r(a,e)},n)}t[a]=o,0===--i&&e(t)}catch(u){n(u)}}if(0===t.length)return e([]);for(var i=t.length,a=0;ar;r++)e[r].then(t,n)})},i._setImmediateFn=function(e){f=e},i._setUnhandledRejectionFn=function(e){d=e},"undefined"!=typeof e&&e.exports?e.exports=i:t.Promise||(t.Promise=i)}(this)},function(e,t,n){"use strict";function r(){return new W}function i(e){if(null==e)return null;switch(e.kind){case w.Kind.SCALAR:return{errors:[],startPosition:e.startPosition,endPosition:e.endPosition,value:e.value,kind:w.Kind.SCALAR,parent:e.parent};case w.Kind.MAPPING:var t=e;return{errors:[],key:i(t.key),value:i(t.value),startPosition:t.startPosition,endPosition:t.endPosition,kind:w.Kind.MAPPING,parent:t.parent};case w.Kind.MAP:var n=e;return{errors:[],startPosition:e.startPosition,endPosition:e.endPosition,mappings:n.mappings.map(function(e){return i(e)}),kind:w.Kind.MAP,parent:n.parent}}return e}function a(e){var t=e.match(/^.*((\r\n|\n|\r)|$)/gm);return t}function o(e,t){for(var n=a(e),r=[],i=0;i0?i[0]:null})}var S=n(10),b=n(15),_=n(40),N=n(41),w=n(77),R=n(70),I=n(43),M=n(16),C=n(37),L=n(25),P=n(33),O=n(26),D=n(49),x=n(18),U=n(27),k=n(50),F=w.YAMLException;t.Kind={SCALAR:w.Kind.SCALAR};var B=function(){function e(e){this.text="",this.indent=e}return e.prototype.isLastNL=function(){return this.text.length>0&&"\n"==this.text[this.text.length-1]},e.prototype.addWithIndent=function(e,t){this.isLastNL()&&(this.text+=I.indent(e),this.text+=this.indent),this.text+=t},e.prototype.addChar=function(e){this.isLastNL()&&(this.text+=this.indent),this.text+=e},e.prototype.append=function(e){for(var t=0;t300&&400>a){var o=n.getResponseHeader("location");if(o)return e.url=o,this.execute(e,!1)}var s={status:a,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};return s},e.prototype.appendParams=function(e,t){var n=e.queryString&&e.queryString.length>0;if(n){t+="?";var r=[];n&&(r=r.concat(e.queryString.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}))),t+=r.join("&")}return t},e.prototype.log=function(e,t){},e.prototype.executeAsync=function(e,t){void 0===t&&(t=!0);var n=r(),i=e.url;t&&(i=this.appendParams(e,e.url));var a=this;return new Promise(function(t,r){n.open(e.method,i,!0),n.onload=function(){var e=n.status,r={status:e,statusText:n.statusText,headers:n.getAllResponseHeaders().split("\n").map(function(e){var t=e.indexOf(":");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}};t(r)},n.onerror=function(){r(new F("Network Error"))},a.doRequest(e,n)})},e.prototype.doRequest=function(e,t){if(e.headers&&e.headers.forEach(function(e){return t.setRequestHeader(e.name,e.value)}),e.postData)if(e.postData.params){var n=e.postData.params.map(function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}).join("&");t.send(n)}else t.send(e.postData.text);else t.send()},e}();t.SimpleExecutor=q;var Y=function(){function e(){this.executor=new q}return e.prototype.getResource=function(e){if("undefined"!=typeof atom&&null!=atom){var t=L.get(e);if(t)return t;L.addNotify(e);try{var n={content:""};return this.getResourceAsync(e).then(function(t){try{t.errorMessage?L.set(e,{content:null,errorMessage:null}):(t.errorMessage=null,L.set(e,t))}finally{n.callback&&n.callback(L.get(e)),L.removeNotity(e)}},function(t){L.set(e,{content:null,errorMessage:null}),n.callback&&n.callback(L.get(e)),L.removeNotity(e)}),n}catch(r){console.log("Error"),console.log(r)}}var i=this.executor.execute({method:"get",url:e});if(!i)throw new F("Unable to execute GET "+e);var a=this.toResponse(i,e);return a},e.prototype.getResourceAsync=function(e){var t=this;return this.executor.executeAsync({method:"get",url:e}).then(function(n){if(!n)return Promise.reject(new F("Unable to execute GET "+e));var r=t.toResponse(n,e);return r},function(t){return Promise.reject(new F("Unable to execute GET "+e))})},e.prototype.toResponse=function(e,t){var n=null;e.status>=400&&(n="GET "+t+"\nreturned error: "+e.status,e.statusText&&(n+=" "+e.statusText));var r=null;e.content&&e.content.text&&(r=e.content.text);var i={content:r,errorMessage:n};return i},e}();t.HTTPResolverImpl=Y;var H=function(){function e(){}return e.prototype.content=function(e){if("string"!=typeof e&&(e=""+e),!N.existsSync(e))return null;try{return N.readFileSync(e).toString()}catch(t){return null}},e.prototype.list=function(e){return N.readdirSync(e)},e.prototype.contentAsync=function(e){return new Promise(function(t,n){N.readFile(e,function(e,r){if(null!=e)return n(e);var i=r.toString();t(i)})})},e.prototype.listAsync=function(e){return new Promise(function(t,n){N.readdir(e,function(e,r){return null!=e?t(e):void n(r)})})},e}();t.FSResolverImpl=H;var $=function(e,t,n){if(t&&(t.startPosition>=e&&(t.startPosition+=n),t.endPosition>e&&(t.endPosition+=n),t.kind==w.Kind.MAPPING)){var r=t;$(e,r.key,n),$(e,r.value,n)}},G=function(e,t){for(var n="",r=e.start()-1;r>0;){var i=t[r];if(" "!=i&&"-"!=i)break;n=" "+n,r--}return n},X=function(){function e(e,t,n){this.rootPath=e,this.resolver=t,this._httpResolver=n,this.listeners=[],this.tlisteners=[],this.pathToUnit={},this.failedUnits={},this._fsEnabled=!0,this._namespaceResolver=new k.NamespaceResolver,null==this.resolver?this.resolver=new H:this._fsEnabled=!1,null==this._httpResolver&&(this._httpResolver=new Y)}return e.prototype.getRootPath=function(){return this.rootPath},e.prototype.setFSResolver=function(e){this.resolver=e},e.prototype.setHTTPResolver=function(e){this._httpResolver=e},e.prototype.fsEnabled=function(){return this._fsEnabled},e.prototype.cloneWithResolver=function(t,n){void 0===n&&(n=null);var r=new e(this.rootPath,t,n?n:this._httpResolver);for(var i in this.pathToUnit)r.pathToUnit[i]=this.pathToUnit[i].cloneToProject(r);return r},e.prototype.setCachedUnitContent=function(e,t,n){void 0===n&&(n=!0);var r=e,i=S.toAbsolutePath(this.rootPath,e),a=new K(r,t,n,this,i);return this.pathToUnit[i]=a,a},e.prototype.resolveAsync=function(e,t){var n=this;if(!t)return Promise.reject(new F("Unit path is null"));var r=O.getIncludeReference(t),i=t;r&&(t=r.getIncludePath());var a=S.buildPath(t,e,this.rootPath);if(r){var o,s=S.toAbsolutePath(b.dirname(S.toAbsolutePath(this.rootPath,e)),r.encodedName());this.pathToUnit[a]?Promise.resolve(o).then(function(e){return n.pathToUnit[s]=new K(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]}):this.unitAsync(a,!0).then(function(e){return n.pathToUnit[a]=e,n.pathToUnit[s]=new K(r.encodedName(),O.resolveContents(i,n.pathToUnit[a].contents()),!1,n,s),n.pathToUnit[s]})}return this.unitAsync(a,!0)},e.prototype.resolve=function(e,t){if(!t)return null;t=t.replace(/\\/g,"/");var n=O.getIncludeReference(t),r=t;n&&(t=n.getIncludePath());var i=S.buildPath(t,e,this.rootPath);if(n){this.pathToUnit[i]||(this.pathToUnit[i]=this.unit(i,!0));var a=this.pathToUnit[i],o=S.toAbsolutePath(b.dirname(S.toAbsolutePath(this.rootPath,e)),n.encodedName());return this.pathToUnit[o]?this.pathToUnit[o]:(this.pathToUnit[o]=new K(n.encodedName(),O.resolveContents(r,a&&a.contents()),!1,this,o),this.pathToUnit[o])}return this.unit(i,!0)},e.prototype.units=function(){var e=this;if(!this.resolver.list)throw new F("Provided FSResolver is unable to list files. Please, use ExtendedFSResolver.");var t=this.resolver.list(this.rootPath).filter(function(e){return".raml"==b.extname(e)});return t.map(function(t){return e.unit(t)}).filter(function(e){return e.isTopLevel()})},e.prototype.unitsAsync=function(){var e=this;return this.resolver.listAsync?this.resolver.listAsync(this.rootPath).then(function(t){var n=t.filter(function(e){return".raml"==b.extname(e)}).map(function(t){return e.unitAsync(t).then(function(e){return e.isTopLevel()?e:null},function(e){return null})});return Promise.all(n).then(function(e){return e.filter(function(e){return null!=e})})}):Promise.reject(new F("Provided FSResolver is unable to list files. Please, use ExtendedFSResolver."))},e.prototype.lexerErrors=function(){var e=[];return this.units().forEach(function(t){e=e.concat(t.lexerErrors())}),e},e.prototype.deleteUnit=function(e,t){void 0===t&&(t=!1);var n=null;n=S.isWebPath(e)?e:t?e:S.toAbsolutePath(this.rootPath,e),delete this.pathToUnit[n]},e.prototype.unit=function(e,t){if(void 0===t&&(t=!1),t||S.isWebPath(e)){if(null!=this.failedUnits[e]&&!this.failedUnits[e].inner)return null}else{var n=S.toAbsolutePath(this.rootPath,e);if(this.failedUnits[n]&&!this.failedUnits[e].inner)return null}var r,i=null,a=e;if(S.isWebPath(e)){if(this.pathToUnit[a])return this.pathToUnit[a];if(this._httpResolver){if(r=this._httpResolver.getResource(e),r&&r.errorMessage)throw new F(r.errorMessage);i=r?r.content:null}else r=(new Y).getResource(a),i=r?r.content:null}else{"/"!=e.charAt(0)||t||(e=e.substr(1));var a=S.toAbsolutePath(this.rootPath,e);if(this.pathToUnit[a])return this.pathToUnit[a];if(S.isWebPath(a))if(this._httpResolver){var o=this._httpResolver.getResource(a);if(o&&o.errorMessage)throw new F(o.errorMessage);i=o?o.content:null}else{var s=(new Y).getResource(a);i=s?s.content:null}else i=this.resolver.content(a)}if(null==i)return null;var u=P.stringStartsWith(i,"#%RAML"),l=S.isWebPath(this.rootPath)==S.isWebPath(a)?b.relative(this.rootPath,a):a,p=new K(l,i,u,this,a);return this.pathToUnit[a]=p,r&&(r.callback=function(e){p.updateContent(e&&e.content)}),p},e.prototype.unitAsync=function(e,t){var n=this;void 0===t&&(t=!1);var r=null,i=e;if(S.isWebPath(e)){if(this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new F(e.errorMessage)):e.content})}else r=(new Y).getResourceAsync(i)}else{if("/"!=e.charAt(0)||t||(e=e.substr(1)),i=t?e:S.toAbsolutePath(this.rootPath,e),this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(S.isWebPath(i))if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new F(e.errorMessage)):e.content})}else r=(new Y).getResourceAsync(i);else r=this.resolver.contentAsync(i)}if(null==r)return Promise.resolve(null);var o=S.isWebPath(this.rootPath)==S.isWebPath(i)?b.relative(this.rootPath,i):i;return r.then(function(e){if(null==e)return Promise.reject(new F("Can note resolve "+i));var t=P.stringStartsWith(e,"#%RAML"),r=new K(o,e,t,n,i);return n.pathToUnit[i]=r,r},function(e){return"object"==typeof e&&e instanceof F?Promise.reject(e):Promise.reject(new F(e.toString()))}).then(function(e){return e.isRAMLUnit()?e:D.isScheme(e.contents())?D.startDownloadingReferencesAsync(e.contents(),e):e})},e.prototype.visualizeNewlines=function(e){for(var t="",n=0;n1&&r[1].trim().length>0){var i=s(r[1]);return n+i}return n+" "},e.prototype.startIndent=function(e){e.unit().contents();if(e==e.root())return"";var t=a(e.dump());if(t.length>0){console.log("FIRST: "+t[0]);var n=s(t[0]);return n+" "}return""},e.prototype.canWriteInOneLine=function(e){return!1},e.prototype.isOneLine=function(e){return e.text().indexOf("\n")<0},e.prototype.recalcPositionsUp=function(e){for(var t=e;t;)t.recalcEndPositionFromChilds(),t=t.parent()},e.prototype.add2=function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.unit(),o=(e.root(),null);if(r&&(z.isInstance(r)&&(o=r),Q.isInstance(r)&&(o=r.point)),e.isValueInclude()){var s=e.children();if(0==s.length)throw new F("not implemented: insert into empty include ref");var u=s[0].parent();return void this.add2(u,t,n,o,i)}var l=(new I.TextRange(a.contents(),t.start(),t.end()),new I.TextRange(a.contents(),e.start(),e.end()),e.unit().contents());e.valueKind()==w.Kind.SEQ&&(e=d(e.valueAsSeq(),e,e.unit()));var i=this.isJson(e),p=i?"":this.indent(e.isSeq()?e.parent():e),c=p,f=p.length,h=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value);n=n,n&&(i||h&&(c+=" ",f+=2));var m=new B(c);t.markupNode(m,t._actualNode(),0,i);var y=m.text;if(n){var v=I.trimEnd(y),g=y.length-v.length;if(g>0){var A=y.length;y=y.substring(0,A-g),t.shiftNodes(A-g,-g)}}n&&!i?(t.highLevelNode(),e.isMapping(),y=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value)?p+"- "+y:p+y):y=p+y;var E=e.end();if(o)o!=e?E=o.end():i&&n||(E=e.keyEnd()+1,E=new I.TextRange(l,E,E).extendAnyUntilNewLines().endpos());else if(i&&n){var T=e.asSeq();T&&(E=T.items.length>0?T.items[T.items.length-1].endPosition:T.endPosition-1)}else if(r&&Q.isInstance(r)){var S=r;S.type==J.START&&(E=e.keyEnd()+1,E=new I.TextRange(l,E,E).extendAnyUntilNewLines().endpos())}var b=new I.TextRange(l,0,E);if(E=b.extendToNewlines().reduceSpaces().endpos(),i&&e.isSeq()){var T=e.asSeq();T.items.length>0&&(y=", "+y,f+=2)}else E>0&&"\n"!=l[E-1]&&(y="\n"+y,f++);var _=0;n&&!i&&(y+="\n",_++);var N=l.substring(0,E)+y+l.substring(E,l.length),R=a;if(R.updateContentSafe(N),this.executeReplace(new I.TextRange(l,E,E),y,R),e.root().shiftNodes(E,f+(t.end()-t.start())+_),o){for(var s=e.children(),M=-1,C=0;C=0?e.addChild(t,M+1):e.addChild(t)}else e.addChild(t);t.shiftNodes(0,E+f),this.recalcPositionsUp(e),t.setUnit(e.unit()),t.visit(function(t){var n=t;return n.setUnit(e.unit()),!0})},e.prototype.isJsonMap=function(e){if(!e.isMap())return!1;var t=e.text().trim();return t.length>=2&&"{"==t[0]&&"}"==t[t.length-1]},e.prototype.isJsonSeq=function(e){if(!e.isSeq())return!1;var t=e.text().trim();return t.length>=2&&"["==t[0]&&"]"==t[t.length-1]},e.prototype.isJson=function(e){return this.isJsonMap(e)||this.isJsonSeq(e)},e.prototype.remove=function(e,t,n){var r=n.parent();if(n._oldText=n.dump(),this.isOneLine(n)&&n.isMapping()&&n.parent().isMap()){var i=n.parent();if(1==i.asMap().mappings.length&&null!=i.parent())return void this.remove(e,i.parent(),i)}if(this.isOneLine(n)&&n.isScalar()&&n.parent().isSeq()){var a=n.parent(),o=a.asSeq();if(1==o.items.length)return void this.remove(e,a.parent(),a)}if(t.isMapping()&&n.isSeq()){var s=t.parent();return void this.remove(e,s,t)}var u=new I.TextRange(e.contents(),n.start(),n.end()),l=(new I.TextRange(e.contents(),t.start(),t.end()),new I.TextRange(e.contents(),r.start(),r.end()),u.startpos());if(t.isSeq()){var p=n.isSeq()?n:n.parentOfKind(w.Kind.SEQ);u=p&&this.isJson(p)?u.extendSpaces().extendCharIfAny(",").extendSpaces():u.extendToStartOfLine().extendAnyUntilNewLines().extendToNewlines(); -}t.isMap()&&(u=u.trimEnd().extendAnyUntilNewLines().extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack()),t.kind()==w.Kind.MAPPING&&(this.isJson(n)&&this.isOneLine(n)||(u=u.extendSpacesUntilNewLines(),u=u.extendToNewlines(),u=u.extendToStartOfLine().extendUntilNewlinesBack())),n.isSeq()&&(u=u.reduceSpaces());var c=e;c.updateContentSafe(u.remove()),this.executeReplace(u,"",c),n.parent().removeChild(n);var f=-u.len();t.root().shiftNodes(l,f),this.recalcPositionsUp(t)},e.prototype.changeKey=function(e,t,n){var r=new I.TextRange(t.unit().contents(),t.keyStart(),t.keyEnd());if(t.kind()==w.Kind.MAPPING){var i=t._actualNode().key;i.value=n,i.endPosition=i.startPosition+n.length}var a=e;this.executeReplace(r,n,a);var o=n.length-r.len();t.root().shiftNodes(r.startpos(),o,t),this.recalcPositionsUp(t)},e.prototype.executeReplace=function(e,t,n){var r=new S.TextChangeCommand(e.startpos(),e.endpos()-e.startpos(),t,n);n.project();try{this.tlisteners.forEach(function(e){return e(r)})}catch(i){return!1}var a=e.replace(t);return n.updateContentSafe(a),!0},e.prototype.changeValue=function(e,t,n){var r,i=new I.TextRange(t.unit().contents(),t.start(),t.end()),a=0,o=0,s=null,u=null;if(t.kind()==w.Kind.SCALAR){if("string"!=typeof n)throw new F("not implemented");t.asScalar().value=n,r=n}else if(t.kind()==w.Kind.MAPPING){if(u=t.asMapping(),t.isValueInclude()){var l=t.valueAsInclude(),p=l.value,f=p,d=t.unit().resolve(f);if(null==d)return void console.log("attr.setValue: couldn't resolve: "+f);if(d.isRAMLUnit())return;return void(O.getIncludeReference(p)||d.updateContent(n))}if(i=u.value?i.withStart(t.valueStart()).withEnd(t.valueEnd()):i.withStart(t.keyEnd()+1).withEnd(t.keyEnd()+1),i=i.reduceNewlinesEnd(),null==n)r="",u.value=null;else if("string"==typeof n||null==n){var h=n,m=this.indent(t);if(h&&I.isMultiLine(h)&&(h=""+I.makeMutiLine(h,m.length/2)),r=h,u.value){if(u.value.kind==w.Kind.SEQ){console.log("seq value");u.value.items[0];throw"assign value!!!"}if(u.value.kind==w.Kind.SCALAR){var y=u.value,v=y.value||"";y.value=h,u.value.endPosition=u.value.startPosition+h.length,u.endPosition=u.value.endPosition,o+=h.length-v.length}}else if(console.log("no value"),u.value=w.newScalar(h),u.value.startPosition=t.keyEnd()+1,u.value.endPosition=u.value.startPosition+h.length,u.endPosition=u.value.endPosition,e.contents().length>t.keyEnd()+1){var g=t.keyEnd()+1;":"==e.contents()[g-1]&&(r=" "+r,u.value.startPosition++,u.value.endPosition++,u.endPosition++,o++)}}else{var A=n;if(A.isMapping())n=c([A.asMapping()]),A=n;else if(!A.isMap())throw new F("only MAP/MAPPING nodes allowed as values");var E=new B("");A.markupNode(E,A._actualNode(),0,!0),r=""+E.text,A.shiftNodes(0,i.startpos()+o),s=A}}else console.log("Unsupported change value case: "+t.kindName());var T=e;this.executeReplace(i,r,T);var S=r.length-i.len();t.root().shiftNodes(i.endpos()+a,S,t),s&&(u.value=s._actualNode()),this.recalcPositionsUp(t)},e.prototype.initWithRoot=function(e,t){var n=e.end();t.markup(!1),t._actualNode().startPosition=n,t._actualNode().endPosition=n,t.setUnit(e.unit())},e.prototype.execute=function(e){var t=this;e.commands.forEach(function(e){switch(e.kind){case S.CommandKind.CHANGE_VALUE:var n=e.target,r=n.value();r||(r="");var i=e.value;if(console.log("set value: "+typeof r+" ==> "+typeof i),"string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"!=typeof i)if("string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r||"string"==typeof i)if("string"!=typeof r&&"string"==typeof i){var a=e.value;if(r.kind()!=w.Kind.MAPPING)throw new F("unsupported case: attribute value conversion: "+typeof r+" ==> "+typeof i+" not supported");I.isMultiLine(a)?(n.children().forEach(function(e){t.remove(n.unit(),n,e)}),t.changeValue(n.unit(),n,a)):t.changeKey(n.unit(),r,a)}else{if("string"==typeof r||"string"==typeof i)throw new F("shouldn't be this case: attribute value conversion "+typeof r+" ==> "+typeof i+" not supported");var o=i;if(o.isMapping()&&(i=c([o.asMapping()])),r==i)break;var s=i;s.asMap();n.children().forEach(function(e){t.remove(n.unit(),n,e)}),s.children().forEach(function(e){}),t.changeValue(n.unit(),n,i)}else t.changeValue(n.unit(),n,i);else r!=i&&t.changeValue(n.unit(),n,i);return;case S.CommandKind.CHANGE_KEY:var n=e.target;return void t.changeKey(n.unit(),n,e.value);case S.CommandKind.ADD_CHILD:var n=e.target,u=e.value;return void t.add2(n,u,e.toSeq,e.insertionPoint);case S.CommandKind.REMOVE_CHILD:var l=e.target,s=e.value;return void t.remove(l.unit(),l,s);case S.CommandKind.INIT_RAML_FILE:var p=e.target,f=e.value;return void t.initWithRoot(p,f);default:return void console.log("UNSUPPORTED COMMAND: "+S.CommandKind[e.kind])}})},e.prototype.replaceYamlNode=function(e,t,n,r,i){var a=w.load(t,{ignoreDuplicateKeys:!0});this.updatePositions(e.start(),a),e.root().shiftNodes(n,r);var o=e.parent(),s=e._actualNode(),u=s.parent;if(a.parent=u,o&&o.kind()==w.Kind.MAP){var l=o._actualNode();l.mappings=l.mappings.map(function(e){return e!=s?e:a})}e.updateFrom(a),this.recalcPositionsUp(e)},e.prototype.executeTextChange2=function(e){var t=e.unit,n=t.contents(),r=e.target;if(r){var i=n.substring(r.start(),r.end());n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);var a=i.substr(0,e.offset-r.start())+e.text+i.substr(e.offset-r.start()+e.replacementLength);if(t.updateContentSafe(n),e.offset>r.start())try{var o=e.text.length-e.replacementLength,s=e.offset;r.unit().project().replaceYamlNode(r,a,s,o,e.unit)}catch(u){console.log("New node contents (causes error below): \n"+a),console.log("Reparse error: "+u.stack)}}else n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);t.updateContent(n),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})},e.prototype.executeTextChange=function(e){(new Date).getTime();try{var t=e.unit.contents(),n=e.target;null==n&&(n=this.findNode(e.unit.ast(),e.offset,e.offset+e.replacementLength));var r=e.unit;if(n){var a=t.substring(n.start(),n.end()),o=t;t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);var s=a.substr(0,e.offset-n.start())+e.text+a.substr(e.offset-n.start()+e.replacementLength);r.updateContentSafe(t);u(o,e);if(e.offset>n.start())try{var l=w.load(s,{ignoreDuplicateKeys:!0});this.updatePositions(n.start(),l);var p=e.text.length-e.replacementLength;if(e.unit.ast().shiftNodes(e.offset,p),null!=l&&l.kind==w.Kind.MAP){var c=l.mappings[0],f=n._actualNode(),d=f.parent,h=new S.ASTDelta,m=e.unit;if(h.commands=[new S.ASTChangeCommand(S.CommandKind.CHANGE_VALUE,new z(i(f),m,null,null,null),new z(c,m,null,null,null),0)],d&&d.kind==w.Kind.MAP){var y=d;y.mappings=y.mappings.map(function(e){return e!=f?e:c})}return c.parent=d,this.recalcPositionsUp(n),n.updateFrom(c),this.listeners.forEach(function(e){e(h)}),void this.tlisteners.forEach(function(t){t(e)})}}catch(v){console.log("New node contents (causes error below): \n"+s),console.log("Reparse error: "+v.stack)}}else t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);(new Date).getTime(); -//!find node in scope -r.updateContent(t),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})}finally{(new Date).getTime()}},e.prototype.updatePositions=function(e,t){var n=this;if(null!=t)switch(-1==t.startPosition?t.startPosition=e:t.startPosition=e+t.startPosition,t.endPosition=e+t.endPosition,t.kind){case w.Kind.MAP:var r=t;r.mappings.forEach(function(t){return n.updatePositions(e,t)});break;case w.Kind.MAPPING:var i=t;this.updatePositions(e,i.key),this.updatePositions(e,i.value);break;case w.Kind.SCALAR:break;case w.Kind.SEQ:var a=t;a.items.forEach(function(t){return n.updatePositions(e,t)})}},e.prototype.findNode=function(e,t,n){var r=this;if(null==e)return null;var i=e;if(e.start()<=t&&e.end()>=n){var a=e;return i.directChildren().forEach(function(e){var i=r.findNode(e,t,n);i&&(a=i)}),a}return null},e.prototype.addTextChangeListener=function(e){this.tlisteners.push(e)},e.prototype.removeTextChangeListener=function(e){this.tlisteners=this.tlisteners.filter(function(t){return t!=e})},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners=this.listeners.filter(function(t){return t!=e})},e.prototype.namespaceResolver=function(){return this._namespaceResolver},e}();t.Project=X;var z=function(){function e(e,t,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o=!1),this._node=e,this._unit=t,this._parent=n,this._anchor=r,this._include=i,this.cacheChildren=a,this._includesContents=o,this._errors=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&R.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.actual=function(){return this._node},e.prototype.yamlNode=function(){return this._node},e.prototype.includesContents=function(){return this._includesContents},e.prototype.setIncludesContents=function(e){this._includesContents=e},e.prototype.gatherIncludes=function(t,n,r,i){var a=this;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!0),null!=this._node){var o=this._node.kind;if(o!=w.Kind.SCALAR)if(o==w.Kind.MAP){var s=this._node;1!=s.mappings.length||i?s.mappings.map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)}):new e(s.mappings[0].value,this._unit,this,n,r,this.cacheChildren).gatherIncludes(t)}else if(o==w.Kind.MAPPING){var u=this._node;null==u.value||new e(u.value,this._unit,this,r?r:this._anchor,n?n:this._include,this.cacheChildren).gatherIncludes(t)}else if(o==w.Kind.SEQ){var l=this._node;l.items.filter(function(e){return null!=e}).map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)})}else o==w.Kind.INCLUDE_REF&&this._unit&&t.push(this);else if(D.isScheme(this._node.value)){var p=D.getReferences(this._node.value,this.unit());p.forEach(function(n){var r=w.newScalar(n);r.kind=w.Kind.INCLUDE_REF;var i=new e(r,a.unit(),null,null,null);t.push(i)})}}},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.start=function(){return this._node.startPosition},e.prototype.errors=function(){return this._errors},e.prototype.addIncludeError=function(e){if(!R.find(this._errors,function(t){return t.message==e.message})){var t=this._node;t.includeErrors||(t.includeErrors=[]),R.find(t.includeErrors,function(t){return t.message==e.message})||(this._errors.push(e),t.includeErrors.push(e))}},e.prototype.parent=function(){return this._parent},e.prototype.recalcEndPositionFromChilds=function(){var e=(this.children(),this.children()[0]),t=this.children()[this.children().length-1];if(this.isMapping()){var n=this.asMapping();if(n.value)if(n.value.kind==w.Kind.MAP){var r=n.value;r.startPosition<0&&e&&(r.startPosition=e.start()),t&&(this._node.endPosition=t._node.endPosition),this._node.endPosition=Math.max(this._node.endPosition,n.value.endPosition)}else if(n.value.kind==w.Kind.SEQ){var i=n.value;if(i.startPosition<0&&i.items.length>0){var a=i.items[0].startPosition,o=new I.TextRange(this.unit().contents(),a,a);o=o.extendSpacesBack().extendCharIfAnyBack("-"),i.startPosition=o.startpos()}if(i.items.length>0){var s=i.items[i.items.length-1];this._node.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition),i.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition)}}else n.value.kind==w.Kind.SCALAR||t&&(this._node.endPosition=t._node.endPosition)}else t&&(this._node.endPosition=t._node.endPosition)},e.prototype.isValueLocal=function(){if(this._node.kind==w.Kind.MAPPING){var e=this._node.value.kind;return e!=w.Kind.INCLUDE_REF&&e!=w.Kind.ANCHOR_REF}return!0},e.prototype.keyStart=function(){return this._node.kind==w.Kind.MAPPING?this._node.key.startPosition:-1},e.prototype.keyEnd=function(){return this._node.kind==w.Kind.MAPPING?this._node.key.endPosition:-1},e.prototype.valueStart=function(){if(this._node.kind==w.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.startPosition:e.endPosition}return this._node.kind==w.Kind.SCALAR?this.start():-1},e.prototype.valueEnd=function(){if(this._node.kind==w.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.endPosition:e.endPosition}return this._node.kind==w.Kind.SCALAR?this.end():-1},e.prototype.end=function(){return this._node.endPosition},e.prototype.dump=function(){if(this._oldText)return this._oldText;if(this._unit&&this._node.startPosition>0&&this._node.endPosition>0){var e=this._unit.contents().substring(this._node.startPosition,this._node.endPosition);return e=o(e,G(this,this._unit.contents()))}return w.dump(this.dumpToObject(),{})},e.prototype.dumpToObject=function(e){return void 0===e&&(e=!1),this.dumpNode(this._node,e)},e.prototype.dumpNode=function(e,t){var n=this;if(void 0===t&&(t=!1),!e)return null;if(e.kind==w.Kind.INCLUDE_REF){if(this._unit){var r=e,i=r.value,a=null;try{a=this._unit.resolve(i)}catch(o){}if(null==a)return null;if(a.isRAMLUnit()&&this.canInclude(a)){var s=this.unit(),u=a;u.addIncludedBy(s.absolutePath()),s.getIncludedByPaths().forEach(function(e){u.addIncludedBy(e)});var p=a.ast();if(p)return p.dumpToObject(t)}else if(this.canInclude(a))return a.contents()}return null}if(e.kind==w.Kind.SEQ){var c=e,f=[];return c.items.forEach(function(e){return f.push(n.dumpNode(e,t))}),f}if(e.kind==w.Kind.ANCHOR_REF){var d=e;return this.dumpNode(d.value,t)}if(e.kind==w.Kind.MAPPING){var h=e,m={},y=h.value,v=this.dumpNode(y,t);return m[""+this.dumpNode(h.key,t)]=v,m}if(e.kind==w.Kind.SCALAR){var r=e,g=r.value;return r.plainScalar&&(g=l(g)),g}if(e.kind==w.Kind.MAP){var A=e,E={};return A.mappings&&A.mappings.forEach(function(e){var r=n.dumpNode(e.value,t);null==r&&(r=t?"!$$$novalue":r),E[n.dumpNode(e.key,t)+""]=r}),E}},e.prototype.keyKind=function(){return this._node.key?this._node.key.kind:null},e.prototype._actualNode=function(){return this._node},e.prototype.execute=function(e){this.unit()?this.unit().project().execute(e):e.commands.forEach(function(e){switch(e.kind){case S.CommandKind.CHANGE_VALUE:var t=e.target,n=e.value,r=t._actualNode();t.start();return void(r.kind==w.Kind.MAPPING&&(r.value=w.newScalar(""+n)));case S.CommandKind.CHANGE_KEY:var t=e.target,n=e.value,r=t._actualNode();if(r.kind==w.Kind.MAPPING){var i=r.key;i.value=n}return}})},e.prototype.updateFrom=function(e){this._node=e},e.prototype.isAnnotatedScalar=function(){if(!this.unit())return!1;for(var e,t=this;!e&&t;)e=t.highLevelNode(),t=t.parent();if(e){var n=void 0;if(e.isElement())n=e.asElement().definition();else{var r=e.property();n=r&&(r.domain()||r.range())}if(n){var i=n.universe().version();if("RAML08"==i)return!1}}var a;if(this.kind()==w.Kind.MAPPING&&this.valueKind()==w.Kind.MAP?a=this._node.value.mappings:null==this.key()&&this.kind()==w.Kind.MAP&&(a=this._node.mappings),a){var o=a.length>0;return a.forEach(function(e){"value"!==e.key.value&&(e.key.value&&"("==e.key.value.charAt(0)&&")"==e.key.value.charAt(e.key.value.length-1)||(o=!1))}),o}return!1},e.prototype.value=function(t){if(!this._node)return"";if(this._node.kind==w.Kind.SCALAR){if("~"===this._node.value&&null===this._node.valueObject)return t?"null":null;if(!t&&""+this._node.valueObject===this._node.value)return this._node.valueObject;var n=this._node.value;return t||this._node.plainScalar&&(n=l(n)),n}if(this._node.kind==w.Kind.ANCHOR_REF){var r=this._node;return new e(r.value,this._unit,this,null,null).value(t)}if(this._node.kind==w.Kind.MAPPING){var i=this._node;if(null==i.value)return null;if(this.isAnnotatedScalar())for(var a=new e(i.value,this._unit,this,null,null),o=a.children(),s=0;s=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else if(this.isMapping()){var i=this.asMapping(),a=i.value;if(!i.value&&n.isMap())return void(i.value=n._actualNode());if(i.value&&i.value.kind==w.Kind.SCALAR&&(i.value=null,a=null),a||(a=n.isScalar()||n.highLevelNode()&&n.highLevelNode().property().getAdapter(C.RAMLPropertyParserService).isEmbedMap()?w.newSeq():w.newMap(),i.value=a),a.kind==w.Kind.MAP){var r=a;(null==r.mappings||void 0==r.mappings)&&(r.mappings=[]),n.isScalar(),t>=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else{if(a.kind!=w.Kind.SEQ)throw new F("Insert into mapping with "+w.Kind[i.value.kind]+" value not supported");var o=a;t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}}else{if(!this.isSeq())throw new F("Insert into "+this.kindName()+" not supported");var o=this.asSeq();t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}},e.prototype.removeChild=function(e){this._oldText=null;var t,n,r=e;if(this.kind()==w.Kind.SEQ){var i=this.asSeq();t=r._node,n=i.items.indexOf(t),n>-1&&i.items.splice(n,1)}else if(this.kind()==w.Kind.MAP){var a=this.asMap();t=r.asMapping(),n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1)}else{if(this.kind()!=w.Kind.MAPPING)throw new F("Delete from "+w.Kind[this.kind()]+" unsupported");var o=this.asMapping();if(r._actualNode()==o.value)o.value=null;else{var a=o.value;t=r.asMapping(),a&&a.mappings&&(n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1))}}},e.prototype.hasInnerIncludeError=function(){return this.innerIncludeErrors},e.prototype.includeErrors=function(){if(this._node.kind==w.Kind.MAPPING){var t=this._node;if(null==t.value)return[];var n=new e(t.value,this._unit,this,this._anchor,this._include),r=n.includeErrors();return this.innerIncludeErrors=n.hasInnerIncludeError(),r}var i=[];if(this._node.kind==w.Kind.INCLUDE_REF){var t=this._node;if(null==t.value)return[];var a=this.includePath(),o=null;try{o=this._unit.resolve(a)}catch(s){this.innerIncludeErrors=s.inner;var u="Can not resolve "+a+" due to: "+s.message;return i.push(u),i}var l=this._node.includeErrors;if(l&&l.length>0)return this.innerIncludeErrors=!0,i=l.map(function(e){return"object"==typeof e&&e instanceof s?e.message:e.toString()});if(null==o)return i.push("Can not resolve "+a),i;if(o.isRAMLUnit()){var p=o.ast();if(p)return[];i.push(""+a+" can not be parsed")}}return i},e.prototype.joinMappingsWithFullIncludeAnchor=function(t,n,r){var i=this,a=R.find(t,function(e){return e.key&&e.value&&e.key.kind==w.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==w.Kind.ANCHOR_REF});if(!a)return t.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});var o=R.filter(t,function(e){return!(e.key.kind==w.Kind.SCALAR&&"<<"==e.key.value&&e.value.kind==w.Kind.ANCHOR_REF)}),s=new e(a.value,this._unit,this,n,r,this.cacheChildren).children(null,null,!0),u=o.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});return u.concat(s)},e.prototype.children=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),null==this._node)return[];if(this.cacheChildren&&this._children)return this._children;var a,o=this._node.kind;if(o==w.Kind.SCALAR)a=[];else if(o==w.Kind.MAP){var s=this._node;a=1!=s.mappings.length||r?this.joinMappingsWithFullIncludeAnchor(s.mappings,t,n):new e(s.mappings[0].value,this._unit,this,t,n,this.cacheChildren).children(null,null,!0)}else if(o==w.Kind.MAPPING){var u=this._node;if(null==u.value)a=[];else{var l=new e(u.value,this._unit,this,n?n:this._anchor,t?t:this._include,this.cacheChildren);a=l.children(),l.includesContents()&&this.setIncludesContents(!0)}}else if(o==w.Kind.SEQ){var p=this._node;a=p.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include,i.cacheChildren)})}else if(o==w.Kind.INCLUDE_REF){if(this._unit){var c=this.includePath(),f=null;try{f=this._unit.resolve(c)}catch(d){}if(null==f)a=[];else if(f.isRAMLUnit())if(this.canInclude(f)){var h=this.unit(),m=f;m.addIncludedBy(h.absolutePath()),h.getIncludedByPaths().forEach(function(e){m.addIncludedBy(e)});var y=f.ast();y&&(this.cacheChildren&&(y=v(y)),a=f.ast().children(this,null),this.setIncludesContents(!0))}else this.addIncludeError&&this.addIncludeError(new d("Recursive definition"))}a||(a=[])}else{if(o!=w.Kind.ANCHOR_REF)throw new d("Should never happen; kind : "+w.Kind[this._node.kind]);var g=this._node;a=new e(g.value,this._unit,this,null,null,this.cacheChildren).children()}return this.cacheChildren&&(this._children=a),a},e.prototype.canInclude=function(e){for(var t=this.includedFrom();null!=t;){if(t.unit().absolutePath()==e.absolutePath())return!1;t=t.includedFrom()}return!this.unit().includedByContains(e.absolutePath())},e.prototype.directChildren=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),this._node){switch(this._node.kind){case w.Kind.SCALAR:return[];case w.Kind.MAP:var a=this._node;return 1!=a.mappings.length||r?a.mappings.map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)}):new e(a.mappings[0].value,this._unit,this,t,n).directChildren(null,null,!0);case w.Kind.MAPPING:var o=this._node;return null==o.value?[]:new e(o.value,this._unit,this,n?n:this._anchor,t?t:this._include).directChildren();case w.Kind.SEQ:var s=this._node;return s.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)});case w.Kind.INCLUDE_REF:return[];case w.Kind.ANCHOR_REF:return[]}throw new F("Should never happen; kind : "+w.Kind[this._node.kind])}return[]},e.prototype.anchorId=function(){return this._node.anchorId},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this.valueKind()==w.Kind.INCLUDE_REF?this.unit().resolve(this._node.value.value):this.kind()==w.Kind.INCLUDE_REF?this.unit().resolve(this._node.value):this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.setUnit=function(e){this._unit=e},e.prototype.includePath=function(){var e=this.getIncludeString();return e?e:null},e.prototype.includeReference=function(){var e=this.getIncludeString();return e?O.getIncludeReference(e):null},e.prototype.getIncludeString=function(){if(!this._node)return null;if(this._node.kind==w.Kind.INCLUDE_REF){var t=this._node.value;return t}if(this._node.kind==w.Kind.MAPPING){var n=this._node;return null==n.value?null:new e(n.value,this._unit,this,null,null).getIncludeString()}if(this._node.kind==w.Kind.ANCHOR_REF){var r=this._node.value;return new e(r,this._unit,this,null,null).getIncludeString()}return null},e.prototype.anchoredFrom=function(){return this._anchor},e.prototype.includedFrom=function(){return this._include},e.prototype.kind=function(){return this._actualNode().kind},e.prototype.valueKind=function(){if(this._node.kind!=w.Kind.MAPPING)return null;var e=this._node;return e.value?e.value.kind:null},e.prototype.anchorValueKind=function(){if(this.valueKind()==w.Kind.ANCHOR_REF){var e=this._node.value;return e&&e.value&&e.value.kind}return null},e.prototype.resolvedValueKind=function(){var e=this.valueKind();if(e==w.Kind.ANCHOR_REF){var t=this.anchorValueKind();if(t==w.Kind.INCLUDE_REF){var n=this._node.value,r=n.value.value;return this.unitKind(r)}return t}if(e==w.Kind.INCLUDE_REF){var r=this.includePath();return this.unitKind(r)}return e},e.prototype.unitKind=function(e){var t;try{t=this._unit.resolve(e)}catch(n){return null}if(null==t)return w.Kind.SCALAR;if(t.isRAMLUnit()){var r=t.ast();if(r)return r.kind()}return w.Kind.SCALAR},e.prototype.valueKindName=function(){var e=this.valueKind();return void 0!=e?w.Kind[e]:null},e.prototype.kindName=function(){return w.Kind[this.kind()]},e.prototype.indent=function(e,t){void 0===t&&(t="");for(var n="",r=0;e>r;r++)n+=" ";return n+t},e.prototype.replaceNewlines=function(e,t){void 0===t&&(t=null);for(var n="",r=0;rr&&(a+="..."),a=this.replaceNewlines(a)},e.prototype.nodeShortText=function(e,t,n){void 0===n&&(n=50);var r=e.endPosition-e.startPosition,i=r,a=this.unit();!t&&a&&(t=a.contents());var o;if(t){var s=t;o=s?s.substring(e.startPosition,e.endPosition):"[no-text]"}else o="[no-unit]";return o="["+e.startPosition+".."+e.endPosition+"] "+r+" // "+o+" //",r>i&&(o+="..."),o=this.replaceNewlines(o)},e.prototype.show=function(e,t,n){void 0===e&&(e=null),void 0===t&&(t=0),void 0===n&&(n=null),e&&0==t&&console.log(e);var r=this.children(),i=this.kindName(),a=this._actualNode().value;this.kind()==w.Kind.MAPPING&&(i+="["+this._actualNode().key.value+"]"),i+=a?"/"+w.Kind[a.kind]:"",0==r.length?(console.log(this.indent(t)+i+" // "+this.shortText(n)),this.isMapping()&&this.asMapping().value&&console.log(this.indent(t+1)+"// "+this.valueKindName()+": "+this.nodeShortText(this.asMapping().value,n))):(console.log(this.indent(t)+i+" { // "+this.shortText(n)),this.isMapping()&&this.asMapping().value&&console.log(this.indent(t+1)+"// "+this.valueKindName()+": "+this.nodeShortText(this.asMapping().value,n)),r.forEach(function(e){var r=e;r.show(null,t+1,n)}),console.log(this.indent(t)+"}"))},e.prototype.showParents=function(e,t){void 0===t&&(t=0),e&&0==t&&console.log(e);var n=0;if(this.parent()){var r=this.parent();n=r.showParents(null,t+1)}var i=this.kindName(),a=this._actualNode().value;return i+=a?"/"+w.Kind[a.kind]:"/null",console.log(this.indent(n)+i+" // "+this.shortText(null)),n+1},e.prototype.inlined=function(e){return e==w.Kind.SCALAR||e==w.Kind.INCLUDE_REF},e.prototype.markupNode=function(e,t,n,r){void 0===r&&(r=!1);var i=e.text.length;switch(t.kind){case w.Kind.MAP:r&&e.append("{");for(var o=t.mappings,s=0;s0&&e.append(", "),this.markupNode(e,o[s],n,r);r&&e.append("}");break;case w.Kind.SEQ:for(var u=t.items,s=0;s0}function i(e){f.push(e)}function a(e){d[e]=!0}function o(e){delete d[e],f.forEach(function(t){return t(e)})}function s(e){return d[e]?!0:!1}function u(e,t){c.set(e,t)}function l(e){return c.get(e)}n(65);n(66),n(72);var p=n(74),c=p(50);t.hasAsyncRequests=r,t.addLoadCallback=i;var f=[],d={};t.addNotify=a,t.removeNotity=o,t.isWaitingFor=s,t.set=u,t.get=l},function(e,t,n){"use strict";function r(e){if(!e)return e;var t=e.indexOf("#");return-1==t?e:e.substring(0,t)}function i(e){if(!e)return null;"string"!=typeof e&&(e=""+e);var t=e.indexOf("#");if(-1==t)return null;var n=t==e.length-1?"":e.substring(t+1,e.length),i=n.split("/");return 0==i.length?null:(""==i[0].trim()&&i.splice(0,1),new h(n,r(e),i))}function a(){return[new m,new v]}function o(e,t){if(!e)return t;var n=i(e);if(!n)return t;var a=r(e);return s(a,n,t).content}function s(e,t,n){var r=c.find(a(),function(t){return t.isApplicable(e,n)});return r?r.resolveReference(n,t):{content:n,validation:[]}}function u(e,t,n){if(!n)return[];var r=c.find(a(),function(t){return t.isApplicable(e,n)});return r?r.completeReference(n,t):[]}function l(e,t){return e&&t?e.lastIndexOf(t)===e.length-t.length:!1}function p(e,t){for(var n=e.getElementsByTagName(t),r=[],i=0;i");if(v>0&&h.length>v+2){var g=h.charAt(v+2);"\n"!=g&&(m=h.slice(0,v+2)+"\n"+h.slice(v+2))}return{content:m,validation:[]}}catch(A){console.log(A)}return{content:e,validation:[]}},e.prototype.completeReference=function(e,t){try{var n=new f(y).parseFromString(e),r=[],i=p(n,"xs:schema")[0],a=p(i,"xs:element"),o=p(i,"xs:complexType");a.forEach(function(e){return r.push(e.getAttribute("name"))}),o.forEach(function(e){return r.push(e.getAttribute("name"))});var s=0===t.asString().trim().length;return s?r:r.filter(function(e){return 0===e.indexOf(t.asString())})}catch(u){return[]}},e}()},function(e,t,n){"use strict";function r(e){return e instanceof E.ApiImpl||e instanceof T.ApiImpl?(new C).expandTraitsAndResourceTypes(e):null}function i(e){return(new L).expandLibraries(e)}function a(e){return(new L).expandLibrary(e)}function o(e,t,n){var r=y.fromUnit(e);if(!r)throw new Error("couldn't load api from "+e.absolutePath());if(!t||0==t.length)return r;for(var i=[],a=0;a0&&(l[e.method()]=t)});var c,f=t.type();if(null!=f){var d=u(i);c=this.readGenerictData(e,f,t.highLevel(),"resource type",r,d)}var h={resourceType:c,traits:s,methodTraits:l};if(n.push(h),c){var m=c.node,v=y.qName(m.highLevel(),e.highLevel());a[v]?h.resourceType=null:(a[v]=!0,this.collectResourceData(e,m,n,c.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){var i=this;void 0===r&&(r={}),n=n.concat([e.highLevel()]);for(var a=[],o=-1;oo?null:a[o],p=s?s.node:e,c=s?s.unitsChain:u(n),f=s?s.transformer:t;p.is&&p.is().forEach(function(t){var n=l(c,t.highLevel()),o=i.readGenerictData(e,t,p.highLevel(),"trait",f,n);if(o){var s=o.name;r[s]=!0,a.push(o)}})}return a},e.prototype.readGenerictData=function(e,t,n,r,i,a){void 0===a&&(a=[]);var o=t.value(),s=S.plural(M.camelCase(r));if("string"==typeof o){i&&(o=i.transform(o).value);var u=N.getDeclaration(o,s,a);if(u){var l=u.wrapperNode();return{name:o,transformer:null,parentTransformer:i,node:l,ref:t,unitsChain:a}}}else if(y.StructuredValue.isInstance(o)){var p=o,c=p.valueName();i&&(c=i.transform(c).value);var f={},d={},u=N.getDeclaration(c,s,a);if(u){var l=u.wrapperNode();"RAML08"==this.ramlVersion?p.children().forEach(function(e){return f[e.valueName()]=e.lowLevel().value()}):p.children().forEach(function(e){var t=e.lowLevel();t.resolvedValueKind()==v.Kind.SCALAR?f[e.valueName()]=t.value():d[e.valueName()]=t});var h=new U(e,null,a);Object.keys(f).forEach(function(e){var t=h.transform(f[e]);t&&"object"!=typeof t&&(f[e]=t)});var m=new x(r,c,a,f,d,i),g=new U(null,m,a);return{name:c,transformer:g,parentTransformer:i,node:l,ref:t,unitsChain:a}}}return null},e}();t.TraitsAndResourceTypesExpander=C;var L=function(){function e(){}return e.prototype.expandLibraries=function(e){var t=e;if(null==t)return null;A.LowLevelCompositeNode.isInstance(t.highLevel().lowLevel())&&(t=t.highLevel().lowLevel().unit().highLevel().asElement().wrapperNode());var n=new C,r=new N.ReferencePatcher,i=n.createHighLevelNode(t.highLevel(),!0,r,!0),a=n.expandHighLevelNode(i,r,t);return this.processNode(r,a.highLevel()),a},e.prototype.expandLibrary=function(e){var t=e;if(null==t)return null;A.LowLevelCompositeNode.isInstance(t.highLevel().lowLevel())&&(t=t.highLevel().lowLevel().unit().highLevel().asElement().wrapperNode());var n=new C,r=new N.ReferencePatcher,i=n.createHighLevelNode(t.highLevel(),!0,r,!0);r.process(i),r.expandLibraries(i);var a=i.wrapperNode();return a},e.prototype.processNode=function(e,t){if(null!=t){var n=t.getMaster();this.processNode(e,n),R.isOverlayType(t.definition())&&e.process(t),e.expandLibraries(t)}},e}();t.LibraryExpander=L,t.toUnits=p;var P=function(){function e(t,n){this.name=t,this.regexp=new RegExp(e.leftTransformRegexp.source+t+e.rightTransformRegexp.source),this.transformer=n}return e.leftTransformRegexp=/\s*!\s*/,e.rightTransformRegexp=/\s*$/,e}(),O=[new P("singularize",function(e){return S.singular(e)}),new P("pluralize",function(e){return S.plural(e)}),new P("uppercase",function(e){return e?e.toUpperCase():e}),new P("lowercase",function(e){return e?e.toLowerCase():e}),new P("lowercamelcase",function(e){return e?M.camelCase(e):e}),new P("uppercamelcase",function(e){if(!e)return e;var t=M.camelCase(e);return t[0].toUpperCase()+t.substring(1,t.length)}),new P("lowerunderscorecase",function(e){if(!e)return e;var t=M.snake(e);return t.toLowerCase()}),new P("upperunderscorecase",function(e){if(!e)return e;var t=M.snake(e);return t.toUpperCase()}),new P("lowerhyphencase",function(e){if(!e)return e;var t=M.param(e);return t.toLowerCase()}),new P("upperhyphencase",function(e){if(!e)return e;var t=M.param(e);return t.toUpperCase()})];t.getTransformNames=c,t.getTransformersForOccurence=f;var D=function(){function e(){this.buf=null}return e.prototype.append=function(e){""!==e&&(null!=this.buf?null!=e&&("string"!=typeof this.buf&&(this.buf=""+this.buf),this.buf+=e):""!==e&&(this.buf=e))},e.prototype.value=function(){return null!=this.buf?this.buf:""},e}(),x=function(){function e(e,t,n,r,i,a){this.templateKind=e,this.templateName=t,this.unitsChain=n,this.params=r,this.structuredParams=i,this.vDelegate=a}return e.prototype.transform=function(e,t,n,r){var i={},a=[];if("string"==typeof e){if(this.structuredParams&&g.stringStartsWith(e,"<<")&&g.stringEndsWith(e,">>")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,l=new D,p=0,c=u.indexOf("<<");c>=0;c=u.indexOf("<<",p)){l.append(u.substring(p,c));var d=c;if(c+="<<".length,p=this.paramUpperBound(u,c),-1==p)break;var h=u.substring(c,p);p+=">>".length;var m,o,y=u.substring(d,p),v=f(h);if(v.length>0){var A=h.indexOf("|");if(o=h.substring(0,A).trim(),m=this.params[o],m&&"string"==typeof m&&m.indexOf("<<")>=0&&this.vDelegate&&(m=this.vDelegate.transform(m,t,n,r).value),m){N.PatchedReference.isInstance(m)&&(m=m.value());for(var E=0,T=v;E=0&&this.vDelegate&&(m=this.vDelegate.transform(m,t,n,r).value);(null===m||void 0===m)&&(i[o]=!0,m=y),l.append(m)}return l.append(u.substring(p,u.length)),{value:l.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r>",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.anchorValueKind=function(e){var t=this.substitutionNode(e);return t&&t.valueKind()==v.Kind.ANCHOR_REF?t.anchorValueKind():null},e.prototype.resolvedValueKind=function(e){var t=this.substitutionNode(e);return t&&t.resolvedValueKind()},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e){var t=this.paramName(e);return t&&this.structuredParams[t]},e.prototype.paramName=function(e){var t=null;if(e.valueKind()==v.Kind.SCALAR){var n=(""+e.value()).trim();g.stringStartsWith(n,"<<")&&g.stringEndsWith(n,">>")&&(t=n.substring(2,n.length-2))}return t},e.prototype.definingUnitSequence=function(e){if(e.length<2)return null;if("("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),e.length<4)return null;if("<<"!=e.substring(0,2))return null;if(">>"!=e.substring(e.length-2,e.length))return null;var t=e.substring(2,e.length-2);return t.indexOf("<<")>=0||t.indexOf(">>")>=0?null:this._definingUnitSequence(t)},e.prototype._definingUnitSequence=function(e){return this.params&&this.params[e]?this.unitsChain:this.vDelegate?this.vDelegate._definingUnitSequence(e):null},e}();t.ValueTransformer=x;var U=function(e){function t(t,n,r){e.call(this,null!=n?n.templateKind:"",null!=n?n.templateName:"",r),this.owner=t,this.delegate=n}return h(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;k.forEach(function(e){return o=o||t.toString().indexOf("<<"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n="",r=this.owner.highLevel().lowLevel(),i=r,a=null;i;){var o=i.key();if(null!=o)if(g.stringStartsWith(o,"/")){if(!t)for(var s=o.split("/"),u=s.length-1;u>=0;u--){var l=s[u];if(-1==l.indexOf("{")){t=s[u];break}l.length>0&&(a=l)}n=o+n}else e=o;i=i.parent()}t||a&&(t=""),this.params={resourcePath:n,resourcePathName:t},e&&(this.params.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t.prototype.anchorValueKind=function(e){return null!=this.delegate?this.delegate.anchorValueKind(e):null},t.prototype.resolvedValueKind=function(e){return null!=this.delegate?this.delegate.resolvedValueKind(e):null},t.prototype._definingUnitSequence=function(e){return this.params&&this.params[e]?this.unitsChain:this.delegate?this.delegate._definingUnitSequence(e):null},t}(x);t.DefaultTransformer=U;var k=["resourcePath","resourcePathName","methodName"],F={};F[w.universesInfo.Universe10.TypeDeclaration.properties.type.name]=!0,F[w.universesInfo.Universe10.TypeDeclaration.properties.example.name]=!0,F[w.universesInfo.Universe08.BodyLike.properties.schema.name]=!0,F[w.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name]=!0,t.parseMediaType=d},function(e,t,n){(function(e){"use strict";function r(e,t,n){return new ke.Function(e).call(t,n)}function i(e,t){var n=e.property();return n&&n.getContextRequirements().forEach(function(r){e.checkContextValue(r.name,r.value,r.value)||t.accept(Q(De.CONTEXT_REQUIREMENT,{name:r.name,value:r.value,propName:n.nameId()},e))}),n}function a(e,t){var n;try{n=e.lowLevel().unit().project().fsEnabled()}catch(r){n=!0}if(n&&"undefined"!=typeof ge&&ge){for(var i=["exists","readFile","writeFile","readdir","existsSync","readFileSync","writeFileSync","readdirSync"],a=(Object.keys(ge),0);a0){var A=g.map(function(e,t){var n="'"+e+"'";return t==g.length-1?n:t==g.length-2?n+" or ":n+", "}).join("");r=Q(De.INVALID_PROPERTY_OWNER_TYPE,{propName:s,namesStr:A},e)}}}}return r}function d(e,t){if(e.isElement()){if(e.invalidSequence){var n=e.property().nameId();n=Pe.sentenceCase(Oe.singular(n)),t.acceptUnique(ee(De.SEQUENCE_NOT_ALLOWED_10,{propName:n},e.lowLevel().parent().parent(),e))}var r=e.asElement();if(r.definition().isAssignableFrom(Ae.Universe10.LibraryBase.name)){var i,a=!1,o=!1;r.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(a=!0,i=e),"types"==e.key()&&(o=!0)}),a&&o&&t.accept(gt(i,r,ce.IssueCode.ILLEGAL_PROPERTY_VALUE,!1,"types and schemas are mutually exclusive",!1))}r.definition().requiredProperties()&&r.definition().requiredProperties().length>0;h(e,t),(new rt).validate(r,t),(new mt).validate(r,t)}else h(e,t);(new dt).validate(e,t)}function h(e,t,n){void 0===n&&(n=!1);var r=e.parent(),i=e.lowLevel().value();if(e.lowLevel()){if(e.lowLevel().keyKind()==he.Kind.MAP&&t.accept(Q(De.NODE_KEY_IS_A_MAP,{},e)),e.lowLevel().keyKind()==he.Kind.SEQ&&null==i){var a=!1;e.isElement()&&e.asElement().definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name)&&(a=!0),a||t.accept(Q(De.NODE_KEY_IS_A_SEQUENCE,{},e))}if(null==r){var o=e.lowLevel().unit().contents().length;e.lowLevel().errors().forEach(function(n){var r=n.mark?n.mark.position:0,i=r>=o?r:r+1;if(n.mark&&n.mark.toLineEnd){var a=n.mark.buffer,s=a.indexOf("\n",r);0>s&&(s=a.length),s>"))return!1;if("body"==e.name()&&e.computedValue("mediaType"))return!1;"~"!=e.lowLevel().value()&&(ae(e,t,De.SCALAR_PROHIBITED.code,!1)||t.accept(Q(De.SCALAR_PROHIBITED,{propName:e.name()},e)))}}else{var s=f(e);s||(s=Q(De.UNKNOWN_NODE,{name:e.name()},e)),t.accept(s)}}if(e.markCh()&&!e.allowRecursive())return e.property()?(t.accept(Q(De.RECURSIVE_DEFINITION,{name:e.name()},e)),!1):!1;if(e.definition&&e.definition().isAssignableFrom(Ae.Universe10.Operation.name)){var u=y(e.wrapperNode()),l=u.queryStringComesFrom,p=u.queryParamsComesFrom;l&&p&&(t.accept(m(l,e,!1)),t.accept(m(p,e,!0)))}var d=e.definition&&e.definition()&&(e.definition().key()===Ae.Universe10.Overlay||e.definition().key()===Ae.Universe10.Extension);return d&&S(e,t,n),!0}function m(e,t,n){var r=e,i=e,a=n?Ae.Universe10.Operation.properties.queryString.name:Ae.Universe10.Operation.properties.queryParameters.name;return r.unit?ee(De.PROPERTY_ALREADY_SPECIFIED,{propName:a},r,t):Q(De.PROPERTY_ALREADY_SPECIFIED,{propName:a},i)}function y(e){return{queryParamsComesFrom:v(e,!0),queryStringComesFrom:v(e,!1)}}function v(e,t,n,r){if(void 0===n&&(n=!0),void 0===r&&(r={}),!e)return null;if(e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=A(e,t);if(a)return a;var o=e.is&&e.is()||[],s=de.find(o,function(e){return v(e.trait(),t,n,r)});if(s)return s.highLevel();if(n){var u=e.parentResource&&e.parentResource(),l=u&&g(u,t,r);if(l)return l;if(u=e.parent&&e.parent(),u&&u.highLevel().definition().isAssignableFrom(Ae.Universe10.ResourceBase.name))return g(u,t,r)}return null}function g(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r={}),e.name){var i=e.name();if(r[i])return;r[i]=!0}var a=e.is(),o=de.find(a,function(e){return v(e.trait(),t,!1,n)});if(o)return o.highLevel();var s=e.type(),u=s&&s.resourceType(),l=u&&g(u,t,n,r);return l?s.highLevel():void 0}function A(e,t){return t?E(e):T(e)}function E(e){var t=e.highLevel();return t.lowLevel&&de.find(t.lowLevel().children(),function(e){return e.key&&e.key()===Ae.Universe10.Operation.properties.queryParameters.name})}function T(e){var t=e.highLevel(),n=t.element(Ae.Universe10.Operation.properties.queryString.name);return n}function S(e,t,n){if(void 0===n&&(n=!1),!e.parent()){var r=e.asElement();if(r&&r.isAuxilary()){var i=r.getMaster();i&&d(i,t)}}}function b(e,t,n){if(void 0===n&&(n=!1),h(e,t,n))try{var r=e.definition&&e.definition()&&(e.definition().key()===Ae.Universe10.Overlay||e.definition().key()===Ae.Universe10.Extension),i=r?e.children():e.directChildren();i.filter(function(e){return!n||e.property&&e.property()&&e.property().isRequired()}).forEach(function(n){if(n&&n.errorMessage){var r=n.errorMessage;return void t.accept(Q(r.entry,r.parameters,n.name()?n:e))}n.validate(t)})}finally{e.unmarkCh()}}function _(e){var t=e.value();if("string"==typeof t&&-1!=t.indexOf("<<"))return!0;for(var n=e.children(),r=0;r0)return void b(e,t,!0)}if(i.definition().isAnnotationType()||i.property()&&"annotations"==i.property().nameId())return void(new tt).validate(i,t);if(i.definition().isAssignableFrom(Ae.Universe10.UsesDeclaration.name)){var s=i.attr(Ae.Universe10.UsesDeclaration.properties.value.name);if(s&&s.value()){var u=i.lowLevel().unit().resolve(s.value());if(u&&null!==u.contents()){if(!Me.isWaitingFor(s.value())){var l=[];if(0===u.contents().trim().length)return void t.accept(Q(De.EMPTY_FILE,{path:s.value()},i,!1));if(u.highLevel().validate(ye.createBasicValidationAcceptor(l,u.highLevel())),l.length>0){var p=Ke(s,i);l.forEach(function(e){e.unit=null==e.unit?u:e.unit,e.path||(e.path=u.absolutePath())});for(var f=0,d=l;f0;)m=m.extras[0];m!=p&&(m.extras||(m.extras=[]),m.extras.push(p)),t.accept(h)}}}}else t.accept(Q(De.INVALID_LIBRARY_PATH,{path:s.value()},i,!1))}}if(i.definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name)){if(c(i)&&_(i.lowLevel()))return;return i.attrs().forEach(function(n){var r=n.property().range().key();if(r==Ae.Universe08.RelativeUriString||r==Ae.Universe10.RelativeUriString)return void(new Ge).validate(n,t);if(r==Ae.Universe08.FullUriTemplateString||r==Ae.Universe10.FullUriTemplateString)return void(new Ge).validate(n,t);if(n.property().getAdapter(Se.RAMLPropertyService).isKey()){var a=e.property()&&e.property().nameId();if(a==Ae.Universe08.Resource.properties.uriParameters.name||a==Ae.Universe08.Resource.properties.baseUriParameters.name)return;if(i.property()&&i.property().nameId()==Ae.Universe10.MethodBase.properties.body.name)return void(new Xe).validate(n,t)}}),(new ut).validate(i,t),(new lt).validate(i,t),(new ot).validate(i,t),void(new nt).validate(i,t)}if(i.definition().isAssignableFrom(Ae.Universe10.LibraryBase.name)){var y,v=!1,g=!1;i.lowLevel().children().forEach(function(e){"schemas"==e.key()&&(v=!0,y=e),"types"==e.key()&&(g=!0)}),v&&g&&t.accept(ee(De.TYPES_AND_SCHEMAS_ARE_EXCLUSIVE,{},y,i))}var A=i.definition().requiredProperties()&&i.definition().requiredProperties().length>0,E=i.definition().getAdapter(Se.RAMLService).getAllowAny();E?A&&b(e,t,!0):b(e,t),(new ht).validate(i,t),(new rt).validate(i,t),(new mt).validate(i,t)}else b(e,t);(new dt).validate(e,t)}function w(e,t){if(e.lowLevel()){var n=e.lowLevel().actual();delete n._inc,e.children().forEach(function(e){return w(e,t)})}}function R(e,t){var n=e.lowLevel();if(n){var r=n.actual();if(!r._inc){if(e.isElement()){var i=e.name();"string"==typeof i&&null!=i&&-1!=i.indexOf(" ")&&t.accept(Q(De.SPACES_IN_KEY,{value:i},e,!0))}if(r._inc=!0,n){n.includeErrors().forEach(function(n){var r=!1;e.lowLevel().hasInnerIncludeError()&&(r=!0);var i=Q(De.INCLUDE_ERROR,{msg:n},e,r);t.accept(i)});var a=n.includePath();if(null!=a&&!ve.isAbsolute(a)&&!fe.isWebPath(a)){var o=n.unit().absolutePath(),s=M(ve.dirname(o),a);if(s>0){var u=Q(De.PATH_EXCEEDS_ROOT,{},e,!0);t.accept(u)}}}e.children().forEach(function(e){return R(e,t)}),0==e.children().length&&null!=n&&n.children().forEach(function(n){return I(n,t,e)})}}}function I(e,t,n){e.includeErrors().forEach(function(r){var i=!1;e.hasInnerIncludeError()&&(i=!0);var a=ee(De.INCLUDE_ERROR,{msg:r},e,n,i);t.accept(a)});var r=e.includePath();if(null!=r&&!ve.isAbsolute(r)&&!fe.isWebPath(r)){var i=e.unit().absolutePath(),a=M(ve.dirname(i),r);if(a>0){var o=ee(De.PATH_EXCEEDS_ROOT,{},e,n,!0);t.accept(o)}}e.children().forEach(function(e){return I(e,t,n)})}function M(e,t){for(var n=Ve(e),r=Ve(t),i=n.length,a=0,o=0,s=r;oi&&(a=Math.min(i,a))):i++}return-1*a}function C(e,t,n,r,i){return e.hasArrayInHierarchy()?L(e,t,n,r,i):e.hasValueTypeInHierarchy()?P(e,t,n,r,i):!0}function L(e,t,n,r,i){return e.arrayInHierarchy().componentType()?C(e.arrayInHierarchy().componentType(),t,n,r):!0}function P(e,t,n,r,i){try{if(e.key()==Ae.Universe10.AnnotationRef){var a=Ne.referenceTargets(r,t),o=de.find(a,function(e){return ye.qName(e,t)==n});if(null!=o){var s=o.attributes("allowedTargets");if(s){var u=s.map(function(e){return e.value()});if(u.length>0){var l=!1,p=t.definition().allSuperTypes();p=p.concat([t.definition()]);var c=p.map(function(e){return e.nameId()});if(u.forEach(function(e){"API"==e&&(e="Api"),"NamedExample"==e&&(e="ExampleSpec"),"SecurityScheme"==e&&(e="AbstractSecurityScheme"),"SecuritySchemeSettings"==e&&(e="SecuritySchemeSettings"),de.find(c,function(t){return t==e})?l=!0:("Parameter"==e&&t.computedValue("location")&&(l=!0),"Field"==e&&t.computedValue("field")&&(l=!0))}),!l){var f=u.map(function(e){return"'"+e+"'"}).join(", ");return new He(De.INVALID_ANNOTATION_LOCATION,{aName:n,aValues:f})}}}}return g}if(e.key()==Ae.Universe08.SchemaString||e.key()==Ae.Universe10.SchemaString){var d=!1;if(me.UserDefinedProp.isInstance(r)){var h=r,m=h.node();if(m){var y=m.property();y&&(d=Ee.isTypeProperty(y)||Ee.isSchemaProperty(y))}}if(d)return!1;var v=n&&n.trim().length>0&&("{"==n.trim().charAt(0)||"<"==n.trim().charAt(0)),g=Ce.createSchema(n,Y(t.lowLevel(),i&&i.lowLevel()));if(!g)return g;if(g instanceof Error)g.isWarning=!0,v||(g.canBeRef=!0);else{var A=!1;try{JSON.parse(n),A=!0}catch(E){}if(A)try{g.validateSelf()}catch(E){return E.isWarning=!0,E}}return g}if(e.key()==Ae.Universe08.StatusCodeString||e.key()==Ae.Universe10.StatusCodeString){var T=ne(n);if(null!=T)return T}if(e.key()==Ae.Universe08.BooleanType||e.isAssignableFrom(Ae.Universe10.BooleanType.name)){if("true"!==n&&"false"!==n&&n!==!0&&n!==!1)return new He(De.BOOLEAN_EXPECTED);if(i){var S=i.lowLevel().value(!0);if("true"!==S&&"false"!==S)return new He(De.BOOLEAN_EXPECTED)}}if(e.key()==Ae.Universe08.NumberType||e.isAssignableFrom(Ae.Universe10.NumberType.name)){var b=parseFloat(n);if(isNaN(b))return new He(De.NUMBER_EXPECTED,{propName:r.nameId()})}if((e.key()==Ae.Universe08.StringType||e.isAssignableFrom(Ae.Universe10.StringType.name))&&null===n&&t&&r){var _=t.attr(r.nameId());if(_){var N=_.lowLevel().children();if(N&&N.length>0)return new He(De.STRING_EXPECTED_3,{propName:r.nameId()})}}return!0}catch(E){return E.canBeRef=!0,E}}function O(e){if(!e)return!1;var t=e.toLowerCase(),n=e.toUpperCase();return e!==t&&e!==n?!0:!1}function D(e){if(!e)return null;if(e.isElement()){var n=e,r=n.definition();if(r&&t.typeToName.hasOwnProperty(r.nameId()))return t.typeToName[r.nameId()];if(r.isAssignableFrom(Ae.Universe10.TypeDeclaration.name)||r.isAssignableFrom(Ae.Universe08.Parameter.name)){if(n.property()&&t.parameterPropertyToName.hasOwnProperty(n.property().nameId()))return t.parameterPropertyToName[n.property().nameId()];if(n.property()&&n.parent()&&n.property().nameId()==Ae.Universe10.LibraryBase.properties.types.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(Ae.Universe10.LibraryBase.name))return"type";if(n.property()&&n.parent()&&n.property().nameId()==Ae.Universe10.LibraryBase.properties.securitySchemes.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(Ae.Universe10.LibraryBase.name))return"security scheme"}}return null}function x(e,t,n){var r=Ne.declRoot(n);pe.LowLevelProxyNode.isInstance(n.lowLevel())&&(n=r),r._cach||(r._cach={});var i=e.id();if(e.domain()&&(i+=e.domain().nameId()),i){var a=r._cach[i];if(a)return null!=a[t]}var o=Ne.enumValues(e,n),s={};return o.forEach(function(e){return s[e]=1}),e.id()&&(r._cach[i]=s),null!=s[t]}function U(e,n,r,i){if(F(e,n,i),B(e,n,i),r&&("null"!=r||!e.isAllowNull())){var a=e.getAdapter(Se.RAMLPropertyService),o=x(e,r,n.parent());if(o||n.lowLevel().unit().absolutePath()===n.parent().lowLevel().unit().absolutePath()||(o=x(e,r,ye.fromUnit(n.lowLevel().unit()))),!o){if("string"==typeof r&&0==r.indexOf("x-")&&e.nameId()==Ae.Universe10.TypeDeclaration.properties.type.name)return!0;var s=a.isReference&&a.isReference()&&a.referencesTo&&a.referencesTo()&&a.referencesTo().nameId&&a.referencesTo().nameId(),u=t.typeToName[s]||V(n),l={referencedToName:u,ref:r},p=u?De.UNRECOGNIZED_ELEMENT:De.UNRESOLVED_REFERENCE,c=K(p,e,n),f=e.range().key()===Ae.Universe08.SchemaString;return ae(n,i,c.code,f)||i.accept(Q(c,l,n,f)),!0}return k(n)&&Ee.isTraitRefType(n.definition())?(i.accept(Q(De.DUPLICATE_TRAIT_REFERENCE,{refValue:r},n)),!0):!1}}function k(e){var t,n=e.property().domain().universe().version();if(t="RAML10"==n?le(ue.serialize(e.lowLevel())):e.value()&&e.value().valueName&&e.value().valueName(),!t)return!1;var r=e.parent&&e.parent();if(!r)return!1;var i=e.name&&e.name();if(!i)return!1;var a=r.attributes&&r.attributes(i);if(!a)return!1;if(0===a.length)return!1;var o=0;return a.forEach(function(e){var r;"RAML10"==n?t=le(ue.serialize(e.lowLevel())):r=e.value&&e.value()&&e.value().valueName&&e.value().valueName(),r===t&&o++}),o>1}function F(e,t,n){if(Ee.isIsProperty(e)){var r=t.lowLevel();if(null!=r){var i=null,a=r.parent(),o=null!=a?a.parent():null;if(r.kind()==he.Kind.MAPPING&&r.key()&&"is"==r.key()?i=r:null!=a&&a.kind()==he.Kind.MAPPING&&a.key()&&"is"==a.key()?i=a:null!=o&&o.kind()==he.Kind.MAPPING&&o.key()&&"is"==o.key()&&(i=o),null!=i){null==i.value()||i.children()&&0!=i.children().length||n.accept(Q(De.IS_IS_ARRAY,{},t)); -var s=!1;i.children().forEach(function(e){e.kind()!=he.Kind.SCALAR&&e.kind()!=he.Kind.MAP&&(s=!0)}),s&&n.accept(Q(De.IS_IS_ARRAY,{},t))}}}}function B(e,t,n){if(Ee.isTypeProperty(e)&&Ee.isResourceTypeRefType(t.definition())){var r=t.lowLevel();null==t.value()&&r&&r.children()&&0==r.children().length?r.kind()==he.Kind.MAPPING&&null!=r.valueKind()&&n.accept(Q(De.RESOURCE_TYPE_NAME,{},t)):null==t.value()&&r&&r.children()&&r.children().length>1&&n.accept(Q(De.MULTIPLE_RESOURCE_TYPES,{},t))}}function K(e,t,n){return"type"==t.nameId()&&"RAML08"==t.domain().universe().version()&&t.domain().isAssignableFrom(Ae.Universe08.Parameter.name)?De.TYPES_VARIETY_RESTRICTION:null!=n.parent()&&Ee.isSecuritySchemaType(n.parent().definition())?De.UNRECOGNIZED_SECURITY_SCHEME:e}function V(e){var t=e&&e.lowLevel()&&e.lowLevel().key();if(t===Ae.Universe10.AbstractSecurityScheme.properties.type.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===Ae.Universe10.AbstractSecurityScheme.name)return"security scheme type"}else if(t===Ae.Universe08.BodyLike.properties.schema.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===Ae.Universe08.BodyLike.name)return"schema"}}function j(e,t){var n=t.getValidationPath(),r=q(e,n),i=t.getInternalPath(),a=!1;if(i){var o=q(r,i);o&&o!=r&&(r=o,a=!0)}return{node:r,internalPathUsed:a}}function W(e,t){var n=e.getExtra(we.SOURCE_EXTRA);return ye.LowLevelWrapperForTypeSystem.isInstance(n)?n.node():null}function q(e,t){if(!t)return e;var n=e.children().filter(function(e){return e.isAttr()&&e.asAttr().isFromKey()?!1:e.name()===t.name});if(e.isElement()&&Ee.isTypeDeclarationDescendant(e.asElement().definition())){var r=e.lowLevel();n=de.uniq(e.directChildren().concat(e.children())).filter(function(e){return e.isAttr()&&e.asAttr().isFromKey()?!1:e.name()===t.name}).sort(function(e,t){for(var n=e.lowLevel().parent();n&&n.kind()!=he.Kind.MAPPING;)n=n.parent();for(var i=t.lowLevel().parent();i&&i.kind()!=he.Kind.MAPPING;)i=i.parent();return n==r?-1:i==r?1:0})}var i=t.child&&"number"==typeof t.child.name?t.child.name:-1;if(i>=0&&n.length>i)return q(n[i],t.child.child);if(n.length>0)return q(n[0],t.child);if(!e.lowLevel())return e;for(var a=e.lowLevel().children(),o=0;o=0;a=r.indexOf("{{",i)){if(n+=r.substring(i,a),i=r.indexOf("}}",a),0>i){i=a;break}a+="{{".length;var o=r.substring(a,i);i+="}}".length;var s=t[o];if(void 0===s)throw new Error("Message parameter '"+o+"' has no value specified.");n+=s}return n+=r.substring(i,r.length)}function ie(e){if(!e)return!1;if(e=e.trim().toLowerCase(),e.indexOf("\n")>=0||e.indexOf("\r")>=0)return!1;Re.startsWith(e,"http://")?e=e.substring("http://".length):Re.startsWith(e,"https://")?e=e.substring("https://".length):Re.startsWith(e,"./")?e=e.substring("./".length):Re.startsWith(e,"/")&&(e=e.substring("/".length)),e=e.replace(/\.\.\//g,"");var t=e.split("/");if(0==t.length)return!1;for(var n=0,r=t;nn){for(var i=t.attr("key").value().split("."),a=[],o=t.parent(),s=0,u=i;s1&&":"==t.charAt(1)&&/^win/.test(e.platform)&&(t=t.substring(2));var n=t.split("/");return 0==n[0].length&&(n=n.slice(1)),n.length>0&&0==n[n.length-1].length&&(n=n.slice(0,n.length-1)),n},je=function(e,t,n){try{new RegExp(e)}catch(r){t.accept(Q(De.ILLEGAL_PATTERN,{value:e},n))}},We=function(){function e(){}return e.prototype.validateName=function(e,t){var n=e.name();if(n){var r=e.lowLevel().keyStart();this.check(n,r,e,t)}},e.prototype.validateValue=function(e,t){var n=e.value();if("string"==typeof n){var r=e.lowLevel().valueStart();this.check(n,r,e,t)}},e.prototype.hasTraitOrResourceTypeParent=function(e){for(var t=e.parent();null!=t;){if(!t.definition())return!1;if(Ee.isTraitType(t.definition())||Ee.isResourceTypeType(t.definition()))return!0;t=t.parent()}return!1},e.prototype.check=function(e,t,n,r){if(!this.hasTraitOrResourceTypeParent(n))return[];for(var i=[],a=0,o=e.indexOf("<<");o>=0;o=e.indexOf("<<",a)){o+="<<".length,a=e.indexOf(">>",o);var s=e.substring(o,a),u=s.indexOf("|"),l=u>=0?s.substring(0,u):s;if(0==l.trim().length){var p=Q(De.TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS,{},n);p.start=t+o,p.end=t+a,r.accept(p)}if(-1!=u){u++;for(var c=s.split("|").slice(1).map(function(e){return e.trim()}),f=_e.getTransformNames(),d=0,h=c;d>".length}return i},e}(),qe=function(){function e(){}return e.prototype.validate=function(t,n){var r=t.parent();if(r&&(r.definition().isAssignableFrom(Ae.Universe08.Method.name)||r.definition().isAssignableFrom(Ae.Universe10.Method.name))){var i=de.find(r.lowLevel()&&r.lowLevel().children()||[],function(e){var t=e.key();return t&&(Ae.Universe08.MethodBase.properties.body.name===t||Ae.Universe10.MethodBase.properties.body.name===t)});i&&de.find(e.methodsWithoutRequestBody,function(e){return r.name()===e})&&n.accept(Q(De.REQUEST_BODY_DISABLED,{methodName:r.name()},r))}},e.methodsWithoutRequestBody=["trace"],e}(),Ye=function(){function e(){}return e.prototype.validate=function(e,t){var n=i(e,t),r=e.value(),a=e.parent().definition().universe().version(),l=null!=c(e.parent());if(!e.property().range().hasStructure()){if(ye.StructuredValue.isInstance(r)&&!e.property().isSelfNode()){if(o(e.property())&&e.property().domain().key()==Ae.Universe08.BodyLike){var f=new ye.ASTNodeImpl(e.lowLevel(),e.parent(),e.parent().definition().universe().type(Ae.Universe08.BodyLike.name),e.property());return void f.validate(t)}if("RAML10"==a&&l)return;t.accept(Q(De.SCALAR_EXPECTED,{},e))}else{var d=e.lowLevel().valueKind();if(e.lowLevel().valueKind()!=he.Kind.INCLUDE_REF&&!e.property().getAdapter(Se.RAMLPropertyService).isKey()&&!e.property().isMultiValue()){var h=e.property().range().key();(h==Ae.Universe08.StringType||h==Ae.Universe08.MarkdownString||h==Ae.Universe08.MimeType)&&(d!=he.Kind.SEQ&&d!=he.Kind.MAPPING&&d!=he.Kind.MAP&&(!e.property().isRequired()&&"mediaType"!=e.property().nameId()||null!=d&&void 0!==d)||e.property().domain().getAdapter(Se.RAMLService).isInlinedTemplates()||t.accept(Q(De.STRING_EXPECTED,{propName:e.name()},e)))}}if(e.isAnnotatedScalar()){var m=new tt;e.annotations().forEach(function(e){var n=e.value(),r=n.toHighLevel();r?m.validate(r,t):t.accept(Q(De.UNKNOWN_ANNOTATION,{aName:n.valueName()},e))})}}var y;if("string"==typeof r?y=r:ye.StructuredValue.isInstance(r)&&(y=r.valueName()),!(y&&-1!=y.indexOf("<<")&&y.indexOf(">>")>y.indexOf("<<")&&((new We).validateValue(e,t),l))){if((new qe).validate(e,t),e.property().range().key()==Ae.Universe08.MimeType||e.property().range().key()==Ae.Universe10.MimeType||e.property().nameId()==Ae.Universe10.TypeDeclaration.properties.name.name&&e.parent().property().nameId()==Ae.Universe10.MethodBase.properties.body.name)return void(new Xe).validate(e,t);if((u(e.property())||s(e.property()))&&(new ct).validate(e,t),p(e.property())){if("RAML08"==a){var v=e.lowLevel().parent(),g=he.Kind.SEQ;pe.LowLevelProxyNode.isInstance(e.lowLevel())?v.valueKind()!=g&&t.accept(Q(De.SECUREDBY_LIST_08,{},e,!1)):v.kind()!=g&&t.accept(Q(De.SECUREDBY_LIST_08,{},e,!1))}if((new ct).validate(e,t),"RAML10"==a&&ye.StructuredValue.isInstance(r)){var A=r,E=A.children().filter(function(e){return"scopes"==e.valueName()});if(E.length>0){var T=e.findReferencedValue();if(T){var S=[];E.forEach(function(e){var t=e.children();if(t.length>0)t.forEach(function(e){var t=e.lowLevel().value();null==t||l&&t.indexOf("<<")>=0||S.push(e)});else{var n=e.lowLevel().value();null==n||l&&n.indexOf("<<")>=0||S.push(e)}});var b={},_=T.element(me.universesInfo.Universe10.AbstractSecurityScheme.properties.settings.name);if(_){var N=_.attributes(me.universesInfo.Universe10.OAuth2SecuritySchemeSettings.properties.scopes.name);N.forEach(function(e){return b[e.value()]=!0})}for(var w=0,R=S;w0&&(de.find(_,function(e){return e==n})||n&&0==n.indexOf("x-")&&r.nameId()==Ae.Universe08.AbstractSecurityScheme.properties.type.name||f.accept(Q(De.INVALID_VALUE,{iValue:n,aValues:_.map(function(e){return"'"+e+"'"}).join(", ")},e)))}},e}(),Ge=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=(new ze).parseUrl(e.value()||"");if(n.some(function(e){return"version"==e})&&"baseUri"==e.property().nameId()){var r=e.root().attr("version");r||t.accept(Q(De.MISSING_VERSION,{},e,!1))}n.some(function(e){return 0==e.length})&&t.accept(Q(De.URI_PARAMETER_NAME_MISSING,{},e,!1))}catch(i){t.accept(Q(De.URI_EXCEPTION,{msg:i.message},e,!1))}},e}(),Xe=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=e.value();if("body"==n&&e.parent().parent()){var r=e.parent().parent().definition().key();(r===Ae.Universe08.Response||r===Ae.Universe10.Response||e.parent().parent().definition().isAssignableFrom(Ae.Universe10.MethodBase.name))&&(n=e.parent().computedValue("mediaType"))}if(e.parent()&&e.parent().parent()&&e.parent().parent().definition().isAssignableFrom(Ae.Universe10.Trait.name)&&n.indexOf("<<")>=0)return;var i=_e.parseMediaType(n);if(!i)return;i.type.match(/[\w\d][\w\d!#\$&\-\^_+\.]*/)||t.accept(Q(De.INVALID_MEDIATYPE,{mediaType:i.type},e))}catch(a){t.accept(Q(De.MEDIATYPE_EXCEPTION,{msg:a.message},e))}(e.value()&&"multipart/form-data"==e.value()||"application/x-www-form-urlencoded"==e.value())&&e.parent()&&e.parent().parent()&&e.parent().parent().property()&&e.parent().parent().property().nameId()==Ae.Universe10.MethodBase.properties.responses.name&&t.accept(Q(De.FORM_IN_RESPONSE,{},e,!0))},e}(),ze=function(){function e(){}return e.prototype.checkBaseUri=function(e,t,n,r){var i=t.root().attr("baseUri");if(i){var a=i.value();try{var o=this.parseUrl(a);de.find(o,function(e){return e==n})||r.accept(Q(De.UNUSED_URL_PARAMETER,{paramName:""},e))}catch(s){}}else r.accept(Q(De.UNUSED_URL_PARAMETER,{paramName:""},e))},e.prototype.parseUrl=function(e){for(var t=[],n="",r=!1,i=0,a=0;a0)throw new Error("Invalid resource name: unmatched '{'");if(0>i)throw new Error("Invalid resource name: unmatched '}'");return t},e.prototype.validate=function(e,t){var n=e.value();if(e.parent().property().nameId()==Ae.Universe10.Api.properties.baseUri.name){var r=e.parent().parent();return void this.checkBaseUri(e,r,n,t)}var r=e.parent().parent(),i=r.name();if(r.definition().key()===Ae.Universe10.Api||r.definition().key()===Ae.Universe08.Api)return void this.checkBaseUri(e,r,n,t);if(r.definition().key()!=Ae.Universe10.ResourceType&&r.definition().key()!=Ae.Universe08.ResourceType)try{var a=this.parseUrl(i),o=de.find(a,function(e){return e==n});if(!o){var s=e.root().attr(Ae.Universe10.Api.properties.baseUri.name);if(s&&e.name()===Ae.Universe08.Api.properties.baseUriParameters.name){var u=s.value();if(u&&(a=this.parseUrl(u),a&&a.length>0&&de.find(a,function(e){return e==n})))return}t.accept(Q(De.UNUSED_URL_PARAMETER,{paramName:"'"+n+"'"},e))}}catch(l){}},e}();t.UrlParameterNameValidator=ze,t.typeToName={},t.typeToName[Ae.Universe08.Trait.name]="trait",t.typeToName[Ae.Universe08.ResourceType.name]="resource type",t.typeToName[Ae.Universe10.Trait.name]="trait",t.typeToName[Ae.Universe10.ResourceType.name]="resource type",t.typeToName[Ae.Universe10.AbstractSecurityScheme.name]="security scheme",t.typeToName[Ae.Universe10.Method.name]="method",t.typeToName[Ae.Universe08.Method.name]="method",t.typeToName[Ae.Universe10.Resource.name]="resource",t.typeToName[Ae.Universe08.Resource.name]="resource",t.typeToName[Ae.Universe10.Api.name]="api",t.typeToName[Ae.Universe08.Api.name]="api",t.typeToName[Ae.Universe10.Response.name]="response",t.typeToName[Ae.Universe08.Response.name]="response",t.typeToName[Ae.Universe08.BodyLike.name]="body",t.parameterPropertyToName={},t.parameterPropertyToName[Ae.Universe08.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[Ae.Universe08.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[Ae.Universe08.Api.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[Ae.Universe08.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[Ae.Universe08.BodyLike.properties.formParameters.name]="form parameter",t.parameterPropertyToName[Ae.Universe10.MethodBase.properties.headers.name]="header",t.parameterPropertyToName[Ae.Universe10.MethodBase.properties.queryParameters.name]="query parameter",t.parameterPropertyToName[Ae.Universe10.ResourceBase.properties.uriParameters.name]="uri parameter",t.parameterPropertyToName[Ae.Universe10.Api.properties.baseUriParameters.name]="base uri parameter",t.parameterPropertyToName[Ae.Universe10.MethodBase.properties.body.name]="body",t.getHumanReadableNodeName=D;var Je=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.value(),r=n,i=e.property();if("string"==typeof n){if(U(i,e,n,t),me.ReferenceType.isInstance(i.range())){var a=(i.range(),se.createNode(""+n,e.lowLevel().parent(),e.lowLevel().unit()));a._actualNode().startPosition=e.lowLevel().valueStart(),a._actualNode().endPosition=e.lowLevel().valueEnd();var o=new ye.StructuredValue(a,e.parent(),e.property()),s=o.toHighLevel();s&&s.validate(t)}}else if(ye.StructuredValue.isInstance(n)){var u=n;if(u){r=u.valueName();var l=u.valueName();if(!U(i,e,l,t)){var p=u.toHighLevel();p&&p.validate(t)}}else r=null}else"number"==typeof n||"boolean"==typeof n?e.definition().isAssignableFrom(Ae.Universe10.Reference.name)&&U(i,e,n+"",t):e.definition().isAssignableFrom(Ae.Universe10.Reference.name)&&U(i,e,null,t);if(r){var c=C(i.range(),e.parent(),r,i);c instanceof Error&&(He.isInstance(c)?t.accept(J(c,e)):t.accept(Q(De.SCHEMA_EXCEPTION,{msg:c.message},e,c.isWarning)),c=null)}},e}(),Qe=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.universe(),r=n.getTypedVersion();if(r){if("0.8"!==r&&"1.0"!==r){var i=Q(De.UNKNOWN_RAML_VERSION,{},e);t.accept(i)}var a=n.getOriginalTopLevelText();if(a){var o={typeName:a};if(a!=e.definition().nameId()){if("Api"==e.definition().nameId()){var i=Q(De.UNKNOWN_TOPL_LEVEL_TYPE,o,e);t.accept(i)}}else if("Api"==n.getOriginalTopLevelText()){var i=Q(De.REDUNDANT_FRAGMENT_NAME,o,e);t.accept(i)}}}},e}(),Ze=function(){function e(){}return e.prototype.validate=function(e,t){var n=this;e.definition().getAdapter(Se.RAMLService).getContextRequirements().forEach(function(n){if(!e.checkContextValue(n.name,n.value,n.value)){var r={v1:n.name,v2:n.value,v3:e.definition().nameId()},i=De.CONTEXT_REQUIREMENT_VIOLATION;"location"==n.name&&"ParameterLocation.FORM"==n.value&&(i=De.WEB_FORMS),t.accept(Q(i,r,e))}});var r,i=e.definition().getAdapter(Se.RAMLService).isInlinedTemplates();if(i){for(var a={},o=0,s=e.lowLevel().children();o0?t.accept(Q(De.ALLOWED_TARGETS_MUST_BE_ARRAY,{},e,!1)):this.annotables[r]||t.accept(Q(De.UNSUPPORTED_ANNOTATION_TARGET,{aTarget:r},e,!1))}},e}(),rt=function(){function e(){}return e.prototype.validate=function(e,t){if(!e.definition().isAnnotationType()){if(e.lowLevel().keyKind()==he.Kind.SEQ){var n=e.definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name);n||t.accept(Q(De.NODE_KEY_IS_A_SEQUENCE,{},e))}var r=e.name();if(null==r&&(r=e.lowLevel().key(),null==r&&(r="")),e.definition().key()==Ae.Universe08.GlobalSchema&&e.lowLevel().valueKind()!=he.Kind.SCALAR){var o=!1;if(e.lowLevel().valueKind()==he.Kind.ANCHOR_REF||e.lowLevel().valueKind()==he.Kind.INCLUDE_REF){var s=e.lowLevel().value();"string"==typeof s&&(o=!0)}o||t.accept(Q(De.SCHEMA_NAME_MUST_BE_STRING,{name:r},e))}e.parent()||((new Qe).validate(e,t),(e.definition().key()==Ae.Universe08.Api||e.definition().key()==Ae.Universe10.Api)&&(new be).validateApi(e.wrapperNode(),t),(new et).validate(e,t),a(e,t)),(new st).validate(e,t);var u=e.definition();if(u.key()==Ae.Universe08.BodyLike&&e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"formParameters"===e}))if(e.parent()&&e.parent().definition().key()==Ae.Universe08.Response){var l=Q(De.FORM_PARAMS_IN_RESPONSE,{},e);t.accept(l)}else if(e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return"schema"===e||"example"===e})){var l=Q(De.FORM_PARAMS_WITH_EXAMPLE,{},e);t.accept(l)}if(u.key()==Ae.Universe10.OAuth2SecuritySchemeSettings){var p=!1;if(e.attributes("authorizationGrants").forEach(function(e){var n=e.value();if("authorization_code"===n||"implicit"===n)p=!0;else if("password"!==n&&"client_credentials"!==n&&n&&"string"==typeof n&&-1==n.indexOf("://")&&-1==n.indexOf(":")){var r=Q(De.AUTHORIZATION_GRANTS_ENUM,{},e);t.accept(r)}}),p&&!e.attr("authorizationUri")){var l=Q(De.AUTHORIZATION_URI_REQUIRED,{},e);t.accept(l)}}if(e.definition().isAssignableFrom(Ae.Universe08.Parameter.name)||e.definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name)){var c=e.attributes("enum").map(function(e){return e.value()});if(c.length!=de.uniq(c).length){var l=Q(De.REPEATING_COMPONENTS_IN_ENUM,{},e);t.accept(l)}if(e.definition().isAssignableFrom(Ae.Universe08.NumberTypeDeclaration.name)||e.definition().isAssignableFrom(Ae.Universe10.NumberTypeDeclaration.name)){var f=e.definition().isAssignableFrom(Ae.Universe08.IntegerTypeDeclaration.name)||e.definition().isAssignableFrom(Ae.Universe10.IntegerTypeDeclaration.name);e.attributes("enum").forEach(function(e){var n=f?parseInt(e.value()):parseFloat(e.value()),r=f?!isNaN(n)&&-1===e.value().indexOf("."):!isNaN(n);if(!r){var i=Q(f?De.INTEGER_EXPECTED:De.NUMBER_EXPECTED_2,{},e);t.accept(i)}})}}Ee.isResourceTypeType(e.definition())&&null==e.value()&&"null"===e.lowLevel().value(!0)&&t.accept(Q(De.RESOURCE_TYPE_NULL,{},e)),i(e,t);var d=e.value();if(("string"==typeof d||"number"==typeof d||"boolean"==typeof d)&&!e.definition().getAdapter(Se.RAMLService).allowValue()&&e.parent()&&"~"!=d&&!ae(e,t,De.SCALAR_PROHIBITED_2.code)){var l=Q(De.SCALAR_PROHIBITED_2,{name:r},e);t.accept(l)}(new Ze).validate(e,t),(new pt).validate(e,t),(new ot).validate(e,t)}},e}(),it=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.attrValue(Ae.Universe10.TypeDeclaration.properties.name.name);"version"==n&&t.accept(Q(De.VERSION_NOT_ALLOWED,{},e))},e}(),at=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.definitions=e,this.propertyName=t,this.assignableFrom=r,this.validator=n}return e.prototype.validate=function(e,t){var n=e.definition();if(null!=n){var r=!1;if(r=this.assignableFrom?this.definitions.some(function(e){return n.isAssignableFrom(e.name)}):this.definitions.some(function(e){return e===n})){if(null!=this.propertyName){if(null==e.property())return;if(e.property().nameId()!=this.propertyName)return}this.validator.validate(e,t)}}},e}(),ot=function(){function e(){}return e.createRegistry=function(){var t=[];return e.registerValidator(t,[Ae.Universe10.TypeDeclaration,Ae.Universe08.Parameter],Ae.Universe10.Api.properties.baseUriParameters.name,new it,!0),t},e.registerValidator=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new at(t,n,r,i);e.push(a)},e.prototype.validate=function(t,n){e.entries.forEach(function(e){return e.validate(t,n)})},e.entries=e.createRegistry(),e}(),st=function(){function e(){}return e.prototype.allowsAnyChildren=function(e,t){var n=e.property(),r=e.definition();return(Ee.isAnnotationTypeType(r)||Ee.isTypeDeclarationTypeOrDescendant(r))&&Ee.isAnnotationTypesProperty(n)?!0:e.parent()==t&&Ee.isTypesProperty(n)&&Ee.isTypeDeclarationTypeOrDescendant(r)?!0:Ee.isSchemasProperty(n)&&Ee.isTypeDeclarationTypeOrDescendant(r)?!0:e.parent()==t&&Ee.isDocumentationProperty(n)&&Ee.isDocumentationType(r)?!0:Ee.isAnnotationsProperty(n)?!0:Ee.isUsesProperty(n)?!0:Ee.isExamplesProperty(n)?!0:!1},e.prototype.nodeAllowedDueToParent=function(e,t){for(var n=e;n!=t&&null!=n;){if(this.allowsAnyChildren(n,t))return!0;n=n.parent()}return!1},e.prototype.validate=function(e,t){var n=e.root();if(!n.isExpanded()||n.lowLevel().unit().absolutePath()==e.lowLevel().unit().absolutePath()){e.property(),e.definition();if(Ee.isOverlayType(n.definition())){if(e==n)return void this.validateProperties(e,t);if(!this.nodeAllowedDueToParent(e,n)){var r=n.knownIds();if(r){var i=r.hasOwnProperty(e.id());return i?void this.validateProperties(e,t):void t.accept(Q(De.INVALID_OVERLAY_NODE,{nodeId:e.id()},e))}}}}},e.prototype.validateProperties=function(e,t){var n=e.root(),r=n.lowLevel().unit().absolutePath(),i=n.isExpanded();e.attrs().forEach(function(n){i&&r!=n.lowLevel().unit().absolutePath()||n.property().getAdapter(Se.RAMLPropertyService).isKey()||n.parent()==e&&(n.isElement()||Ee.isTitlePropertyName(n.name())||Ee.isDescriptionPropertyName(n.name())||Ee.isDisplayNamePropertyName(n.name())||Ee.isUsagePropertyName(n.name())||Ee.isExampleProperty(n.property())||Ee.isMasterRefProperty(n.property())||Ee.isAnnotationsProperty(n.property())||Ee.isUsesProperty(n.property())||t.accept(Q(De.INVALID_OVERRIDE_IN_OVERLAY,{propName:n.name()},n)))})},e}(),ut=function(){function e(){}return e.prototype.validate=function(e,t){var n=this,r=new st;r.validate(e,t),e.directChildren().forEach(function(e){e.isElement()&&n.validate(e.asElement(),t)})},e}(),lt=function(){function e(){}return e.prototype.val=function(e,t,n){var r=this;if(e.kind()==he.Kind.MAP||e.kind()==he.Kind.MAPPING){var i={};e.children().forEach(function(e){var r=e.key();if(r){if(i.hasOwnProperty(r)){var a=Q(De.KEYS_SHOULD_BE_UNIQUE,{},n,!1);e.unit()==n.lowLevel().unit()&&(a.start=e.keyStart(),a.end=e.keyEnd()),t.accept(a)}i[r]=1}})}e.children().forEach(function(e){r.val(e,t,n)})},e.prototype.validate=function(e,t){this.val(e.lowLevel(),t,e)},e}(),pt=function(){function e(){}return e.prototype.validate=function(e,t){this.validateChildElements(e,t);var n=e.lowLevel().children(),r=de.groupBy(n.filter(function(e){return null!=e.key()}),function(e){return e.key()});this.validateChildAttributes(e,r,t),this.validateUnrecognizedLowLevelChildren(e,r,t)},e.prototype.validateChildElements=function(e,t){var n={},r=e.directChildren().filter(function(e){return e.isElement()});r.forEach(function(e){var t=e;if(!t._computed&&t.name()){var r=t.name()+t.property().nameId();n.hasOwnProperty(r)?t.isNamePatch()||n[r].push(t):n[r]=[t]}}),Object.keys(n).forEach(function(e){var r=n[e];!r||r.length<2||r.forEach(function(e){var n=D(e),r={name:e.name()},i=De.ALREADY_EXISTS_IN_CONTEXT;n&&(r.capitalized=Pe.upperCaseFirst(n),i=De.ALREADY_EXISTS);var a=Q(i,r,e);t.accept(a)})})},e.prototype.validateChildAttributes=function(e,t,n){var r=this.getHighLevelAttributes(e),i=de.groupBy(r,function(e){return e.name()}),a=this.allowsAnyAndHasRequireds(e);Object.keys(i).forEach(function(r){if(!(i[r].length<2)){var o=i[r][0].isUnknown(),s=!o&&i[r][0].property().isMultiValue();s&&(e.definition().isAssignableFrom(Ae.Universe08.SecuritySchemeSettings.name)||e.definition().isAssignableFrom(Ae.Universe10.SecuritySchemeSettings.name))&&(s=t[r]&&1===t[r].length),(o&&a||!s||s&&null!=t[r]&&t[r].length>1)&&i[r].forEach(function(e){var t={propName:e.property()?e.property().nameId():e.name()},r=De.PROPERTY_USED,i=D(e.parent());i&&(t.parent=Pe.upperCaseFirst(i),r=De.PARENT_PROPERTY_USED);var a=Q(r,t,e);n.accept(a)})}})},e.prototype.validateUnrecognizedLowLevelChildren=function(e,t,n){var r=e.directChildren(),i=de.groupBy(r,function(e){return e.name()});Object.keys(t).forEach(function(r){if(r&&t[r].length>1&&!i[r]){if(e.definition().isAssignableFrom(Ae.Universe10.ObjectTypeDeclaration.name))return;var a={propName:r},o=De.PROPERTY_USED,s=D(e);s&&(a.parent=Pe.upperCaseFirst(s),o=De.PARENT_PROPERTY_USED),t[r].forEach(function(t){var r=ee(o,a,t,e);r.start=t.keyStart(),r.end=t.keyEnd(),n.accept(r)})}})},e.prototype.filterMultiValueAnnotations=function(e,t,n){this.getHighLevelAttributes(e);Object.keys(t).forEach(function(e){"("!==e.charAt(0)||t[e].length<2})},e.prototype.getHighLevelAttributes=function(e){var t=this.allowsAnyAndHasRequireds(e);return e.directChildren().filter(function(e){return e.isAttr()||t})},e.prototype.allowsAnyAndHasRequireds=function(e){var t=e.definition().requiredProperties(),n=t&&t.length>0,r=e.definition().getAdapter(Se.RAMLService),i=r&&r.getAllowAny(),a=i&&n;return a},e}(),ct=function(){function e(){}return e.prototype.validate=function(e,t){var n=this.isStrict(e);if(n||Ue.validateNotStrictExamples){var r=this.parseObject(e,t,n);if(r){var i=this.aquireSchema(e);if(i){var a=r;"object"==typeof a&&(a=e.value()),i.validate(a,t,n)}}}},e.prototype.isExampleNode=function(e){return this.isSingleExampleNode(e)||this.isExampleNodeInMultipleDecl(e)},e.prototype.isSingleExampleNode=function(e){return e.name()==Ae.Universe10.TypeDeclaration.properties.example.name},e.prototype.isExampleNodeInMultipleDecl=function(e){var t=e.parent();return t?Ee.isExampleSpecType(t.definition()):!1},e.prototype.findParentSchemaOrTypeAttribute=function(e){var t=e.parent().attr(Ae.Universe10.TypeDeclaration.properties.schema.name);return t?t:(t=e.parent().attr(Ae.Universe10.TypeDeclaration.properties.type.name))?t:e.parent()?(t=e.parent().parent().attr(Ae.Universe10.TypeDeclaration.properties.schema.name))?t:(t=e.parent().parent().attr(Ae.Universe10.TypeDeclaration.properties.type.name),t?t:null):null},e.prototype.aquireSchema=function(e){var t=e.parent().definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name);if(this.isExampleNode(e)){var n=e;if(this.isExampleNodeInMultipleDecl(e)&&(n=e.parent()),n.parent()&&(n.parent().definition().isAssignableFrom(Ae.Universe10.TypeDeclaration.name)&&null===n.parent().parent()?t=!1:n.parent().property().nameId()==Ae.Universe10.LibraryBase.properties.types.name&&(t=!1),n.parent().parent())){var r=n.parent().parent().definition().key();(r==Ae.Universe08.Method||r==Ae.Universe10.Method)&&(n.parent().property().nameId()==Ae.Universe10.MethodBase.properties.queryParameters.name||(t=!0)),(r==Ae.Universe08.Response||r==Ae.Universe10.Response)&&(t=!0)}}if(e.parent().definition().key()==Ae.Universe08.BodyLike||t){var i=this.findParentSchemaOrTypeAttribute(e);if(i){var a=i.value();if(ye.StructuredValue.isInstance(a))return null;var o=(""+a).trim(),s=null;if("{"==o.charAt(0))try{s=Ce.getJSONSchema(o,Y(i.lowLevel()))}catch(u){return null}if("<"==o.charAt(0))try{s=Ce.getXMLSchema(o)}catch(u){return null}if(s)return{validate:function(t,n,r){try{if(t.__$validated)return;if(s instanceof Error)return void n.accept(Q(De.INVALID_VALUE_SCHEMA,{iValue:s.message},e,!r));s.validate(t)}catch(a){var o="Cannot assign to read only property '__$validated' of ";if(a.message&&0==a.message.indexOf(o)){var u=a.message.substr(o.length,a.message.length-o.length);return void n.accept(Q(De.INVALID_JSON_SCHEMA,{propName:u},i,!r))}if("Object.keys called on non-object"==a.message)return;return He.isInstance(a)?void(ae(e,n,a.messageEntry.code,!r)||n.accept(J(a,e,!r))):void n.accept(Q(De.EXAMPLE_SCHEMA_FAILURE,{msg:a.message},e,!r))}}};if(o.length>0){var l=e.parent(),p=l&&l.parent(),c=l&&l.definition()&&l.definition().isAssignableFrom(Ae.Universe10.ObjectTypeDeclaration.name)&&l;if(c=c||p&&p.definition()&&p.definition().isAssignableFrom(Ae.Universe10.ObjectTypeDeclaration.name)&&p)return this.typeValidator(c,e)}}}return this.getSchemaFromModel(e)},e.prototype.getSchemaFromModel=function(e){var t=e.parent();return this.typeValidator(t,e)},e.prototype.typeValidator=function(e,t){var n={validate:function(n,r,i){var a=e.parsedType();if(a&&!a.isUnknown()){"number"==typeof n&&a.isString()&&(n=""+n),"boolean"==typeof n&&a.isString()&&(n=""+n),a.getExtra("repeat")&&(n=[n]);var o=a.validate(n,!1);o.isOk()||o.getErrors().forEach(function(e){return r.accept(Z(e.getCode(),e.getMessage(),t,!i,e.getInternalRange()))})}}};return n},e.prototype.toObject=function(e,t,n){var r=t.lowLevel().dumpToObject(!0);return this.testDublication(e,t.lowLevel(),n),r.example?r.example:r.content?r.content:void 0},e.prototype.testDublication=function(e,t,n){var r=this,i={};t.children().forEach(function(t){t.key()&&(i[t.key()]&&n.accept(Q(De.KEYS_SHOULD_BE_UNIQUE,{},new ye.BasicASTNode(t,e.parent()))),i[t.key()]=t),r.testDublication(e,t,n)})},e.prototype.parseObject=function(e,t,n){var r=null,i=e.value(),a=G(e);if(ye.StructuredValue.isInstance(i))r=this.toObject(e,i,t);else if(a){if(H(a))try{me.rt.getSchemaUtils().tryParseJSON(i,!0),r=JSON.parse(i)}catch(o){return void(He.isInstance(o)?ae(e,t,o.messageEntry.code,!n)||t.accept(J(o,e,!n)):t.accept(Q(De.CAN_NOT_PARSE_JSON,{msg:o.message},e,!n)))}if($(a))try{r=Le.parseXML(i)}catch(o){return void t.accept(Q(De.CAN_NOT_PARSE_XML,{msg:o.message},e,!n))}}else try{if(!(i&&i.length>0)||"["!=i.trim().charAt(0)&&"{"!=i.trim().charAt(0)&&"<"!=i.trim().charAt(0)){if("true"==i)return!0;if("false"==i)return!1;var s=parseFloat(i);return isNaN(i)?i:s}r=JSON.parse(i)}catch(o){if(0!=i.trim().indexOf("<"))return i;try{r=Le.parseXML(i)}catch(o){return void t.accept(Q(De.CAN_NOT_PARSE_XML,{msg:o.message},e,!n))}}return r},e.prototype.isStrict=function(e){if(Ee.isDefaultValue(e.property()))return!0;if(Ee.isExampleProperty(e.property())&&"RAML08"==e.parent().definition().universe().version())return!1;var t=!1,n=e.parent().attr("strict");return n&&"true"==n.value()&&(t=!0),t},e}();t.ExampleAndDefaultValueValidator=ct;var ft=function(e,t,n){var r=Pe.sentence(e);return t||(r=Pe.ucFirst(r)),n&&(r=Oe.plural(r)),r},dt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.isAttr()){if(!e.optional())return;var n=e,r=n.property();if(r.isMultiValue()||r.range().isArray())return;if(!r.isFromParentKey()){var i=c(n.parent());if(i&&r.isValueProperty()){var a=ft(i,!0,!0),o=Q(De.OPTIONAL_SCLARAR_PROPERTIES_10,{templateNamePlural:a,propName:n.name()},n,!1);t.accept(o)}}}else if(e.isElement()){var s=e,r=s.property(),u=s.allowsQuestion();if(!u){var l=r?ft(r.nameId(),!0,!0):"API root";s.optionalProperties().forEach(function(n){s.children().forEach(function(n){var r={propName:l,oPropName:n.lowLevel().key()},i=Q(De.OPTIONAL_PROPERTIES_10,r,e,!1);t.accept(i)})})}var p=e.asElement().definition();if(e.optional()&&"RAML10"==p.universe().version()){var r=e.property(),f=Ee.isQueryParametersProperty(r)||Ee.isUriParametersProperty(r)||Ee.isHeadersProperty(r);if(!(Ee.isMethodType(p)||Ee.isTypeDeclarationType(p)&&f)){var o=Q(De.ONLY_METHODS_CAN_BE_OPTIONAL,{},e,!1);t.accept(o)}}}},e}(),ht=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition(),r=Ae.Universe10.Api.properties.baseUri.name,i=Ae.Universe10.Api.properties.baseUriParameters.name,a=Ae.Universe10.Resource.properties.relativeUri.name,o=Ae.Universe10.ResourceBase.properties.uriParameters.name;if(Ee.isApiSibling(n))this.inspectParameters(e,t,r,i);else if(Ee.isResourceType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s),this.inspectParameters(e,t,a,o)}else if(Ee.isResourceTypeType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s)}},e.prototype.inspectParameters=function(e,t,n,r,i){i=i||e;var a="",o=i.attr(n);o&&(a=o.value(),a&&"string"==typeof a||(a=""));var s=e.elementsOfKind(r);s.forEach(function(n){var i=n.attr(Ae.Universe10.TypeDeclaration.properties.name.name);if(i){var o=i.value();if(null!=o&&a.indexOf("{"+o+"}")<0){if(Ee.isResourceTypeType(e.definition())&&o.indexOf("<<")>=0)return;var s=Pe.upperCaseFirst(Oe.singular(Pe.sentence(r))),u=Q(De.PROPERTY_UNUSED,{propName:s},n,!0);t.accept(u)}}})},e}(),mt=function(){function e(){this.nameProperty=Ae.Universe10.ResourceType.properties.name.name}return e.prototype.validate=function(e,t){var n=e.definition();if(Ee.isLibraryBaseSibling(n)||Ee.isApiType(n)){var r=(Ae.Universe10.LibraryBase.properties.resourceTypes.name,Ae.Universe10.ResourceBase.properties.type.name),i=(Ae.Universe10.LibraryBase.properties.traits.name,Ae.Universe10.MethodBase.properties.is.name),a=Ne.globalDeclarations(e).filter(function(e){return Ee.isResourceTypeType(e.definition())}),o=Ne.globalDeclarations(e).filter(function(e){return Ee.isTraitType(e.definition())});this.checkCycles(a,r,t),this.checkCycles(o,i,t)}},e.prototype.checkCycles=function(e,t,n){var r=this,i={};e.forEach(function(e){var t=r.templateName(e);i[t]=e});var a={};e.forEach(function(e){var o=r.templateName(e);a[o]||r.findCyclesInDefinition(e,t,i).forEach(function(t){t.forEach(function(e){return a[e]=!0}),t=t.reverse();var r=ft(e.definition().nameId()),i=t.join(" -> "),o={typeName:r,cycle:i},s=Q(De.CYCLE_IN_DEFINITION,o,e,!1);n.accept(s)})})},e.prototype.templateName=function(e){var t=e.attr(this.nameProperty);return t?t.value():null},e.prototype.findCyclesInDefinition=function(e,t,n,r){void 0===r&&(r={});var i=this.templateName(e);if(r[i])return[[i]];var a={};Object.keys(r).forEach(function(e){return a[e]=r[e]}),a[i]=!0;for(var o=[],s=e.attributes(t),u=0;uw&&(w=l.start());var R=N.position(w),I=void 0,M=void 0,C=R.line+s.start.line,L=R.line+s.end.line;if(y&&"string"==typeof y&&"|"==y.charAt(0)){var P=y.indexOf("\n")+1,O=y.indexOf("\n",P);0>O&&(O=y.length);var D=yt.exec(y.substring(P,O))[0].length;I=D+s.start.column,M=D+s.end.column,C++,L++}else I=R.column+s.start.column,M=R.column+s.end.column,m&&(m.singleQuoted||m.doubleQuoted)&&(I++,M++);var x=N.toPosition(C,I),U=N.toPosition(L,M);x&&U&&(f=x.position,d=U.position)}else{if(c&&d>c&&(d=c-1),l.key()&&l.keyStart()){var k=l.keyStart();k>0&&(f=k);var F=l.keyEnd();F>0&&(d=F)}if(f>d&&(d=f+1,e.isElement())){var B=e.definition();Ee.isApiType(B)&&(f=0==c?0:c-1,d=f)}if(a&&!a.getAdapter(Se.RAMLPropertyService).isMerged()&&null==e.parent()){var K=de.find(l.children(),function(e){return e.key()==a.nameId()});if(K){var k=K.keyStart(),F=K.keyEnd();k>0&&F>k&&(f=k,d=F)}}}return{code:t,isWarning:n,message:r,node:e,start:f,end:d,path:i?l.unit()?l.unit().path():"":null,extras:[],unit:e?l.unit():null}},gt=function(e,t,n,r,i,a,o){var s=e.unit()&&e.unit().contents(),u=s&&s.length,l=e.start(),p=e.end();if(u&&p>=u&&(p=u-1),e.key()&&e.keyStart()){var c=e.keyStart();c>0&&(l=c);var f=e.keyEnd();f>0&&(p=f)}return{code:n,isWarning:r,message:i,node:t,start:l,end:p,path:a?e.unit()?e.unit().path():"":null,extras:[],unit:e?e.unit():null}};t.toIssue=z,t.createIssue1=Q,t.createIssue=Z,t.createLLIssue=te,t.validateResponseString=ne}).call(t,n(64))},function(e,t,n){"use strict";function r(e,t){if(void 0===t&&(t=0),t>20)return[];try{var n=[],i=e.leftType();i&&n.push(i);var a=e.rightType();if(a)if(a.hasUnionInHierarchy()){var o=r(a.unionInHierarchy(),t+1);n=n.concat(o)}else n.push(a);return n}finally{}}function i(e){var t=e.definition();if(!t||!N.isTypeDeclarationDescendant(t))return!1;var n=e.lowLevel();if(n.valueKind()!==g.Kind.SEQ)return!1;var r=n.children();if(null==r)return!1;for(var i=0,a=r;i0&&l.forEach(function(e){u||m(e,n,u)&&(u=e)}),u}}finally{r._node&&delete r._node.descriminate}}function h(e){for(var t,n=[e].concat(e.allSuperTypes()),r=0;r=r.length&&(r=i.keyPrefix(),n=i):(n=i,r=i.nameId()))}),n},e}(),L=0,P=function(){function e(){this.shouldDescriminate=!1}return e.prototype.process=function(e,t){var n=this,a=e.lowLevel(),o=e;o._mergedChildren=null;var s=a._node?a._node:a;try{if(s.currentChildren)return s.currentChildren;if(!e.definition())return;if(null==e.parent()&&!this.shouldDescriminate){this.shouldDescriminate=!0;try{var u=this.process(e,t),l=e;l._children=u,l._mergedChildren=null;var p=f(e);p&&l.patchType(p);var u=this.process(e,t);l._children=u,l._mergedChildren=null}finally{this.shouldDescriminate=!1}}if(e.definition().hasUnionInHierarchy()&&e.parent()&&e.property().nameId()==_.Universe10.LibraryBase.properties.annotations.name){var c=r(e.definition().unionInHierarchy()),d=null,h=null,m=null,y=1e3,v=e;if(c.forEach(function(r){if(!d&&!r.hasUnionInHierarchy()){v.patchType(r);if(0==L){L++;try{for(var i=n.process(e,t),a=0,o=0;oa&&(y=a,h=i,m=r)}finally{L--}}}}),d)return v.patchType(m),d;h&&v.patchType(m)}var A=new C(e.definition().allProperties());if(null==e.parent()||e.lowLevel().includePath()){var E=e.definition().universe();"RAML10"==E.version()&&(e.definition().property("uses")||E.type("FragmentDeclaration").allProperties().forEach(function(e){return A.add(e)}))}var S=e,b=S._allowQuestion||e.definition().getAdapter(w.RAMLService).getAllowQuestion(),R=[];if(A.parentKey){if(e.lowLevel().key()){var M=new T.ASTPropImpl(e.lowLevel(),e,A.parentKey.range(),A.parentKey,!0);R.push(M);var P=e.property()&&N.isBodyProperty(e.property())&&e.lowLevel().key()==e.property().nameId();if(P){O(S);M.overrideValue(S._computedKey)}}if(e.lowLevel().valueKind()===g.Kind.SEQ&&!i(e)){var D=new T.BasicASTNode(e.lowLevel(),S);return D.errorMessage={entry:I.DEFINITION_SHOULD_BE_A_MAP,parameters:{typeName:e.definition().nameId()}},R.push(D),R}}if(null!=e.lowLevel().value(!0))if(A.parentValue)R.push(new T.ASTPropImpl(e.lowLevel(),e,A.parentValue.range(),A.parentValue));else if(A.canBeValue){var x=e.lowLevel().value();null==x&&(x=e.lowLevel().value(!0)),"string"==typeof x&&x.trim().length>0&&R.push(new T.ASTPropImpl(e.lowLevel(),e,A.canBeValue.range(),A.canBeValue))}if(S._children=R,S._mergedChildren=null,S.definition().getAdapter(w.RAMLService).isUserDefined())R=this.processChildren(t,S,R,b,A);else if(S.definition().key()==_.Universe08.Api||S.definition().key()==_.Universe10.Api){var U=t.filter(function(e){ -return"uses"==e.key()});R=this.processChildren(U,S,R,b,A);var k=t.filter(function(e){return"types"==e.key()});R=this.processChildren(k,S,R,b,A);var F=t.filter(function(e){return"types"!=e.key()&&"uses"!=e.key()});R=this.processChildren(F,S,R,b,A)}else R=this.processChildren(t,S,R,b,A);return S._children=R,S._mergedChildren=null,R}finally{}},e.prototype.isTypeDeclarationShortcut=function(e,t){var n=N.isTypeOrSchemaProperty(t),r=e.definition()&&N.isTypeDeclarationTypeOrDescendant(e.definition());return r&&n&&e.lowLevel()&&e.lowLevel().valueKind()===g.Kind.SEQ?!0:!1},e.prototype.processChildren=function(e,t,n,r,i){var a=this,o=_.Universe10.TypeDeclaration.name,s=_.Universe10.TypeDeclaration.properties.type.name,u=_.Universe10.ArrayTypeDeclaration.properties.items.name;if(t.definition()&&t.definition().isAssignableFrom(o)&&t.lowLevel()&&i.canBeValue&&(i.canBeValue.nameId()===s||i.canBeValue.nameId()===u)&&t.lowLevel()._node&&t.lowLevel()._node.value&&t.lowLevel()._node.value.kind===g.Kind.SEQ)return e.forEach(function(e){var r=new T.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue);n.push(r)}),n;var l=t.root().lowLevel().unit();e.forEach(function(e){if(i.canBeValue&&a.isTypeDeclarationShortcut(t,i.canBeValue))return void n.push(new T.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue));var o=e.key(),s=null!=o?i.match(o):null;if(null!=s){var u=s.range();if(s.isAnnotation()&&"annotations"!=o){var p=new T.ASTPropImpl(e,t,u,s);return void n.push(p)}var c=!1,f=s.isMultiValue();u.isArray()?(f=!0,u=u.array().componentType(),c=!0):u.hasArrayInHierarchy()&&(f=!0,c=!0);var h,m=!1;if(t.reuseMode()&&e.valueKind()!=g.Kind.SEQ){var v=t.reusedNode();if(v){var E=[e],b=t.lowLevel();!s.isMerged()&&f&&(h=[],E=e.children(),b=e);for(var R=0,C=E;R0||x.length>1)&&f)if(x.length>1&&N.isTypeDeclarationDescendant(t.definition())&&(N.isTypeOrSchemaProperty(s)||N.isItemsProperty(s))&&e.valueKind()!=g.Kind.SEQ){var p=new T.ASTPropImpl(e,t,u,s);n.push(p),t.setComputed(s.nameId(),p)}else{var k=[];x.forEach(function(e){var r=new T.ASTPropImpl(e,t,u,s);n.push(r),k.push(e.value())}),s.isInherited()&&t.setComputed(s.nameId(),k)}else{s.isInherited()&&t.setComputed(s.nameId(),e.value());var F=new T.ASTPropImpl(e,t,u,s);if(U||e.valueKind()==g.Kind.MAP){var B=s.range().nameId();s.getAdapter(w.RAMLPropertyService).isExampleProperty()||("StringType"==B&&(B="string"),"NumberType"==B&&(B="number"),"BooleanType"==B&&(B="boolean"),("string"==B||"number"==B||"boolean"==B)&&(e.isAnnotatedScalar()||(F.errorMessage={entry:I.INVALID_PROPERTY_RANGE,parameters:{propName:s.groupName(),range:B}},0==h.length&&"enum"==s.groupName()&&(F.errorMessage={entry:I.ENUM_IS_EMPTY,parameters:{}},e.valueKind()==g.Kind.MAP&&(F.errorMessage={entry:I.ENUM_MUST_BE_AN_ARRAY,parameters:{}})))))}n.push(F)}return}var K=[];if(t._children=n,t._mergedChildren=null,null!=e.value()&&("string"==typeof e.value()||"boolean"==typeof e.value()||"number"==typeof e.value())&&(""+e.value()).trim().length>0){var V=s.range();if(!V.allProperties().some(function(e){var t=e;return t?t.canBeValue()&&t.isFromParentValue():!1})){var j=new T.BasicASTNode(e,t);j.getLowLevelEnd=function(){return-1},j.getLowLevelStart=function(){return-1},j.knownProperty=s,n.push(j)}}if(s.isMerged()){var W=new T.ASTNodeImpl(e,t,u,s);W._allowQuestion=r,K.push(W)}else if(f)if(s.getAdapter(w.RAMLPropertyService).isEmbedMap()){var q=h,Y=[],H=!1;if(q.forEach(function(e){e.kind()==g.Kind.INCLUDE_REF&&"RAML08"==t.universe().version()?e.children().forEach(function(e){var n=new T.ASTNodeImpl(e,t,u,s);n._allowQuestion=r,K.push(n),H=!0}):Y.push(e)}),q=Y,0==q.length){if(s.range().key()==_.Universe08.ResourceType&&!H){var $=new T.BasicASTNode(e,t);$.errorMessage={entry:I.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push($)}if(e.valueKind()==g.Kind.SCALAR&&s.range().key()==_.Universe08.AbstractSecurityScheme){var $=new T.BasicASTNode(e.parent(),t);$.errorMessage={entry:I.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push($)}}if(q.forEach(function(e){var i=e.children();if(e.key()||1!=i.length)if("RAML10"==t.universe().version()){var a=new T.ASTNodeImpl(e,t,u,s);a._allowQuestion=r,K.push(a)}else{var o=new T.BasicASTNode(e,t);n.push(o),e.key()&&(o.needSequence=!0)}else if("RAML10"!=t.universe().version()||t.parent()){var a=new T.ASTNodeImpl(i[0],t,u,s);a._allowQuestion=r,K.push(a)}}),"RAML10"==t.universe().version()&&e.valueKind()==g.Kind.SEQ){var j=new T.BasicASTNode(e,t);n.push(j),j.needMap=!0,j.knownProperty=s}}else{var G={},X=[];if(y.NodeClass.isInstance(u)){var z=u;z.getAdapter(w.RAMLService).getCanInherit().length>0&&z.getAdapter(w.RAMLService).getCanInherit().forEach(function(n){for(var i=t.computedValue(n),a=Array.isArray(i)?i:[i],o=0;o0?J.forEach(function(e){return K.push(e)}):X.forEach(function(e){return K.push(e)})}else K.push(new T.ASTNodeImpl(e,t,u,s));t._children=t._children.concat(K),t._mergedChildren=null,n=n.concat(K),K.forEach(function(e){var n=d(s,t,e);n&&n!=e.definition()&&e.patchType(n),e._associatedDef=null,s.childRestrictions().forEach(function(t){e.setComputed(t.name,t.value)});e.definition()})}else S.LowLevelCompositeNode.isInstance(e)&&null==e.primaryNode()||n.push(new T.BasicASTNode(e,t))});var p=t.reusedNode();if(p&&t.lowLevel().valueKind()!=g.Kind.SEQ){var c={};p.elements().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),p.attrs().forEach(function(e){return c[e.property().nameId()+"_"+e.lowLevel().key()]=e}),n.filter(function(e){return e.isElement()||e.isAttr()}).forEach(function(e){var n=c[e.property().nameId()+"_"+e.lowLevel().key()];n&&n!=e&&e.isElement()&&e.lowLevel().parent().valueKind()!=g.Kind.SEQ&&(e.setReusedNode(n),e.setReuseMode(t.reuseMode()))})}return n},e}();t.BasicNodeBuilder=P,t.doDescrimination=f;var O=function(e){for(var t=!1,n=e;n;){var r=n.definition();if(N.isTraitType(r)||N.isResourceTypeType(r)){t=!0;break}n=n.parent()}return t}},function(e,t,n){"use strict";function r(e){if(!w.BasicNodeImpl.isInstance(e))return null;var t=e,n=i(t.highLevel());if(!n)return null;var r=n.wrapperNode();return r.setAttributeDefaults(t.getDefaultsCalculator().isEnabled()),r}function i(e){if(null==e)return null;var t=e.definition();if(!t||!M.isApiSibling(t))return null;var n=(new P).expandTraitsAndResourceTypes(e);return n}function a(e){if(!e)return null;var t=s(e.highLevel());if(!t)return null;var n=t.wrapperNode();return n.setAttributeDefaults(e.getDefaultsCalculator().isEnabled()),n}function o(e){if(!e)return null;var t=u(e.highLevel());if(!t)return null;var n=t.wrapperNode();return n.setAttributeDefaults(e.getDefaultsCalculator().isEnabled()),n}function s(e){return(new O).expandLibraries(e)}function u(e){return(new O).expandLibrary(e)}function l(e,t,n){var r=A.fromUnit(e);if(!r)throw new Error("couldn't load api from "+e.absolutePath());if(!t||0==t.length)return r.asElement();for(var i=[],a=0;a0&&(u[e.attr("method").value()]=t)});var p,f=t.attr("type");if(null!=f){var d=c(i);p=this.readGenerictData(e,f,t,"resource type",r,d)}var h={resourceType:p,traits:s,methodTraits:u};if(n.push(h),p){var m=p.node,y=A.qName(m,e);a[y]?h.resourceType=null:(a[y]=!0,this.collectResourceData(e,m,n,p.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){var i=this;void 0===r&&(r={}),n=n.concat([e]);for(var a=[],o=-1;oo?null:a[o],u=s?s.node:e,l=s?s.unitsChain:c(n),p=s?s.transformer:t;u.attributes("is").forEach(function(t){var n=f(l,t),o=i.readGenerictData(e,t,u,"trait",p,n);if(o){var s=o.name;r[s]=!0,a.push(o)}})}return a},e.prototype.readGenerictData=function(e,t,n,r,i,a){void 0===a&&(a=[]);var o,s,u=t.value(),l=b.plural(L.camelCase(r));if("string"==typeof u)s=u;else{if(!A.StructuredValue.isInstance(u))return null;o=u,s=o.valueName()}i&&(s=i.transform(s).value);var p={},c={},f=R.getDeclaration(s,l,a);if(f){var d=new F(e,null,a);o&&("RAML08"==this.ramlVersion?o.children().forEach(function(e){return p[e.valueName()]=e.lowLevel().value()}):o.children().forEach(function(e){var t=e.lowLevel(),t=e.lowLevel();t.resolvedValueKind()==E.Kind.SCALAR?p[e.valueName()]=t.value():c[e.valueName()]=t}),Object.keys(p).forEach(function(e){var t=d.transform(p[e]);t&&"object"!=typeof t&&(p[e]=t)}));var h=new k(r,s,a,p,c,i),m=new F(null,h,a);return{name:s,transformer:m,parentTransformer:i,node:f,ref:t,unitsChain:a}}return null},e}();t.TraitsAndResourceTypesExpander=P;var O=function(){function e(){}return e.prototype.expandLibraries=function(e){var t=e;if(null==t)return null;S.LowLevelCompositeNode.isInstance(t.lowLevel())&&(t=t.lowLevel().unit().highLevel().asElement());var n=new P,r=new R.ReferencePatcher,i=n.createHighLevelNode(t,!0,r,!0),a=n.expandHighLevelNode(i,r,t,!0);return this.processNode(r,a),a},e.prototype.expandLibrary=function(e){var t=e;if(null==t)return null;S.LowLevelCompositeNode.isInstance(t.lowLevel())&&(t=t.lowLevel().unit().highLevel().asElement());var n=new P,r=new R.ReferencePatcher,i=n.createHighLevelNode(t,!0,r,!0);return r.process(i),r.expandLibraries(i,!0),i},e.prototype.processNode=function(e,t){if(null!=t){var n=t.getMaster();this.processNode(e,n),M.isOverlayType(t.definition())&&e.process(t),e.expandLibraries(t)}},e}();t.LibraryExpander=O,t.toUnits=d;var D=function(){function e(t,n){this.name=t,this.regexp=new RegExp(e.leftTransformRegexp.source+t+e.rightTransformRegexp.source),this.transformer=n}return e.leftTransformRegexp=/\s*!\s*/,e.rightTransformRegexp=/\s*$/,e}(),x=[new D("singularize",function(e){return b.singular(e)}),new D("pluralize",function(e){return b.plural(e)}),new D("uppercase",function(e){return e?e.toUpperCase():e}),new D("lowercase",function(e){return e?e.toLowerCase():e}),new D("lowercamelcase",function(e){return e?L.camelCase(e):e}),new D("uppercamelcase",function(e){if(!e)return e;var t=L.camelCase(e);return t[0].toUpperCase()+t.substring(1,t.length)}),new D("lowerunderscorecase",function(e){if(!e)return e;var t=L.snake(e);return t.toLowerCase()}),new D("upperunderscorecase",function(e){if(!e)return e;var t=L.snake(e);return t.toUpperCase()}),new D("lowerhyphencase",function(e){if(!e)return e;var t=L.param(e);return t.toLowerCase()}),new D("upperhyphencase",function(e){if(!e)return e;var t=L.param(e);return t.toUpperCase()})];t.getTransformNames=h,t.getTransformersForOccurence=m;var U=function(){function e(){this.buf=null}return e.prototype.append=function(e){""!==e&&(null!=this.buf?null!=e&&("string"!=typeof this.buf&&(this.buf=""+this.buf),this.buf+=e):""!==e&&(this.buf=e))},e.prototype.value=function(){return null!=this.buf?this.buf:""},e}(),k=function(){function e(e,t,n,r,i,a){this.templateKind=e,this.templateName=t,this.unitsChain=n,this.params=r,this.structuredParams=i,this.vDelegate=a}return e.prototype.transform=function(e,t,n,r){var i={},a=[];if("string"==typeof e){if(this.structuredParams&&T.stringStartsWith(e,"<<")&&T.stringEndsWith(e,">>")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,l=new U,p=0,c=u.indexOf("<<");c>=0;c=u.indexOf("<<",p)){l.append(u.substring(p,c));var f=c;if(c+="<<".length,p=this.paramUpperBound(u,c),-1==p)break;var d=u.substring(c,p);p+=">>".length;var h,o,y=u.substring(f,p),v=m(d);if(v.length>0){var g=d.indexOf("|");if(o=d.substring(0,g).trim(),h=this.params[o],h&&"string"==typeof h&&h.indexOf("<<")>=0&&this.vDelegate&&(h=this.vDelegate.transform(h,t,n,r).value),h){R.PatchedReference.isInstance(h)&&(h=h.value());for(var A=0,E=v;A=0&&this.vDelegate&&(h=this.vDelegate.transform(h,t,n,r).value);(null===h||void 0===h)&&(i[o]=!0,h=y),l.append(h)}return l.append(u.substring(p,u.length)),{value:l.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r>",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.anchorValueKind=function(e){var t=this.substitutionNode(e);return t&&t.valueKind()==E.Kind.ANCHOR_REF?t.anchorValueKind():null},e.prototype.resolvedValueKind=function(e){var t=this.substitutionNode(e);return t&&t.resolvedValueKind()},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e){var t=this.paramName(e);return t&&this.structuredParams[t]},e.prototype.paramName=function(e){var t=null;if(e.valueKind()==E.Kind.SCALAR){var n=(""+e.value()).trim();T.stringStartsWith(n,"<<")&&T.stringEndsWith(n,">>")&&(t=n.substring(2,n.length-2))}return t},e.prototype.definingUnitSequence=function(e){if(e.length<2)return null;if("("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),e.length<4)return null;if("<<"!=e.substring(0,2))return null;if(">>"!=e.substring(e.length-2,e.length))return null;var t=e.substring(2,e.length-2);return t.indexOf("<<")>=0||t.indexOf(">>")>=0?null:this._definingUnitSequence(t)},e.prototype._definingUnitSequence=function(e){return this.params&&this.params[e]?this.unitsChain:this.vDelegate?this.vDelegate._definingUnitSequence(e):null},e}();t.ValueTransformer=k;var F=function(e){function t(t,n,r){e.call(this,null!=n?n.templateKind:"",null!=n?n.templateName:"",r),this.owner=t,this.delegate=n}return v(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;B.forEach(function(e){return o=o||t.toString().indexOf("<<"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n="",r=this.owner.lowLevel(),i=r,a=null;i;){var o=i.key();if(null!=o)if(T.stringStartsWith(o,"/")){if(!t)for(var s=o.split("/"),u=s.length-1;u>=0;u--){var l=s[u];if(-1==l.indexOf("{")){t=s[u];break}l.length>0&&(a=l)}n=o+n}else e=o;i=i.parent()}t||a&&(t=""),this.params={resourcePath:n,resourcePathName:t},e&&(this.params.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t.prototype.anchorValueKind=function(e){return null!=this.delegate?this.delegate.anchorValueKind(e):null},t.prototype.resolvedValueKind=function(e){return null!=this.delegate?this.delegate.resolvedValueKind(e):null},t.prototype._definingUnitSequence=function(e){return this.params&&this.params[e]?this.unitsChain:this.delegate?this.delegate._definingUnitSequence(e):null},t}(k);t.DefaultTransformer=F;var B=["resourcePath","resourcePathName","methodName"],K={};K[I.universesInfo.Universe10.TypeDeclaration.properties.type.name]=!0,K[I.universesInfo.Universe10.TypeDeclaration.properties.example.name]=!0,K[I.universesInfo.Universe08.BodyLike.properties.schema.name]=!0,K[I.universesInfo.Universe10.ObjectTypeDeclaration.properties.properties.name]=!0,t.parseMediaType=y},function(e,t,n){"use strict";function r(e){return a.isWebPath(e)}var i=n(15),a=n(10),o=n(25),s=function(){function e(e){this.unit=e}return e.prototype.contextPath=function(){if(!this.unit)return"";var e=this.unit.absolutePath();return e||""},e.prototype.normalizePath=function(e){if(!e)return e;var t;if(r(e)){var n=0===e.toLowerCase().indexOf("https")?"https://":"http://";t=n+i.normalize(e.substring(n.length)).replace(/\\/g,"/")}else t=i.normalize(e).replace(/\\/g,"/");return t},e.prototype.content=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolve(n);return r?r.contents()||"":""},e.prototype.contentAsync=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolveAsync(n);if(!r)return Promise.resolve("");var i=r.then(function(e){return e&&e.contents()||""});return i},e.prototype.toRelativeIfNeeded=function(e){var t=e;return i.isAbsolute(e)&&!r(e)&&(t=i.relative(i.dirname(this.unit.absolutePath()),e)),t},e.prototype.hasAsyncRequests=function(){return o.hasAsyncRequests()},e.prototype.resolvePath=function(e,t){return a.buildPath(t,e,this.unit.project().getRootPath())},e.prototype.isAbsolutePath=function(e){return e?r(e)?!0:i.isAbsolute(e):!1},e.prototype.promiseResolve=function(e){return Promise.resolve(e)},e}();t.ContentProvider=s},function(e,t,n){"use strict";function r(e,t){return new M(t).dump(e)}function i(e,t,n,r,i){if(!t)return e;var a={};e&&e.arr.forEach(function(e){var t=a[e.name()];t||(t=[],a[e.name()]=t),t.push(e)});for(var o=new C(r),s=0,u={},l=!1,p=t.indexOf("{");p>=0&&(s=t.indexOf("}",++p),!(0>s));p=t.indexOf("{",s)){var f=t.substring(p,s);if(u[f]=!0,a[f])a[f].forEach(function(e){o.registerValue(e),o.registerMeta(null)});else{l=!0;var d=n.definition().universe(),h=d.type(E.Universe10.StringTypeDeclaration.name),m=_.createStubNode(h,null,f,n.lowLevel().unit());if(m.setParent(n),m.attrOrCreate("name").setValue(f),m.patchProp(r),o.registerValue(m),i){o.hasMeta=!0;var y=new c.NodeMetadataImpl;y.setCalculated(),o.registerMeta(y)}}}return l?(Object.keys(a).filter(function(e){return!u[e]}).forEach(function(e){return a[e].forEach(function(e){o.registerValue(e),o.hasMeta&&o.registerMeta(null)})}),o):e}function a(e,t,n,r){if(0==t.length)return null;var i=e.lowLevel().unit().absolutePath(),a=new C(n);return t.forEach(function(e){if(a.registerValue(e),r)if(e.lowLevel().unit().absolutePath()!=i){a.hasMeta=!0;var t=new c.NodeMetadataImpl;t.setCalculated(),a.mArr.push(t)}else a.mArr.push(null)}),a}function o(e,t,n,r){var i;if(e.isElement())i=e.asElement().definition();else if(e.isAttr()){var a=e.asAttr().property();a&&(i=a.range())}if((i instanceof d.UserDefinedClass||i.isUserDefined())&&(i=N.find(i.allSuperTypes(),function(e){return!e.isUserDefined()})),null==i)return n;var o=i.universe().version(),s=r[o];if(!s)return n;var u=s[i.nameId()];if(!u)return n;var l=t?t.nameId():"__$$anyprop__",p=u[l];if(p||(p=u.__$$anyprop__),!p)return n;for(var c=0,f=p;c0&&(v.uses=g),u=v}else{for(var _={},R=p.attrs().concat(p.children().filter(function(e){return!e.isAttr()})),I=0,M=R;I0,Y.push(t)}),H&&(k[O]=Y)}A.isTypeDeclarationDescendant(f)&&A.isTypeProperty(K)&&D.arr.map(function(e){return e.value()}).filter(function(e){return h.isStructuredValue(e)}).length>0&&(q=q[0])}else if(q=this.dumpInternal(D.val,D.prop,n),K.isValueProperty()){var $=D.val.asAttr();if($.isAnnotatedScalar()){var Y=$.annotations().map(function(e){return a.dumpInternal(e,null,n)});Y.length>0&&(k[O]=Y)}}}else if(void 0!==W)q=W;else if(this.options.attributeDefaults){var G=this.defaultsCalculator.attributeDefaultIfEnabled(p,K);if(null!=G){r=r||new c.NodeMetadataImpl,Array.isArray(G)?G=G.map(function(e){return h.isASTPropImpl(e)?a.dumpInternal(e,K,n):e}):h.isASTPropImpl(G)&&(G=this.dumpInternal(G,K,n)),q=G,null!=q&&K.isMultiValue()&&!Array.isArray(q)&&(q=[q]);var X=this.defaultsCalculator.insertionKind(p,K);X==S.InsertionKind.CALCULATED?r.registerCalculatedValue(O):X==S.InsertionKind.BY_DEFAULT&&r.registerInsertedAsDefaultValue(O)}}if(q=o(p,K,q,this.nodePropertyTransformersMap),null!=q){if(("type"===O||"schema"==O)&&q&&q.forEach&&"string"==typeof q[0]){var z=q[0].trim(),J="{"===z[0]&&"}"===z[z.length-1],Q="<"===z[0]&&">"===z[z.length-1];if(J||Q){var Z=p.lowLevel().includePath&&p.lowLevel().includePath();if(!Z){var ee=p.attr("type");ee||(ee=p.attr("schema")),ee&&(Z=ee.lowLevel().includePath&&ee.lowLevel().includePath())}if(Z){var te=Z.indexOf("#"),ne="";te>=0&&(ne=Z.substring(te),Z=Z.substring(0,te));var re,ie=p.lowLevel().unit().resolve(Z).absolutePath();re=T.stringStartsWith(ie,"http://")||T.stringStartsWith(ie,"https://")?ie:w.relative(p.lowLevel().unit().project().getRootPath(),ie),re=re.replace(/\\/g,"/"),u.schemaPath=re+ne}}}u[O]=q}}}}if(this.options.dumpSchemaContents&&l.schema&&l.schema.prop.range().key()==E.Universe08.SchemaString){var ae=p.root().elementsOfKind("schemas");ae.forEach(function(e){if(e.name()==u.schema){var t=e.attr("value");t&&(u.schema=t.value(),u.schemaContent=t.value())}})}this.options.serializeMetadata&&this.serializeMeta(u,p,r),Object.keys(k).length>0&&(u.scalarsAnnotations=k);var oe=b.getTemplateParametrizedProperties(p);if(oe&&(u.parametrizedProperties=oe),A.isTypeDeclarationDescendant(f)){var se=b.typeFixedFacets(p);se&&(u.fixedFacets=se)}u=o(p,t||p.property(),u,this.nodeTransformersMap)}}else if(e.isAttr()){var ue,le=e.asAttr(),ue=le.value(),P=le.property(),pe=P.range(),ce=pe.isValueType();if(ce&&le.value&&(ue=le.value(),null==ue&&A.isAnyTypeType(pe))){var fe=le.lowLevel();le.isAnnotatedScalar()&&(fe=N.find(fe.children(),function(e){return"value"==e.key()})),fe&&(ue=le.lowLevel().dumpToObject())}if(null==ue||"number"!=typeof ue&&"string"!=typeof ue&&"boolean"!=typeof ue){if(h.isStructuredValue(ue)){var de=ue,x=de.lowLevel();ue=x?x.dumpToObject():null;var he=P.nameId();if(pe.isAssignableFrom("Reference")){var U=Object.keys(ue)[0],me=de.valueName(),ye=ue[U];void 0===ye&&(ye=null),ue={name:me,structuredValue:ye}}else if("type"==he){var x=le.lowLevel(),ve=d.getUniverse("RAML10").type(E.Universe10.TypeDeclaration.name),ge=d.getUniverse("RAML10").type(E.Universe10.LibraryBase.name),Ae=new h.ASTNodeImpl(x,le.parent(),ve,ge.property(E.Universe10.LibraryBase.properties.types.name));Ae.patchType(m.doDescrimination(Ae)),ue=this.dumpInternal(Ae,t||le.property(),n,null,!0)}else if("items"==he&&"object"==typeof ue){var Ee=Array.isArray(ue),Te=!Ee;if(Ee&&(Te=null!=N.find(ue,function(e){return"object"==typeof e})),Te){ue=null;var Se=e.parent().lowLevel();Se.children().forEach(function(e){if("items"==e.key()){var r=d.getUniverse("RAML10").type(E.Universe10.TypeDeclaration.name),i=d.getUniverse("RAML10").type(E.Universe10.LibraryBase.name),o=new h.ASTNodeImpl(e,le.parent(),r,i.property(E.Universe10.LibraryBase.properties.types.name));o.patchType(m.doDescrimination(o)),ue=a.dumpInternal(o,t||le.property(),n,null,!0),he=e.key()}})}}}ue=o(le,t||le.property(),ue,this.nodeTransformersMap),u=ue}else u=ue}else{var x=e.lowLevel();u=x?x.dumpToObject():null}return e.setJSON(u),u},e.prototype.getDefaultsCalculator=function(){return this.defaultsCalculator},e.prototype.canBeFragment=function(e){var t=e.definition(),n=[t].concat(t.allSubTypes()),r=n.filter(function(e){return e.getAdapter(d.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==d.universesInfo.Universe10.FragmentDeclaration.name}).length>0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.serializeMeta=function(e,t,n){if(this.options.serializeMetadata){var r=t.definition(),i=A.isMethodType(r)&&t.optional();if(n||i){var a=n||new c.NodeMetadataImpl(!1,!1);i&&a.setOptional(),e.__METADATA__=a.toJSON()}}},e.prototype.applyHelpers=function(e,t,n,r){var i=n.nameId(),a=this.helpersMap[i];if(!a)return e;var o=a.apply(t,e,n,r);return o?o:e},e}();t.TCKDumper=M;var C=function(){function e(e){this.prop=e,this.arr=[],this.mArr=[],this.isMultiValue=e.isMultiValue()}return e.prototype.registerValue=function(e){this.isMultiValue?this.arr.push(e):this.val=e},e.prototype.registerMeta=function(e){this.isMultiValue&&this.mArr.push(e)},e}(),L={apply:function(e,t,n,r){var a=e.attr(E.Universe10.Api.properties.baseUri.name),o=a?a.value():"";return i(t,o,e,n,r)}},P={apply:function(e,t,n,r){var a=e.attr(E.Universe10.Resource.properties.relativeUri.name);if(!a)return t;var o=a.value();return i(t,o,e,n,r)}},O=function(){function e(e){this.arr=e}return e.prototype.apply=function(e,t,n,r){return a(e,this.arr,n,r)},e}(),D=function(){function e(e){this.schemasCache08=e}return e.prototype.apply=function(e,t,n,r){var i=null,a=b.schemaContent08Internal(e,this.schemasCache08);return a&&(i=new C(n),i.registerValue(a)),i},e}();t.applyTransformersMap=o;var x=function(){function e(){}return e.prototype.match=function(e,t){if(null==e)return!1;var n=this.registrationInfo(),r=e.universe().version();if((e instanceof d.UserDefinedClass||e.isUserDefined())&&(e=N.find(e.allSuperTypes(),function(e){return!e.isUserDefined()}),null==e))return null==t;var i=n[r];if(!i)return!1;var a=i[e.nameId()];if(!a)return!1;var o=null==t||a[t.nameId()]===!0||a.__$$anyprop__===!0;return o},e}(),U=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]),e.call(this),this.typeName=t,this.propName=n,this.applyToDescendatns=r,this.restrictToUniverses=i}return p(t,e),t.prototype.registrationInfo=function(){var e=this;if(this.regInfo)return this.regInfo;for(var t={},n=[],r=0,i=this.restrictToUniverses;r0&&(e.regInfo[n]=r)}),this.regInfo},t}(x),k=function(){function e(e){this.matcher=e}return e.prototype.match=function(e,t){var n;if(e.isElement())n=e.asElement().definition();else if(e.isAttr()){var r=e.asAttr().property();r&&(n=r.range())}return n?this.matcher.match(n,t):!1},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),F=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=["RAML10","RAML08"]),e.call(this,new U(t,n,r,i)),this.typeName=t,this.propName=n,this.applyToDescendatns=r,this.restrictToUniverses=i}return p(t,e),t}(k),B=function(e){function t(t){e.call(this),this.matchers=t}return p(t,e),t.prototype.registrationInfo=function(){return this.regInfo?this.regInfo:(this.regInfo=u(this.matchers.map(function(e){return e.registrationInfo()})),this.regInfo)},t}(x),K=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return e.isElement()&&this.matcher.match(e.asElement().definition(),t)},e.prototype.transform=function(e,t){var n=this;if(Array.isArray(e)&&e.length>0&&e[0][this.propName]){var r={};return e.forEach(function(e){var t=e["$$"+n.propName];null!=t?delete e["$$"+n.propName]:t=e[n.propName];var i=r[t];i?Array.isArray(i)?i.push(e):r[t]=[i,e]:r[t]=e}),r}return e},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),V=function(e){function t(){e.call(this,E.Universe10.Resource.name,null,!0)}return p(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[E.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=b.absoluteUri(t.asElement()),e.completeRelativeUri=b.completeRelativeUri(t.asElement()),A.isResourceType(t.parent().definition())?e.parentUri=b.completeRelativeUri(t.parent()):e.parentUri=""}return e},t}(F),j=function(e){function t(t){void 0===t&&(t={}),e.call(this,E.Universe10.TypeDeclaration.name,null,!0),this.options=t}return p(t,e),t.prototype.transform=function(e,t){var n=Array.isArray(e);if(n&&0==e.length)return e;var r=n?e[0]:e,i=b.typeExample(t.asElement(),this.options.dumpXMLRepresentationOfExamples);if(i)r.examples=[i];else{var a=b.typeExamples(t.asElement(),this.options.dumpXMLRepresentationOfExamples);a.length>0&&(r.examples=a)}if(delete r.example,r.hasOwnProperty("schema")){if(r.hasOwnProperty("type")){var o=r.type;Array.isArray(o)||(o=[o],r.type=o);var s=r.schema;Array.isArray(s)?s.forEach(function(e){return o.push(e)}):o.push(s)}else r.type=r.schema;delete r.schema}if(Array.isArray(r.type)||(r.type=[r.type]),r.mediaType=R,t&&t.isElement()){var u=t.asElement(),l=u.localType().isExternal()?u.localType():null;if(!l)for(var p=0,c=u.localType().allSuperTypes();p"===g[g.length-1];E?r.typePropertyKind="JSON":S&&(r.typePropertyKind="XML")}else r.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof o&&(r.typePropertyKind="INPLACE");if(this.options.unfoldTypes&&(r.unfolded=this.processExpressions(r)),1==r.type.length){var _=r.type[0];if("string"==typeof _){_=_.trim();var N=T.stringEndsWith(_,"[]");if(N){for(var w=_.substring(0,_.length-"[]".length).trim();w.length>0&&"("==w.charAt(0)&&")"==w.charAt(w.length-1);)w=w.substring(1,w.length-1);r.type[0]="array",r.items=w}}}return e},t.prototype.processExpressions=function(e){var t=T.deepCopy(e);return this.parseExpressions(t),t},t.prototype.parseExpressions=function(e){if(this.parseExpressionsForProperty(e,"type"),this.parseExpressionsForProperty(e,"items"),e.properties)for(var t=0,n=Object.keys(e.properties);t=0)if(l=y.escapeTemplateParameters(o),l.status==y.ParametersEscapingStatus.OK){if(s=l.resultingString,u=y.checkExpression(s),!u)continue}else if(l.status==y.ParametersEscapingStatus.ERROR)continue;var p=void 0;try{p=g.parse(s)}catch(c){continue}if(p){var f=this.expressionToObject(p,l);null!=f&&(i[a]=f)}}}}e[t]=r?i[0]:i}},t.prototype.expressionToObject=function(e,t){var n,r=0;if("name"==e.type){var i=e;if(r=i.arr,n=i.value,t.status==y.ParametersEscapingStatus.OK){var a=y.unescapeTemplateParameters(n,t.substitutions);a.status==y.ParametersEscapingStatus.OK?n=a.resultingString:a.status==y.ParametersEscapingStatus.ERROR&&(n=null)}}else if("union"==e.type){var o=e;n={type:["union"],options:[]};for(var s=this.toOptionsArray(o),u=0,l=s;u0;)n={type:["array"],items:n};return n},t.prototype.toOptionsArray=function(e){for(var t,n=e.first,r=e.rest;"parens"==n.type&&0==n.arr;)n=n.expr;for(;"parens"==r.type&&0==r.arr;)r=r.expr;return t="union"==n.type?this.toOptionsArray(n):[n],"union"==r.type?t=t.concat(this.toOptionsArray(r)):t.push(r),t},t}(F),W=function(e){function t(){e.call(this,new B([new U(E.Universe10.TypeDeclaration.name,E.Universe10.LibraryBase.properties.annotationTypes.name,!0,["RAML10"]),new U(E.Universe10.TypeDeclaration.name,E.Universe10.LibraryBase.properties.types.name,!0,["RAML10"]),new U(E.Universe10.Trait.name,E.Universe10.LibraryBase.properties.traits.name,!0,["RAML10"]),new U(E.Universe10.AbstractSecurityScheme.name,E.Universe10.LibraryBase.properties.securitySchemes.name,!0,["RAML10"]),new U(E.Universe10.ResourceType.name,E.Universe10.LibraryBase.properties.resourceTypes.name,!0,["RAML10"])]))}return p(t,e),t.prototype.transform=function(e,t){if(!t.parent()||!t.parent().lowLevel().libProcessed)return e;var n=t.lowLevel(),r=n.key();e.$$name=r;for(var i=n;f.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e;return o.name=a,o.displayName==r&&(o.displayName=a),e},t}(k),q=function(e){function t(){e.call(this,new B([new U(E.Universe10.ResourceType.name,null,!0),new U(E.Universe10.Trait.name,null,!0),new U(E.Universe10.Method.name,null,!0),new U(E.Universe10.TypeDeclaration.name,null,!0)]))}return p(t,e),t.prototype.transform=function(e){if(Array.isArray(e))return e;var t=d.universesInfo.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},t}(k),Y=function(e){function t(){e.call(this,new B([new U(E.Universe10.ObjectTypeDeclaration.name,E.Universe10.ObjectTypeDeclaration.properties.properties.name,!0)]),"name")}return p(t,e),t}(K),H=function(e){function t(){e.call(this,E.Universe08.GlobalSchema.name,E.Universe08.Api.properties.schemas.name,!0,["RAML08"])}return p(t,e),t.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,t},t}(F),$=function(e){function t(){e.call(this,new B([new U(E.Universe10.Api.name,E.Universe10.Api.properties.protocols.name,!0),new U(E.Universe10.MethodBase.name,E.Universe10.MethodBase.properties.protocols.name,!0)]))}return p(t,e),t.prototype.transform=function(e){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},t}(k),G=function(e){function t(){e.call(this,new B([new U(E.Universe10.SecuritySchemeRef.name,E.Universe10.Api.properties.securedBy.name,!0),new U(E.Universe10.TraitRef.name,E.Universe10.MethodBase.properties.is.name,!0),new U(E.Universe10.ResourceTypeRef.name,E.Universe10.ResourceBase.properties.type.name,!0)]))}return p(t,e),t.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},t.prototype.toSimpleValue=function(e){if("string"==typeof e)return e;var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},t}(k),X=function(e){function t(t){void 0===t&&(t=!1),e.call(this,new B([new U(E.Universe10.Api.name,null,!0)])),this.enabled=t}return p(t,e),t.prototype.match=function(t,n){return this.enabled?e.prototype.match.call(this,t,n):!1},t.prototype.registrationInfo=function(){return this.enabled?e.prototype.registrationInfo.call(this):null},t.prototype.transform=function(e,n,r){var i=this,a=r,o=e[t.uriParamsPropName];if(o&&(a=[].concat(r||[]),Object.keys(o).forEach(function(e){var t=o[e];Array.isArray(t)?t.forEach(function(e){return a.push(e)}):a.push(t)})),a){e.allUriParameters=a;var s=e[t.methodsPropName];s&&Object.keys(s).forEach(function(e){return s[e].allUriParameters=a})}var u=e[t.resourcesPropName];return u&&u.forEach(function(e){return i.transform(e,null,a)}),e},t.uriParamsPropName=E.Universe10.ResourceBase.properties.uriParameters.name,t.methodsPropName=E.Universe10.ResourceBase.properties.methods.name,t.resourcesPropName=E.Universe10.Api.properties.resources.name,t}(k),z=function(e){function t(){e.call(this,new B([new U(E.Universe10.ResourceBase.name,E.Universe10.ResourceBase.properties.methods.name,!0),new U(E.Universe08.Resource.name,E.Universe08.Resource.properties.methods.name,!0),new U(E.Universe08.ResourceType.name,E.Universe08.ResourceType.properties.methods.name,!0)]),"method")}return p(t,e),t}(K),J=function(e){function t(){e.call(this,new B([new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.types.name,!0),new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.schemas.name,!0),new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.annotationTypes.name,!0)]),"name")}return p(t,e),t}(K),Q=function(e){function t(){e.call(this,new B([new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.traits.name,!0),new U(E.Universe08.Api.name,E.Universe08.Api.properties.traits.name,!0)]),"name")}return p(t,e),t}(K),Z=function(e){function t(){e.call(this,new B([new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.resourceTypes.name,!0),new U(E.Universe08.Api.name,E.Universe10.Api.properties.resourceTypes.name,!0,["RAML08"])]),"name")}return p(t,e),t}(K),ee=function(e){function t(){e.call(this,new B([new U(E.Universe10.LibraryBase.name,E.Universe10.LibraryBase.properties.securitySchemes.name,!0),new U(E.Universe08.Api.name,E.Universe08.Api.properties.securitySchemes.name,!0,["RAML08"])]),"name")}return p(t,e),t}(K),te=function(e){function t(){e.call(this,new B([new U(E.Universe10.Api.name,E.Universe10.Api.properties.baseUriParameters.name,!0),new U(E.Universe10.ResourceBase.name,E.Universe10.ResourceBase.properties.uriParameters.name,!0),new U(E.Universe08.Resource.name,E.Universe08.Resource.properties.uriParameters.name,!0,["RAML08"]),new U(E.Universe10.ResourceBase.name,E.Universe10.MethodBase.properties.queryParameters.name,!0),new U(E.Universe10.MethodBase.name,E.Universe10.MethodBase.properties.queryParameters.name,!0),new U(E.Universe10.Operation.name,E.Universe10.MethodBase.properties.queryParameters.name,!0),new U(E.Universe10.Operation.name,E.Universe10.MethodBase.properties.headers.name,!0),new U(E.Universe10.MethodBase.name,E.Universe10.MethodBase.properties.headers.name,!0),new U(E.Universe08.BodyLike.name,E.Universe08.BodyLike.properties.formParameters.name)]),"name")}return p(t,e),t}(K),ne=function(e){function t(){e.call(this,new B([new U(E.Universe10.MethodBase.name,E.Universe10.MethodBase.properties.responses.name,!0)]),"code")}return p(t,e),t}(K),re=function(e){function t(){e.call(this,new B([new U(E.Universe10.Annotable.name,E.Universe10.Annotable.properties.annotations.name,!0)]),"name")}return p(t,e),t}(K),ie=function(e){function t(){e.call(this,new B([new U(E.Universe10.Response.name,E.Universe10.Response.properties.body.name),new U(E.Universe10.MethodBase.name,E.Universe10.MethodBase.properties.body.name,!0)]),"name")}return p(t,e),t}(K),ae=function(e){function t(){e.call(this,new B([new U(E.Universe10.TypeDeclaration.name,E.Universe10.TypeDeclaration.properties.facets.name,!0)]),"name")}return p(t,e),t}(K),oe=function(e){function t(){e.call(this,new B([new U(E.Universe10.LibraryBase.name,null,!0,["RAML10"])]))}return p(t,e),t.prototype.transform=function(e,t){if(!e)return e;if(!e.hasOwnProperty("schemas"))return e;var n=e.schemas;if(e.hasOwnProperty("types")){var r=e.types;Object.keys(n).forEach(function(e){r.hasOwnProperty(e)||(r[e]=n[e])})}else e.types=n;return delete e.schemas,e},t}(k);t.mergeRegInfos=u},function(e,t,n){"use strict";function r(e){var t={};return e.forEach(function(e){return Object.keys(e).forEach(function(n){return t[n]=e[n]})}),t}function i(e,t){return new N(_.find(e||[],t))}function a(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function o(e){var t={};return e.forEach(function(e){return t[e[0]]=e[1]}),t}function s(e,t){return t(e),e}function u(e,t){"object"==typeof e&&Object.keys(e).forEach(function(n){return t(n,e[n])})}function l(e,n,r){void 0===r&&(r=!1);var i={};return e.forEach(function(e){var a=t.shallowCopy(e);r&&delete a[n],i[e[n]]=a}),i}function p(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n}function c(e,t,n){return void 0===n&&(n=0),e.length-t.length>=n&&e.substring(n,n+t.length)===t}function f(e){return"_"==e[e.length-1]}function d(e,t,n){var r,i=!1;e[t]=function(){return i||(i=!0,r=n.apply(e)),r}}function h(e,n){void 0===n&&(n=f);for(var r in e)n(r)&&t.ifInstanceOf(e[r],Function,function(t){return 0===t.length?d(e,r,t):null})}function m(e,t){void 0!==e&&t(e)}function y(e){return"string"!=typeof e||""==e?!1:p(e,".raml")}function v(e){for(var t,n=[],r=new RegExp("require\\('([^']+)'\\)","gi");t=r.exec(e);)n.push(t[1]);for(var i=new RegExp('require\\("([^"]+)"\\)',"gi");t=i.exec(e);)n.push(t[1]);return n=_.unique(n).filter(function(e){return""!=e}),n.sort(),n}function g(e){return"undefined"!=typeof e&&null!=e}function A(e){return 0==e.length?e:e.charAt(0).toUpperCase()+e.substr(1)}function E(e,t,n){void 0===n&&(n=!1);var r=Object.keys(t);if(n){var i={};r.forEach(function(e){return i[e]=!0}),Object.keys(e).forEach(function(e){return i[e]=!0}),r=Object.keys(i)}r.forEach(function(n){var r=e[n];r instanceof Object?(t[n]||(t[n]={}),E(r,t[n],!0)):void 0!=r&&(t[n]=e[n])})}function T(e,t){return Object.keys(t).forEach(function(n){return e=S(e,n,t[n])}),e}function S(e,t,n){for(var r="",i=0,a=e.indexOf(t);a=0;a=e.indexOf(t,i))r+=e.substring(i,a),r+=n,i=a+t.length;return r+=e.substring(i,e.length)}function b(e){if(null==e||"object"!=typeof e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0,r=e;n=0;if(s){var u=a?i.getAnnotationTypeRegistry():i.getTypeRegistry();n=u.get(o)}else n=a?i.getAnnotationType(o):i.getType(o)}}return new ye.TypeInstanceImpl(t,n)}function Y(e){var t=e.highLevel().value();return"string"==typeof t||null==t?t:Ae.StructuredValue.isInstance(t)?t.valueName():null}function H(e){return X(e)}function $(e){return X(e)}function G(e){return X(e)}function X(e){var t=e.highLevel(),n=t.parent(),r=e.name(),i=Le.referenceTargets(t.property(),n).filter(function(e){return Ae.qName(e,n)==r});return 0==i.length?null:i[0].wrapperNode()}function z(e,t,n,r){void 0===r&&(r=!0);var i=t.lowLevel(),a=t.definition().property(n?"example":"examples"),o=Se.getUniverse("RAML10"),s=o.type(be.Universe10.ExampleSpec.name),u=e.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==n});return u.map(function(e){var n=e.asJSON(),o=e.isSingle()?"example":null,u=i.unit(),l=new Oe.AstNode(u,n,i,null,o),p=r?new Ae.ASTNodeImpl(l,t,s,a):t,c=e.annotations(),f=ke(c,l,p,u),d=e.scalarsAnnotations(),h={};Object.keys(d).forEach(function(e){return h[e]=ke(d[e],l,p,u)});var m=new Ve(p,e,f,{description:function(){return h.description||[]},displayName:function(){return h.displayName||[]},strict:function(){return h.strict||[]}});return m})}function J(e,t){void 0===t&&(t=!1);var n=e.runtimeDefinition();if(!n)return[];var r=e.highLevel();return z(n,r,t)}function Q(e){var t=J(e,!0);return t.length>0?t[0]:null}function Z(e){return J(e)}function ee(e){var t=e.runtimeDefinition(),n=t.fixedFacets();if(e.kind()==be.Universe10.UnionTypeDeclaration.name)for(var r=t.allFixedBuiltInFacets(),i=0,a=Object.keys(r);i=0&&(l=t.indexOf("}",++c),!(0>l));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var d=a.universe(),h=d.type(be.Universe10.StringTypeDeclaration.name),m=Te.createStubNode(h,null,f,i.lowLevel().unit()),y=me.buildWrapperNode(m),v=y.highLevel();v.setParent(i),y.meta().setCalculated(),y.setName(f),v.patchProp(o),u.push(y)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function ce(e){if(e.kind()==be.Universe10.Method.name||xe.isTypeDeclarationSibling(e.definition())){for(var t=!1,n=e.highLevel().parent();null!=n;){var r=n.definition();if(xe.isResourceTypeType(r)||xe.isTraitType(r)){t=!0;break}n=n.parent()}if(!t)return null}var i=e.highLevel();if(null==i)return null;var a=i.lowLevel();if(null==a)return null;var o=a.children().filter(function(e){var t=e.key();return t?"("==t.charAt(0)&&")"==t.charAt(t.length-1)?!1:t.indexOf("<<")>=0:!1});if(0==o.length)return null;var s=new ye.TypeInstanceImpl(o);return s}var fe=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},de=n(11),he=n(21),me=n(47),ye=n(51),ve=n(57),ge=n(9),Ae=n(16),Ee=n(28),Te=n(17),Se=n(39),be=n(18),_e=n(18),Ne=n(22),we=n(33),Re=n(27),Ie=n(30),Me=n(44),Ce=n(53),Le=n(13),Pe=n(24),Oe=n(54),De=n(15),xe=n(14),Ue=n(29);t.resolveType=r,t.runtimeType=i,t.load=a,t.completeRelativeUri=o,t.expandLibrarySpec=s,t.expandSpec=u,t.expandTraitsAndResourceTypes=l,t.expandLibraries=p,t.absoluteUri=c,t.validateInstance=f,t.validateInstanceWithDetailedStatuses=d,t.traitsPrimary=h,t.allTraits=m,t.resourceTypesPrimary=y,t.allResourceTypes=v,t.relativeUriSegments=A,t.parentResource=E,t.parent=T,t.childResource=S,t.getResource=b,t.childMethod=_,t.getMethod=N,t.ownerApi=R,t.methodId=I,t.isOkRange=M,t.allResources=C,t.matchUri=L;t.uriParametersPrimary=P,t.uriParameters=O,t.baseUriParametersPrimary=D,t.baseUriParameters=x,t.absoluteUriParameters=U,t.protocolsPrimary=k,t.allProtocols=F,t.securedByPrimary=B,t.allSecuredBy=K,t.securitySchemeName=V,t.securityScheme=j,t.RAMLVersion=W,t.structuredValue=q,t.referenceName=Y,t.referencedTrait=H,t.referencedAnnotation=$,t.referencedResourceType=G;var ke=function(e,t,n,r){var i=[];if(e)for(var a=Se.getUniverse("RAML10"),o=a.type("Annotable").property("annotations"),s=0,u=Object.keys(e);s0?e.type()[0]:"string",this.example=e.example(),this.required=e.required(),this["default"]=e["default"]()}return e}(),Ve=function(e){function t(t,n,r,i){e.call(this,t),this.expandable=n,this._annotations=r,this._scalarAnnotations=i}return fe(t,e),t.prototype.value=function(){return this.expandable.asString()},t.prototype.structuredValue=function(){var e;e=this.expandable.isJSONString()||this.expandable.isYAML()?this.expandable.asJSON():this.expandable.original();var t=this._node.lowLevel(),n=this.expandable.isSingle()?"example":null,r=new Oe.AstNode(t.unit(),e,t,null,n);return new ye.TypeInstanceImpl(r)},t.prototype.strict=function(){return this.expandable.strict()},t.prototype.description=function(){var e=this.expandable.description();if(null==e&&null!==e)return null;var t=Te.createAttr(this._node.definition().property(be.Universe10.ExampleSpec.properties.description.name),e),n=new he.MarkdownStringImpl(t);return n},t.prototype.name=function(){return this.expandable.name()},t.prototype.displayName=function(){return this.expandable.displayName()},t.prototype.annotations=function(){return this._annotations},t.prototype.scalarsAnnotations=function(){return this._scalarAnnotations},t.prototype.uses=function(){return e.prototype.elements.call(this,"uses")},t}(ye.BasicNodeImpl);t.ExampleSpecImpl=Ve},function(e,t,n){"use strict";function r(e){for(var t=[],n={};null!=e.parent();)e.lowLevel().includePath()&&(t=t.concat(a(e,n))),e=e.parent();return t=t.concat(a(e,n))}function i(e){var t=e.node();if(t&&x.isParseResult(t))return t;var n=V.getNominalPropertySource2(e);return n?n.getSource():null}function a(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=[]),!e.lowLevel())return[];var r=e.lowLevel().unit().absolutePath();if(t[r]=!0,!F.ASTNodeImpl.isInstance(e))return n;var i=!1;return e.elements().forEach(function(e){if(e.definition().key()==B.Universe10.UsesDeclaration){if(i)return;var r=e.attr("value");if(r){var o=e.root().lowLevel().unit().resolve(r.value());if(o&&j.isWaitingFor(o.absolutePath()))return void(i=!0);null!=o&&o.isRAMLUnit()&&!t[o.absolutePath()]&&o.highLevel().isElement()&&a(o.highLevel().asElement(),t,n)}}else n.push(e)}),n}function o(e,t){for(var n="",r=e-1;r>=0;r--){var i=t.charAt(r);if(" "==i||" "==i)n?n+=i:n=i;else if("\r"==i||"\n"==i)return n}}function s(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){if(F.ASTNodeImpl.isInstance(e)){for(var a=e,o=r?a.children():a.directChildren(),u=0;u=0;r--){var i=e.charAt(r);if("\r"==i||"\n"==i||" "==i||" "==i||'"'==i||"'"==i||":"==i){n=r+1;break}}for(var a=-1,r=t;r=0;r--){var i=e[r];if(" "==i||"\r"==i||"\n"==i||"|"==i||"["==i||"]"==i||":"==i||"("==i||")"==i)break;n=i+n}for(var r=t+1;r0){var i=r(t).filter(function(e){return null!=U.find(s.globallyDeclaredBy(),function(t){return t==e.definition()})});return i}}return[]}function f(e,t){if(t){var n=[];if(e.getAdapter(K.RAMLPropertyService).isTypeExpr()){var i=r(t).filter(function(e){var t=e.definition().key();return t===B.Universe08.GlobalSchema?!0:e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)});var a=t.definition().universe().type(B.Universe10.TypeDeclaration.name);if(a){var o=a.allSubTypes();n=n.concat(o.map(function(e){return e.getAdapter(K.RAMLService).descriminatorValue()}))}return n}var s=e.range().key();if((s==B.Universe08.SchemaString||s==B.Universe10.SchemaString)&&"RAML10"==e.range().universe().version()&&e.range().hasValueTypeInHierarchy()){var i=r(t).filter(function(e){return e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)})}if(e.getAdapter(K.RAMLPropertyService).isDescriminating()){var o=b(e.domain(),t);n=n.concat(o.map(function(e){return e.getAdapter(K.RAMLService).descriminatorValue()}))}else if(e.isReference()){var u=w(e.referencesTo(),t);n=u.map(function(e){return F.qName(e,t)})}else if(e.range().hasValueTypeInHierarchy()){var l=e.range().getAdapter(K.RAMLService);if(l.globallyDeclaredBy().length>0){var i=r(t).filter(function(e){return null!=U.find(l.globallyDeclaredBy(),function(t){return t==e.definition()})});n=n.concat(i.map(function(e){return F.qName(e,t)}))}}return e.isAllowNull()&&n.push("null"),e.enumOptions()&&(n=n.concat(e.enumOptions())),n}return e.enumOptions()&&"string"==typeof e.enumOptions()?[e.enumOptions()+""]:e.enumOptions()}function d(e){return e.isElement()&&e.asElement().definition().key()!=B.Universe10.Library?null:e.asElement().attrValue("name")}function h(e,t){var n=e.lowLevel().unit();if(!n)return null;var r=e.lowLevel().start(),i=e.lowLevel().end();if(null!=t&&t==q.KEY_COMPLETION?(r=e.lowLevel().keyStart(),i=e.lowLevel().keyEnd()):null!=t&&t==q.VALUE_COMPLETION&&(r=e.lowLevel().valueStart(),i=e.lowLevel().valueEnd()),-1==r||-1==i)return null;var a=Math.floor((r+i)/2);return m(n,a,t)}function m(e,t,n){var r=s(F.fromUnit(e),t,t,!1),a=null;if(r.isElement()&&r.asElement().definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)&&r.asElement().directChildren().forEach(function(e){if(e.isUnknown()&&e.getLowLevelStart()t){var n=r.asElement().localType();n.allFacets().forEach(function(t){if(t.nameId()==e.lowLevel().key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}}),!r.property())return r;if("example"==r.property().nameId()){r.parent().localType();r.lowLevel().children().forEach(function(e){"example"==e.key()&&e.children().forEach(function(e){if(e.start()t){var n=r.parent().asElement().localType();n.allProperties().forEach(function(t){if(t.nameId()==e.key()&&k.UserDefinedProp.isInstance(t)){var n=i(t);a=n}})}})})}if(a)return a;var o=null!=n?n:T(e.contents(),t);if(o==q.VALUE_COMPLETION){var l=r;if(F.ASTPropImpl.isInstance(r)){var p=r;if(p&&p.value()){if(!F.StructuredValue.isInstance(p.value()))return W(t,e.contents(),p,l);var c=p.value(),f=c.toHighLevel();if(f){var d=U.find(f.attrs(),function(e){return e.lowLevel().start()=t});if(d)return W(t,e.contents(),d,f,p.property())}}}else{var h=l.property();if(h)return W(t,e.contents(),null,l,h)}}if(o==q.KEY_COMPLETION||o==q.SEQUENCE_KEY_COPLETION){var l=r,m=r.property();if(D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.isAssignableFrom("TypeDeclaration")?r:A.getAdapter(K.RAMLService).getDeclaringNode()}if(F.ASTPropImpl.isInstance(r)){var S=r;if(E(S)){var b=y(S);if(b){var _=v(S,b);if(_){var r=s(_,t,t);if(m=r.property(),D.UserDefinedProp.isInstance(m)){var g=m;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&D.isUserDefinedClass(l.definition())){var A=l.definition();return A.getAdapter(K.RAMLService).getDeclaringNode()}}}}}}if(o==q.PATH_COMPLETION){var N=u(e.contents(),t);if(N){var w=e.resolve(N);return w}}}function y(e){var t=null;if(e.isElement()?t=e:e.isAttr()&&(t=e.parent()),!t.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)){var n=t.parent();if(!n)return null;if(n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))t=n;else{if(n=n.parent(),null==n)return null;if(!n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))return null;t=n}}return t.localType()}function v(e,t){return F.StructuredValue.isInstance(e.value())?new F.ASTNodeImpl(e.value().lowLevel(),e.parent(),t,e.property()):null}function g(e,t){return new F.ASTNodeImpl(e.lowLevel(),e,t,e.property())}function A(e){return e.definition().key()==B.Universe10.ExampleSpec}function E(e){var t=B.Universe10.TypeDeclaration.properties.example.name,n=B.Universe10.ObjectTypeDeclaration.name;if(!F.ASTPropImpl.isInstance(e))return!1;var r=e,i=r.parent(),a=i&&i.property();a&&a.nameId();return t===r.name()&&r.isString()&&F.ASTNodeImpl.isInstance(i)&&i.definition().isAssignableFrom(n)?!0:!1}function T(e,t){for(var n=!1,r=!1,i=!1,a=t-1;a>=0;a--){var s=e.charAt(a);if("("==s)i=!0;else{if(i){if("\r"==s||"\n"==s){for(var u=!1,l=t-1;l=0;a--){var s=e.charAt(a);if("#"==s){if(0==a)return q.VERSION_COMPLETION;for(var l=a-1;l>=0;l--){var c=e.charAt(l);if("\r"==c||"\n"==c)break;if("!"==c&&e.indexOf("!include",l)==l)return q.PATH_COMPLETION}return q.INCOMMENT}if(":"==s)return n?q.DIRECTIVE_COMPLETION:q.VALUE_COMPLETION;if("\r"==s||"\n"==s){for(var f=!1,d=o(t,e),h=a;h>0;h--){if(s=e.charAt(h),":"==s){if(f){var m=o(h,e);if(m.length0&&n){var u=r(n),l=e.getAdapter(K.RAMLService).getRuntimeExtenders();n.root();l.forEach(function(t){var n=u.filter(function(n){var r=n.definition().allSuperTypes();r.push(n.definition());var i=n.definition()==t||null!=U.find(r,function(e){return e==t})||null!=U.find(r,function(t){return t==e});return i});s=s.concat(n.map(function(e){return e.localType()}))})}return s=U.unique(s),a._subTypesCache[i]=s,s}function _(e,n,i){n=t.declRoot(n);var a=r(n),o=U.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.types.name});return o.localType()}function N(e,n,i){n=t.declRoot(n);var a=r(n),o=U.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.schemas.name});return o.localType()}function w(e,t){var n=[],i=[e].concat(e.getAdapter(K.RAMLService).getRuntimeExtenders());if(t){var a=t;i.forEach(function(e){var t=r(a),i=t.filter(function(t){return t.definition().isAssignableFrom(e.nameId())});n=n.concat(i)})}var o=!e.hasValueTypeInHierarchy();if(o&&e.getAdapter(K.RAMLService).isInlinedTemplates()&&t){var a=t,s=r(a).filter(function(t){return t.definition()==e});n=n.concat(s)}else{var a=t,u={};e.allSubTypes().forEach(function(e){return u[e.nameId()]=!0}),u[e.nameId()]=!0;var s=r(a).filter(function(e){return u[e.definition().nameId()]});n=n.concat(s)}return n}function R(e,t){var n=e.range();return b(n,t)}function I(e,t){if(t){if(e.isDescriminator()){var n=e.range(),i=n.getAdapter(K.RAMLService).getRuntimeExtenders();if(i.length>0&&t){var a=[];return i.forEach(function(e){var n=r(t).filter(function(t){return t.definition()==e});a=a.concat(n)}),a}return[]}if(e.isReference())return w(e.referencesTo(),t);if(e.range().hasValueTypeInHierarchy()){var o=e.range().getAdapter(K.RAMLService);if(o.globallyDeclaredBy&&o.globallyDeclaredBy().length>0){var s=r(t).filter(function(e){return null!=U.find(o.globallyDeclaredBy(),function(t){return t==e.definition()})});return s}}}return[]}function M(e){var t=[];return C(e,t),t}function C(e,t){e.children().forEach(function(e){t.push(e),C(e,t)})}function L(e,t,n){e.elements().forEach(function(e){L(e,t,n);e.definition()}),e.attrs().forEach(function(r){var i=r.property(),a=r.value();if(D.UserDefinedProp.isInstance(i)){var o=i.node();o==t?n.push(r):o.lowLevel().start()==t.lowLevel().start()&&o.lowLevel().unit()==t.lowLevel().unit()&&n.push(r)}if(E(r)){var s=y(r);if(s){var u=v(r,s);u&&L(u,t,n)}}else if(i.getAdapter(K.RAMLPropertyService).isTypeExpr()&&"string"==typeof a){var l=e.localType();Y(l,r,t,n);var p=d(t);if(p&&-1!=a.indexOf(p)){var c=P(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}if(i.isReference()||i.isDescriminator()){if("string"==typeof a){var f=I(i,e);U.find(f,function(e){return e.name()==a&&e==t})&&n.push(r);var p=d(t);if(p&&-1!=a.indexOf(p)){var c=P(r);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}else if(F.StructuredValue.isInstance(a)){var h=a;if(h){var m=h.valueName(),f=I(i,e);U.find(f,function(e){return e.name()==m&&e==t})&&n.push(r);var g=h.toHighLevel();g&&L(g,t,n);var p=d(t);if(p&&-1!=m.indexOf(p)){var c=P(g);c&&c.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}}}else{var f=I(i,e);U.find(f,function(e){return e.name()==a&&e==t})&&n.push(r)}})}function P(e){if(!e.lowLevel)return null;var t=e.lowLevel();if(!t)return null;if(t.key()){var n=Math.floor((t.keyEnd()+t.keyStart())/2),r=O(t.unit(),n);if(r)return r}if(t.value()){var n=Math.floor((t.valueEnd()+t.valueStart())/2),r=O(t.unit(),n);if(r)return r}return null}function O(e,t){var n=m(e,t);if(n&&n.isElement&&n.isElement())for(var r=n.asElement(),i=r;i;){if(i.definition().key()==B.Universe10.Library)return i;i=i.parent()}return null}var D=n(39),x=n(9),U=n(70),k=n(39),F=n(16),B=n(18),K=k,V=n(36),j=n(25);t.declRoot=function(e){for(var t=e;;){if(t.definition().key()==B.Universe10.Library)break;var n=t.parent();if(!n)break;t=n}return t},t.globalDeclarations=r,t.findDeclarations=a,t.deepFindNode=s,t.extractName=l;var W=function(e,t,n,r,a){void 0===a&&(a=n.property());var o=c(a,r),s=l(t,e),u=U.find(o,function(e){return F.qName(e,r)==s});if(u)return u;if(D.UserDefinedProp.isInstance(a)){var p=a;return i(p)}return null};t.findUsages=p,t.referenceTargets=c,t.enumValues=f,t.findDeclarationByNode=h,t.findDeclaration=m,t.findExampleContentType=y,t.parseDocumentationContent=v,t.parseStructuredExample=g,t.isExampleNode=A,t.isExampleNodeContent=E,t.determineCompletionKind=T,function(e){e[e.VALUE_COMPLETION=0]="VALUE_COMPLETION",e[e.KEY_COMPLETION=1]="KEY_COMPLETION",e[e.PATH_COMPLETION=2]="PATH_COMPLETION",e[e.DIRECTIVE_COMPLETION=3]="DIRECTIVE_COMPLETION",e[e.VERSION_COMPLETION=4]="VERSION_COMPLETION",e[e.ANNOTATION_COMPLETION=5]="ANNOTATION_COMPLETION",e[e.SEQUENCE_KEY_COPLETION=6]="SEQUENCE_KEY_COPLETION",e[e.INCOMMENT=7]="INCOMMENT"}(t.LocationKind||(t.LocationKind={}));var q=t.LocationKind;t.resolveReference=S,t.subTypesWithLocals=b,t.subTypesWithName=_,t.schemasWithName=N,t.nodesDeclaringType=w,t.findAllSubTypes=R,t.allChildren=M;var Y=function(e,t,n,r){var i=e.getAdapter(K.RAMLService).getDeclaringNode();if(i&&n.isSameNode(i))return void r.push(t);if(e.isArray()&&Y(e.array().componentType(),t,n,r),e.isUnion()){var a=e.union();Y(a.leftType(),t,n,r),Y(a.rightType(),t,n,r)}e.superTypes().some(function(e){return e.nameId()==n.name()})&&r.push(t)};t.refFinder=L},function(e,t,n){"use strict";function r(e){var t=e.getExtra(p.SOURCE_EXTRA);return null==t?null:l.isSourceProvider(t)?t:f.isLowLevelNode(t)?{getSource:function(){return t.highLevelNode()}}:c.isParseResult(t)?{getSource:function(){return t}}:null}function i(e){return r(e)}function a(e){var t=e.getAdapters();return t?h.find(t,function(e){return l.rt.isParsedType(e)}):null}function o(e){if(!e)return null;var t=e.getExtra(p.SOURCE_EXTRA);if(t)return r(e);var n=a(e);return n?i(n):null}function s(e,t){var n=o(e);return n?{getSource:function(){var e=n.getSource(),r=e.asElement();if(null==r)return null;var i=r.elementsOfKind(d.Universe10.ObjectTypeDeclaration.properties.properties.name);return null==i||0==i.length?null:h.find(i,function(e){return t==e.attrValue(d.Universe10.TypeDeclaration.properties.name.name)})}}:null}function u(e){return s(e.domain(),e.nameId())}var l=n(39),p=l.rt,c=n(9),f=n(10),d=n(18),h=n(70);t.getExtraProviderSource=r,t.getRTypeSource=i,t.findRTypeByNominal=a,t.getNominalTypeSource=o,t.getNominalPropertySource=s,t.getNominalPropertySource2=u},function(e,t,n){"use strict";var r=n(39);e.exports=r},function(e,t,n){"use strict";var r=n(39);e.exports=r.getUniverse},function(e,t,n){"use strict";function r(){return t.rt.getSchemaUtils()}function i(e){e.isUnion?e.addAdapter(new N(e)):e.range&&e.addAdapter(new _(e))}function a(e){return e.getSource&&"function"==typeof e.getSource}function o(e){var t=e;return t.genuineUserDefinedType&&t.isUserDefined&&t.isUserDefined()}function s(e,t,n,r,i){var a=new E(e,t);return a.withDomain(n,i).withRange(r)}var u=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};t.rt=n(86);var l=t.rt.nominalTypes;t.getSchemaUtils=r,t.TOP_LEVEL_EXTRA=t.rt.TOP_LEVEL_EXTRA,t.DEFINED_IN_TYPES_EXTRA=t.rt.DEFINED_IN_TYPES_EXTRA,t.USER_DEFINED_EXTRA=t.rt.USER_DEFINED_EXTRA,t.SOURCE_EXTRA=t.rt.SOURCE_EXTRA,t.tsInterfaces=t.rt.tsInterfaces,t.injector={inject:function(e){i(e)}},l.registerInjector(t.injector);var p=function(e){function t(){e.apply(this,arguments)}return u(t,e),t}(l.AbstractType);t.AbstractType=p;var c=function(e){function t(){e.apply(this,arguments)}return u(t,e),t}(l.ValueType);t.ValueType=c;var f=function(){function e(){}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n",'"',"`"," ","\r","\n"," "],y=["{","}","|","\\","^","`"].concat(m),v=["'"].concat(y),g=["%","/","?",";","#"].concat(v),A=["/","?","#"],E=255,T=/^[a-z0-9A-Z_-]{0,63}$/,S=/^([a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},N={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=n(85);r.prototype.parse=function(e,t,n){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var i=d.exec(r);if(i){i=i[0];var a=i.toLowerCase();this.protocol=a,r=r.substr(i.length)}if(n||i||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var o="//"===r.substr(0,2);!o||i&&_[i]||(r=r.substr(2),this.slashes=!0)}if(!_[i]&&(o||i&&!N[i])){for(var s=-1,l=0;lp)&&(s=p)}var c,h;h=-1===s?r.lastIndexOf("@"):r.lastIndexOf("@",s),-1!==h&&(c=r.slice(0,h),r=r.slice(h+1),this.auth=decodeURIComponent(c)),s=-1;for(var l=0;lp)&&(s=p)}-1===s&&(s=r.length),this.host=r.slice(0,s),r=r.slice(s),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var y=this.hostname.split(/\./),l=0,R=y.length;R>l;l++){var I=y[l];if(I&&!I.match(T)){for(var M="",C=0,L=I.length;L>C;C++)M+=I.charCodeAt(C)>127?"x":I[C];if(!M.match(T)){var P=y.slice(0,l),O=y.slice(l+1),D=I.match(S);D&&(P.push(D[1]),O.unshift(D[2])),O.length&&(r="/"+O.join(".")+r),this.hostname=P.join(".");break}}}if(this.hostname.length>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),!m){for(var x=this.hostname.split("."),U=[],l=0;ll;l++){var K=v[l],V=encodeURIComponent(K);V===K&&(V=escape(K)),r=r.split(K).join(V)}var j=r.indexOf("#");-1!==j&&(this.hash=r.substr(j),r=r.slice(0,j));var W=r.indexOf("?");if(-1!==W?(this.search=r.substr(W),this.query=r.substr(W+1),t&&(this.query=w.parse(this.query)),r=r.slice(0,W)):t&&(this.search="",this.query={}),r&&(this.pathname=r),N[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",k=this.search||"";this.path=F+k}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var o=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||N[t])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+i+n+o+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u(e)){var t=new r;t.parse(e,!1,!0),e=t}var n=new r;if(Object.keys(this).forEach(function(e){n[e]=this[e]},this),n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(n[t]=e[t])}),N[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(e.protocol&&e.protocol!==n.protocol){if(!N[e.protocol])return Object.keys(e).forEach(function(t){n[t]=e[t]}),n.href=n.format(),n;if(n.protocol=e.protocol,e.host||_[e.protocol])n.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),n.pathname=i.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var a=n.pathname||"",o=n.search||"";n.path=a+o}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var s=n.pathname&&"/"===n.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),f=l||s||n.host&&e.pathname,d=f,h=n.pathname&&n.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],m=n.protocol&&!N[n.protocol];if(m&&(n.hostname="",n.port=null,n.host&&(""===h[0]?h[0]=n.host:h.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),f=f&&(""===i[0]||""===h[0])),l)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,h=i;else if(i.length)h||(h=[]),h.pop(),h=h.concat(i),n.search=e.search,n.query=e.query;else if(!c(e.search)){if(m){n.hostname=n.host=h.shift();var y=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;y&&(n.auth=y.shift(),n.host=n.hostname=y.shift())}return n.search=e.search,n.query=e.query,p(n.pathname)&&p(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!h.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var v=h.slice(-1)[0],g=(n.host||e.host)&&("."===v||".."===v)||""===v,A=0,E=h.length;E>=0;E--)v=h[E],"."==v?h.splice(E,1):".."===v?(h.splice(E,1),A++):A&&(h.splice(E,1),A--);if(!f&&!d)for(;A--;A)h.unshift("..");!f||""===h[0]||h[0]&&"/"===h[0].charAt(0)||h.unshift(""),g&&"/"!==h.join("/").substr(-1)&&h.push("");var T=""===h[0]||h[0]&&"/"===h[0].charAt(0);if(m){n.hostname=n.host=T?"":h.length?h.shift():"";var y=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;y&&(n.auth=y.shift(),n.host=n.hostname=y.shift())}return f=f||n.host&&h.length,f&&!T&&h.unshift(""),h.length?n.pathname=h.join("/"):(n.pathname=null,n.path=null),p(n.pathname)&&p(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";function r(e){return e&&e.indexOf("\n")>=0}function i(e){return r(e)&&e.length>2&&"|"==e[0]&&("\n"==e[1]||"\r"==e[1]||"\n"==e[2])}function a(e,t){var n="";if(r(e)){n+="|\n";for(var i=d(e),a=0;ar;r++)n+=" ";return n+t}function l(e,t){void 0===t&&(t=""),console.log(u(e,t))}function p(e,t){void 0===t&&(t=null);for(var n="",r=0;r0;){var n=e[t-1];if(" "!=n&&" "!=n&&"\r"!=n&&"\n"!=n)break;t--}return e.substring(0,t)}function f(e){return s(c(e))}function d(e){var t=e.match(/^.*((\r\n|\n|\r)|$)/gm);return t}function h(e,t){if(!e||!t||e.length0;){var n=this.contents[t-1];if(" "!=n&&" "!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.extendToStartOfLine=function(){for(var t=this.start;t>0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendAnyUntilNewLines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendCharIfAny=function(t){var n=this.end;return n0&&this.contents[n-1]==t&&n--,new e(this.contents,n,this.end)},e.prototype.extendToNewlines=function(){var t=this.end;if(t>0){var n=this.contents[t-1];if("\n"==n)return this}for(;t0;){var n=this.contents[t-1];if("\r"==n||"\n"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.reduceNewlinesEnd=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if("\r"!=n&&"\n"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.reduceSpaces=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if(" "!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.replace=function(e){return this.sub(0,this.start)+e+this.sub(this.end,this.unitText().length)},e.prototype.remove=function(){return this.sub(0,this.start)+this.sub(this.end,this.unitText().length)},e}();t.TextRange=v},function(e,t,n){"use strict";function r(e){var t=e;return t.valueName&&t.toHighLevel&&t.toHighLevel2}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(77),o=n(54),s=n(69),u=n(24),l=n(33),p=n(18),c=n(39),f=n(14),d=n(53),h=n(70),m=function(){function e(e,t,n){this._parent=e,this._transformer=t,this.ramlVersion=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&h.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.hasInnerIncludeError=function(){return this._originalNode.hasInnerIncludeError()},e.prototype.keyKind=function(){return this._originalNode.keyKind()},e.prototype.primaryNode=function(){return null},e.prototype.isAnnotatedScalar=function(){return this._originalNode.isAnnotatedScalar()},e.prototype.actual=function(){return this._originalNode?this._originalNode.actual():this},e.prototype.transformer=function(){return this._transformer},e.prototype.setTransformer=function(e){this._transformer=e},e.prototype.originalNode=function(){return this._originalNode},e.prototype.start=function(){return this._originalNode.start()},e.prototype.end=function(){return this._originalNode.end()},e.prototype.value=function(e){throw new Error("The method must be overridden")},e.prototype.includeErrors=function(){return this._originalNode.includeErrors()},e.prototype.includePath=function(){return this._originalNode.includePath()},e.prototype.includeReference=function(){return this._originalNode.includeReference()},e.prototype.setKeyOverride=function(e){this._keyOverride=e},e.prototype.setValueOverride=function(e){this._valueOverride=e},e.prototype.key=function(e){return void 0===e&&(e=!1),this._keyOverride?this._keyOverride:this._originalNode.key(e)},e.prototype.optional=function(){return this.originalNode().optional()},e.prototype.children=function(){throw new Error("The method must be overridden")},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._originalNode.unit()},e.prototype.containingUnit=function(){return this._originalNode.containingUnit()},e.prototype.includeBaseUnit=function(){return this._originalNode.unit()},e.prototype.anchorId=function(){return this._originalNode.anchorId()},e.prototype.errors=function(){return this._originalNode.errors()},e.prototype.anchoredFrom=function(){return this._originalNode.anchoredFrom()},e.prototype.includedFrom=function(){return this._originalNode.includedFrom()},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return null},e.prototype.dumpToObject=function(e){var t=o.serialize2(this,e);if(this.kind()==a.Kind.MAPPING){var n={};return n[this.key(!0)]=t,n}return t},e.prototype.keyStart=function(){return this._originalNode.keyStart()},e.prototype.keyEnd=function(){return this._originalNode.keyEnd()},e.prototype.valueStart=function(){return this._originalNode.valueStart()},e.prototype.valueEnd=function(){return this._originalNode.valueEnd()},e.prototype.isValueLocal=function(){return this._originalNode.isValueLocal()},e.prototype.kind=function(){return this._originalNode.kind()},e.prototype.valueKind=function(){return this._originalNode.valueKind()},e.prototype.anchorValueKind=function(){return this._originalNode.anchorValueKind()},e.prototype.resolvedValueKind=function(){return this._originalNode.resolvedValueKind()},e.prototype.show=function(e){this._originalNode.show(e)},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode?this._highLevelNode:this._originalNode.highLevelNode()},e.prototype.text=function(e){throw new Error("not implemented")},e.prototype.copy=function(){throw new Error("not implemented")},e.prototype.markup=function(e){throw new Error("not implemented")},e.prototype.nodeDefinition=function(){return u.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return this._originalNode.includesContents()},e.prototype.root=function(){for(var e=this;e.parent();){var t=e.parent();e=t}return e},e.prototype.find=function(e){var t=null;return this.children().forEach(function(n){n.key()&&n.key()==e&&(t||(t=n))}),t},e.prototype.isMap=function(){return this.kind()==a.Kind.MAP},e.prototype.isMapping=function(){return this.kind()==a.Kind.MAPPING},e.prototype.isSeq=function(){return this.kind()==a.Kind.SEQ},e.prototype.isScalar=function(){return this.kind()==a.Kind.SCALAR},e.prototype.isValueSeq=function(){return this.valueKind()==a.Kind.SEQ},e.prototype.isValueMap=function(){return this.valueKind()==a.Kind.MAP},e.prototype.isValueInclude=function(){return this.valueKind()==a.Kind.INCLUDE_REF},e.prototype.isValueScalar=function(){return this.valueKind()==a.Kind.SCALAR},e.prototype.definingUnitSequence=function(){var e=d.toOriginal(this).key(),t=this.transformer();return t?t.definingUnitSequence(e):null},e.CLASS_IDENTIFIER="LowLevelASTProxy.LowLevelProxyNode",e}();t.LowLevelProxyNode=m;var y=function(e){function t(t,n,r,i,a){void 0===a&&(a=!0),e.call(this,n,r,i),this.isPrimary=a,this._adoptedNodes=[],this._preserveAnnotations=!1,this.nonMergableChildren={};var o=this.parent()?this.parent().originalNode():null;v.isInstance(t)?this._originalNode=t:this._originalNode=new v(t,o,r,this.ramlVersion),this._adoptedNodes.push(this._originalNode)}return i(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier&&h.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.getClassIdentifier=function(){var n=e.prototype.getClassIdentifier.call(this);return n.concat(t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.adoptedNodes=function(){return this._adoptedNodes},t.prototype.primaryNode=function(){return this.isPrimary?this._originalNode:null},t.prototype.parent=function(){return this._parent},t.prototype.adopt=function(e,t){t||(t=this._transformer);var n=this.parent()?this.parent().originalNode():null,r=new v(e,n,t,this.ramlVersion);this._adoptedNodes.push(r),this._children&&this._children.forEach(function(e){return e._parent=null}),this._children=null,this.highLevelNode()&&this.highLevelNode().resetChildren()},t.prototype.value=function(e){if(this._valueOverride)return this._valueOverride;var t,n=this._adoptedNodes.filter(function(e){return null!=e.value()});if(t=n.length>0?n[0].value(e):this._originalNode.value(e),v.isInstance(t)){var r=t.key();if(r)for(var i=this;1==i.children().length&&(i.kind()==a.Kind.MAPPING||i.kind()==a.Kind.MAP||i.kind()==a.Kind.SEQ);)if(i=i.children()[0],i.originalNode().key()==r){t=i;break}this._valueOverride=t}return t},t.prototype.patchAdoptedNodes=function(e){var t=this;this._adoptedNodes=[],e.forEach(function(e){return t.adopt(e.node,e.transformer)}),this._adoptedNodes.length>0&&(this._originalNode=this._adoptedNodes[0]),this.resetChildren()},t.prototype.children=function(){var e=this;if(this._children)return this._children;for(var n=[],r=!1,i=!1,o=0,s=this._adoptedNodes;o0&&(i=!0,l[0].key()&&this.originalNode().valueKind()!=a.Kind.SEQ&&(r=!0)),r&&i)break}if(r)n=this.collectChildrenWithKeys();else if(i){n=this.collectChildrenWithKeys();var p={};this._adoptedNodes.forEach(function(r){return r.children().filter(function(e){return!e.key()}).forEach(function(i){var a=r==e.primaryNode(),o=e.buildKey(i);if(a||!p[o]){p[o]=!0;var s=r.transformer()?r.transformer():e.transformer(),u=v.isInstance(i)?i.originalNode():i;n.push(new t(u,e,s,e.ramlVersion,a))}})})}else n=[];return this._children=n,this._preserveAnnotations&&this._children.forEach(function(e){return e.preserveAnnotations()}),n},t.prototype.buildKey=function(e){var t=o.serialize(e),n=this.nodeDefinition();if(n&&(n.key()==p.Universe08.TraitRef||n.key()==p.Universe08.ResourceTypeRef||n.key()==p.Universe10.TraitRef||n.key()==p.Universe10.ResourceTypeRef)&&t&&"object"==typeof t){var r=Object.keys(t);r.length>0&&(t=r[0])}return null==t?"":s(t)},t.prototype.collectChildrenWithKeys=function(){for(var e=this,n=[],r={},i=0,a=this._adoptedNodes;i=0;if(a.forEach(function(e){var t=e.node.optional()&&("RAML10"!=v||g&&u);o=o&&t,s=s||e.isPrimary}),s){var l=[];a.filter(function(e){return e.isPrimary}).forEach(function(n){var r=n.transformer?n.transformer:e.transformer();l.push(new t(n.node,e,r,e.ramlVersion,!0))});var p=l[0];a.filter(function(e){return!e.isPrimary}).forEach(function(e){p.adopt(e.node,e.transformer)}),l.forEach(function(e){return n.push(e)})}else if(!o){for(var c=a[0].transformer?a[0].transformer:e.transformer(),p=new t(a[0].node,e,c,e.ramlVersion,!1),f=1;f=0?this._children[o]=a:this._children.push(a),a},t.prototype.removeChild=function(e){if(this._children&&null!=e){var t=this._children.indexOf(e);if(t>=0){for(var n=t;nl)return null;for(var p=0;pl){var h=p-1;return 0>h?null:(console.log("insert to node: "+h),s[h])}}}return null}for(var m=null,p=0;pn?null:t[n]}function g(e,t){!e.isStub()&&e.isEmptyRamlFile()&&e.initRamlFile();var n=t.lowLevel();if(e._children||(e._children=[]),!t.property()){var i=t,a=e.definition().allProperties(),s=null;if(a.forEach(function(e){var t=e.range();t==i.definition()&&(s=e);var n=S.find(i.definition().allSuperTypes(),function(e){return e==t});n&&(s=e)}),!s)throw new Error("Unable to find correct child");i.patchProp(s)}var u=o(e,t),l=new T.CompositeCommand,p=null;if(t.property().getAdapter(R.RAMLPropertyService).isMerged()||t.property().range().hasValueTypeInHierarchy())l.commands.push(T.insertNode(e.lowLevel(),t.lowLevel(),u)),p=e.lowLevel();else{var c=t.property().nameId(),f=e.lowLevel(),d=e.lowLevel().find(c);if(p=d,d){var h=null===d.value()&&d.key&&d.key()===N.Universe10.Api.properties.types.name,m=!h&&t.property().getAdapter(R.RAMLPropertyService).isEmbedMap();l.commands.push(T.insertNode(d,t.lowLevel(),u,m))}else{var y=null;if(t.property().getAdapter(R.RAMLPropertyService).isEmbedMap()){var v="RAML10"==e.definition().universe().version();y=n.isValueMap()&&v?A.createMapNode(c):A.createSeqNode(c),y.addChild(t.lowLevel())}else y=A.createNode(c),y.addChild(t.lowLevel());l.commands.push(T.insertNode(f,y,u)),p=f}}if(e.isStub()){var g=r(e);return 0>g?e._children.push(t):e._children.splice(g,0,t),void l.commands.forEach(function(e){return p.addChild(e.value)})}e.lowLevel().execute(l),e._children.push(t),t.setParent(e)}var A=n(24),E=n(39),T=n(10),S=n(70),b=n(77),_=n(16),N=n(18),w=n(14),R=E;t.removeNodeFrom=s,t.initEmptyRAMLFile=u,t.setValue=l,t.addStringValue=p,t.addStructuredValue=c,t.removeAttr=f,t.setValues=d,t.setKey=h,t.createAttr=y,t.addToNode=g},function(e,t,n){"use strict";function r(e,t){var n=e.root().definition().universe(),i=e.lowLevel().key();if(i){var a=y.ASTPropImpl.isInstance(e)?e:null;T(i,t,a,!0,n,!0)}if(e.children().forEach(function(e){return r(e,t)}),y.ASTPropImpl.isInstance(e)){var o=e,s=o.value();if("string"==typeof s){var u=s;T(u,t,o,!1,n)}else e.lowLevel().visit(function(e){if(e.value()){var r=e.value()+"";T(r,t,o,!0,n)}return!0})}else if(y.BasicASTNode.isInstance(e)){var s=e.lowLevel().value();if("string"==typeof s){var u=s;T(u,t,null,!1,n)}else e.lowLevel().visit(function(e){if(e.value()){var r=e.value()+"";T(r,t,null,!0,n)}return!0})}}function i(e,t,n){void 0===n&&(n=[]),e.optional()&&(n=n.concat("/"));var r=e.value();if("string"==typeof r)for(var a=r,o=E(a),s=o.parameterUsages,u=0,l=s;u0&&(i=n[r][0].attr);var o=new f.UserDefinedProp(r,i);o.withDomain(e);var s=a[r];o.getAdapter(v.RAMLPropertyService).putMeta("templatePaths",s);var u;if("RAML10"==t.definition().universe().version()){var l=n[r].filter(function(e){return A.isStringTypeType(e.tp)}).length>0;u=l?m.Universe10.StringType.name:m.Universe10.AnyType.name}else u=m.Universe08.StringType.name;var p=h.unique(n[r].map(function(e){return e.tp})).filter(function(e){return e&&e.nameId()!=u});o.withRange(1==p.length?p[0]:t.definition().universe().type(u)),o.withRequired(!0),1==p.length&&"RAML10"==t.definition().universe().version()&&p[0].key()==m.Universe10.SchemaString&&o.getAdapter(v.RAMLPropertyService).setTypeExpression(!0),o.unmerge()});var l=new f.UserDefinedProp("____key",t);return l.withDomain(e),l.withKey(!0),l.withFromParentKey(!0),l.withRange(t.definition().universe().type(m.Universe08.StringType.name)),e}function o(e,t){"RAML08"==t.universe().version()&&e.getAdapter(v.RAMLService).withAllowAny();var n=t.property(t.getAdapter(v.RAMLService).getReferenceIs());return n&&n.range().properties().forEach(function(t){var n=new f.Property(t.nameId());n.unmerge(),n.withDomain(e),n.withRange(t.range()),n.withMultiValue(t.isMultiValue())}),e}function s(e){if(!e)return null;if(e.associatedType())return e.associatedType();var t=e.lowLevel().unit(),n=t?t.path():"";d.setPropertyConstructor(function(t){var n=null,r=e.elementsOfKind("properties").filter(function(e){return e.name()==t});r&&(n=r[0]);var i=new f.UserDefinedProp(t,n);return i.unmerge(),i});try{var r=e.definition();if(e.property()&&e.property().nameId()==m.Universe10.LibraryBase.properties.annotationTypes.name){var i=new S(e.name(),e.definition().universe(),e,n,""),s=u(e);i._superTypes.push(s),0==e.elementsOfKind(m.Universe10.ObjectTypeDeclaration.properties.properties.name).length&&i.getAdapter(v.RAMLService).withAllowAny();var l=r.getAdapter(v.RAMLService).getExtendedType();return l&&i._superTypes.push(l),i}var i=new f.UserDefinedClass(e.name(),e.definition().universe(),e,n,"");if(e.setAssociatedType(i),r.getAdapter(v.RAMLService).isInlinedTemplates())return a(i,e);if(r.getAdapter(v.RAMLService).getReferenceIs())return o(i,r);var p=u(e);p.getAdapter(v.RAMLService).setDeclaringNode(e),e.setAssociatedType(p)}finally{d.setPropertyConstructor(null)}return p}function u(e){return d.toNominal(e.parsedType(),function(t){var n=e.definition().universe().type(t);if(!n){new f.UserDefinedClass("",e.definition().universe(),e,"","")}return n})}function l(e){return function(t){var n=e.type(t);if(!n){new f.UserDefinedClass("",e,null,"","")}return n}}function p(e,t){var n=h.find(e.elementsOfKind("types"),function(e){return e.name()==t.name()});n&&d.setPropertyConstructor(function(e){var t=n.elementsOfKind("properties").filter(function(t){return t.name()==e}),r=null;if(t&&t.length>0)r=t[0];else{var t=n.elementsOfKind("facets").filter(function(t){return t.name()==e});t&&t.length>0&&(r=t[0])}var i=new f.UserDefinedProp(e,r);return i.unmerge(),i});var r=l(e.definition().universe());return d.toNominal(t,r)}var c=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},f=n(39),d=f.rt,h=n(70),m=n(18),y=n(16),v=f,g=n(28),A=n(14);d.setPropertyConstructor(function(e){var t=new f.Property(e);return t.unmerge(),t});var E=function(e,t){void 0===t&&(t=!1),t&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));for(var n=[],r=0;;){var i=e.indexOf("<<",r);if(-1==i)break;var a=e.indexOf(">>",i),o=0==i&&a==e.length-2,s=e.substring(i+2,a);r=i+2;var u=s.indexOf("|");-1!=u&&(s=s.substring(0,u)),s=s.trim(),n.push(s)}return{parameterUsages:n,isFull:o}},T=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=E(e,a),s=o.parameterUsages,u=o.isFull,l=n?n.property().range():null;a&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)?(l=i.type(m.Universe10.SchemaString.name),r=!1):n&&(n.property().nameId()==m.Universe10.TypeDeclaration.properties.type.name||n.property().nameId()==m.Universe10.TypeDeclaration.properties.schema.name)&&n.property().domain().key()==m.Universe10.TypeDeclaration&&(l=i.type(m.Universe10.SchemaString.name)),!u||r?l=i.type(m.Universe10.StringType.name):null==l&&"RAML10"==i.version()&&(l=i.type(m.Universe10.AnyType.name));for(var p=0,c=s;po)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}var o=n(21);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},Annotable:function(e,t){return new o.AnnotableImpl(e,t)},AnnotationRef:function(e){return new o.AnnotationRefImpl(e)},AnnotationTarget:function(e){return new o.AnnotationTargetImpl(e)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},ArrayTypeDeclaration:function(e,t){return new o.ArrayTypeDeclarationImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},ContentType:function(e){return new o.ContentTypeImpl(e)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateOnlyType:function(e){return new o.DateOnlyTypeImpl(e)},DateOnlyTypeDeclaration:function(e,t){return new o.DateOnlyTypeDeclarationImpl(e,t)},DateTimeOnlyType:function(e){return new o.DateTimeOnlyTypeImpl(e)},DateTimeOnlyTypeDeclaration:function(e,t){return new o.DateTimeOnlyTypeDeclarationImpl(e,t)},DateTimeType:function(e){return new o.DateTimeTypeImpl(e)},DateTimeTypeDeclaration:function(e,t){return new o.DateTimeTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},Extension:function(e,t){return new o.ExtensionImpl(e,t)},FileType:function(e){return new o.FileTypeImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUriString:function(e){return new o.FixedUriStringImpl(e)},FragmentDeclaration:function(e,t){return new o.FragmentDeclarationImpl(e,t)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},IntegerType:function(e){return new o.IntegerTypeImpl(e)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},Library:function(e,t){return new o.LibraryImpl(e,t)},LibraryBase:function(e,t){return new o.LibraryBaseImpl(e,t)},LocationKind:function(e){return new o.LocationKindImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},ModelLocation:function(e){return new o.ModelLocationImpl(e)},NullType:function(e){return new o.NullTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},ObjectTypeDeclaration:function(e,t){return new o.ObjectTypeDeclarationImpl(e,t)},Operation:function(e,t){return new o.OperationImpl(e,t)},Overlay:function(e,t){return new o.OverlayImpl(e,t)},PassThroughSecurityScheme:function(e,t){return new o.PassThroughSecuritySchemeImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceBase:function(e,t){return new o.ResourceBaseImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},TimeOnlyType:function(e){return new o.TimeOnlyTypeImpl(e)},TimeOnlyTypeDeclaration:function(e,t){return new o.TimeOnlyTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},TypeDeclaration:function(e,t){return new o.TypeDeclarationImpl(e,t)},UnionTypeDeclaration:function(e,t){return new o.UnionTypeDeclarationImpl(e,t)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},UsesDeclaration:function(e,t){return new o.UsesDeclarationImpl(e,t)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLFacetInfo:function(e,t){return new o.XMLFacetInfoImpl(e,t)}}},function(e,t,n){"use strict";function r(e){return e.isBuiltIn()?s[e.nameId()]:null}function i(e,t){void 0===t&&(t=!0);var n=e.definition(),i=(n.nameId(),r(n));if(!i){for(var o=a(n),u=n.allSuperTypes().sort(function(e,t){return o[e.nameId()]-o[t.nameId()]}),l=null,p=0;po)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}var o=n(52);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BodyLike:function(e,t){return new o.BodyLikeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateTypeDeclaration:function(e,t){return new o.DateTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},ExampleString:function(e){return new o.ExampleStringImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUri:function(e){return new o.FixedUriImpl(e)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},GlobalSchema:function(e,t){return new o.GlobalSchemaImpl(e,t)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},JSONBody:function(e,t){return new o.JSONBodyImpl(e,t)},JSONExample:function(e){return new o.JSONExampleImpl(e)},JSonSchemaString:function(e){return new o.JSonSchemaStringImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},Parameter:function(e,t){return new o.ParameterImpl(e,t)},ParameterLocation:function(e){return new o.ParameterLocationImpl(e)},RAMLSimpleElement:function(e,t){return new o.RAMLSimpleElementImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLBody:function(e,t){return new o.XMLBodyImpl(e,t)},XMLExample:function(e){return new o.XMLExampleImpl(e)},XMLSchemaString:function(e){return new o.XMLSchemaStringImpl(e)}}},function(e,t,n){"use strict";function r(e){try{var t=JSON.parse(e);return t.$schema}catch(n){return s.isXmlScheme(e)}}function i(e,t){if(s.isXmlScheme(e))return p.getXMLSchema(e,new u.ContentProvider(t)).loadSchemaReferencesAsync().then(function(){return t});var n=p.getJSONSchema(e,new u.ContentProvider(t)),r=n.getMissingReferences([]).map(function(e){return n.contentAsync(e)});if(0===r.length)return Promise.resolve(t);var i=Promise.all(r),a=o(i,n);return a.then(function(){return t})}function a(e,t){var n=p.createSchema(e,new u.ContentProvider(t));return n.getMissingReferences([],!0)}function o(e,t){return e.then(function(e){if(e.length>0){var n=t.getMissingReferences(e);if(0===n.length)return[];var r=[];return n.forEach(function(e){r.push(t.contentAsync(e))}),o(Promise.all(r.concat(e)),t)}return Promise.resolve([])})}var s=n(56),u=n(31),l=n(39),p=l.getSchemaUtils();t.isScheme=r,t.startDownloadingReferencesAsync=i,t.getReferences=a},function(e,t,n){"use strict";function r(e){var t=e.ast(),n=c.find(t.children(),function(e){return e.key()==o.Universe10.Extension.properties["extends"].name});return n&&n.value()}var i=n(10),a=n(15),o=n(18),s=n(77),u=n(25),l=n(16),p=n(39),c=n(70),f=function(){function e(){this.expandedAbsToNsMap={},this._expandedNSMap={},this.byPathMap={},this.byNsMap={},this._hasFragments={},this._unitModels={}}return e.prototype.hasTemplates=function(e){var t=this.unitModel(e);if(!t.traits.isEmpty()||!t.resourceTypes.isEmpty())return!0;var n=this.expandedPathMap(e);if(n)for(var i=0,a=Object.keys(n);i0&&C.length>0&&n.charAt(0).toLowerCase()!=C.charAt(0).toLowerCase()?C:a.relative(n,C),I=I.replace(/\\/g,"/");var L=new d(w,_.unit,I);g[L.absolutePath()]||(o[b]=L,c.push(L),g[L.absolutePath()]=!0)}}u.forEach(function(e){if(e.valueKind()==s.Kind.INCLUDE_REF){var t=p.resolve(e.includePath());if(t){if(!t.isRAMLUnit())return;S(t.ast())}}else S(e)}),null==r.parent()&&(v[f]=!1)}},void S(h)):"continue"},_=0;_t.length)return!1;if(e.lengthr)return!0;if(r>i)return!1}return!0},e.prototype.hasFragments=function(e){if(!e.isRAMLUnit())return!1;var t=l.ramlFirstLine(e.contents());return!t||t.length<2||"1.0"!=t[1]?!1:(this.expandedPathMap(e),this._hasFragments[e.absolutePath()]?!0:!1)},e.prototype.unitModel=function(e){var t=e.absolutePath(),n=this._unitModels[t];return n||(n=new m(e),this._unitModels[t]=n),n},e}();t.NamespaceResolver=f;var d=function(){function e(e,t,n){this.usesNodes=e,this.unit=t,this.includePath=n,this.namespaceSegments=this.usesNodes.map(function(e){return e.key()})}return e.prototype.steps=function(){return this.namespaceSegments.length},e.prototype.namespace=function(){return this.namespaceSegments.join(".")},e.prototype.absolutePath=function(){return this.unit.absolutePath()},e}();t.UsesInfo=d;var h=function(){function e(e){this.name=e,this.array=[],this.map={}}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier&&c.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){var t=[];return t.concat(e.CLASS_IDENTIFIER)},e.prototype.addElement=function(e){this.array.push(e),this.map[e.key()]=e},e.prototype.hasElement=function(e){return null!=this.map[e]},e.prototype.getElement=function(e){return this.map[e]},e.prototype.isEmpty=function(){return 0==this.array.length},e.CLASS_IDENTIFIER="namespaceResolver.ElementsCollection",e}();t.ElementsCollection=h;var m=function(){function e(e){this.unit=e,this.initCollections()}return e.prototype.initCollections=function(){this.types=new h(p.universesInfo.Universe10.LibraryBase.properties.types.name),this.annotationTypes=new h(p.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name),this.securitySchemes=new h(p.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name),this.traits=new h(p.universesInfo.Universe10.LibraryBase.properties.traits.name),this.resourceTypes=new h(p.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name);var e=this.unit.ast();if(e&&this.isLibraryBaseDescendant(this.unit))for(var t="0.8"==l.ramlFirstLine(this.unit.contents())[1],n=0,r=e.children();n0&&r.push(t[0])})):r=t,r.forEach(function(t){return e.addElement(t)})},e.prototype.isLibraryBaseDescendant=function(e){var t=this,n=l.ramlFirstLine(e.contents());if(!n)return!1;if(n.length<3||!n[2])return!0;var r=n[2];if(!this.libTypeDescendants){this.libTypeDescendants={};var i=p.getUniverse("RAML10"),a=i.type(p.universesInfo.Universe10.LibraryBase.name); -[a].concat(a.allSubTypes()).forEach(function(e){return t.libTypeDescendants[e.nameId()]=!0})}return this.libTypeDescendants[r]},e}();t.UnitModel=m},function(e,t,n){"use strict";function r(e){var t=e.value();if("string"==typeof t||null==t){var n=f.createNode(t,null,e.lowLevel().unit());n._actualNode().startPosition=e.lowLevel().valueStart(),n._actualNode().endPosition=e.lowLevel().valueEnd();var r=new c.StructuredValue(n,e.parent(),e.property());return r}return t}function i(e){var t=e._meta;t.resetPrimitiveValuesMeta();var n=e.highLevel();return n.definition().allProperties().forEach(function(r){var i=r.nameId(),a=n.attributes(i),o=!1,s=!1;if(a.forEach(function(e){o=o||null!=e.value(),s=s||e.optional()}),!o){var u=e.getDefaultsCalculator(),l=u.attributeDefaultIfEnabled(n,r);if(null!=l){var p=u.insertionKind(n,r);p==d.InsertionKind.CALCULATED?t.registerCalculatedValue(i):p==d.InsertionKind.BY_DEFAULT&&t.registerInsertedAsDefaultValue(i)}}}),t}function a(e,t){return t?e.map(function(e){return t(e)}):e.map(function(e){return e.value()})}function o(e){var t=[],n=e.errors();null!=n&&(t=t.concat(n));var r=t.map(function(t){return u(e,t)}),i=s(r);return i}function s(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i0&&(l.trace=t.extras.map(function(t){return u(e,t)})),l}function l(e){if(e.isScalar())return!0;for(var t=e.allSuperTypes().filter(function(e){return e.isUnion()||e.isIntersection()}),n=0,r=t;n0?new T(e[0]):null}return new T(this.node)},e.prototype.values=function(){return this.isArray()?this.node.children().map(function(e){return new T(e)}):[new T(this.node)]},e.prototype.isArray=function(){var e=this.node.children();if(e.length>0&&null==e[0].key())return!0;var t=this.node.highLevelNode();if(t){var n=t.property();if(n){var r=n.range();if(r)return r.isArray()}}return this.node.valueKind()==v.Kind.SEQ},e.CLASS_IDENTIFIER="parserCore.TypeInstancePropertyImpl",e}();t.TypeInstancePropertyImpl=S;var b=function(){function e(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),this._insertedAsDefault=e,this._calculated=t,this._optional=n}return e.prototype.calculated=function(){return this._calculated},e.prototype.insertedAsDefault=function(){return this._insertedAsDefault},e.prototype.setCalculated=function(){this._calculated=!0},e.prototype.setInsertedAsDefault=function(){this._insertedAsDefault=!0},e.prototype.setOptional=function(){this._optional=!0},e.prototype.optional=function(){return this._optional},e.prototype.isDefault=function(){return!(this._insertedAsDefault||this._calculated||this._optional)},e.prototype.toJSON=function(){var e={};return this._calculated&&(e.calculated=!0),this._insertedAsDefault&&(e.insertedAsDefault=!0),this._optional&&(e.optional=!0),e},e}();t.ValueMetadataImpl=b;var _=function(e){function t(){e.apply(this,arguments),this.valuesMeta={}}return p(t,e),t.prototype.primitiveValuesMeta=function(){return this.valuesMeta},t.prototype.registerInsertedAsDefaultValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new b(!0):t.setInsertedAsDefault()},t.prototype.registerCalculatedValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new b(!1,!0):t.setCalculated()},t.prototype.registerOptionalValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new b(!1,!1,!0):t.setOptional()},t.prototype.resetPrimitiveValuesMeta=function(){this.valuesMeta={}},t.prototype.isDefault=function(){return e.prototype.isDefault.call(this)?0==Object.keys(this.valuesMeta).length:!1},t.prototype.toJSON=function(){var t=this,n=e.prototype.toJSON.call(this),r={},i=Object.keys(this.valuesMeta);return i.length>0&&(i.forEach(function(e){var n=t.valuesMeta[e].toJSON();Object.keys(n).length>0&&(r[e]=n)}),n.primitiveValuesMeta=r),n},t}(b);t.NodeMetadataImpl=_,t.fillElementMeta=i,t.attributesToValues=a,t.errors=o,t.filterErrors=s,t.basicError=u},function(e,t,n){"use strict";function r(e){var t=C.getUniverse("RAML08"),n=t.type("Method"),r=M.createStubNode(n,null,e);return r}function i(e){var t=C.getUniverse("RAML08"),n=t.type("StringTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function a(e){var t=C.getUniverse("RAML08"),n=t.type("BooleanTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function o(e){var t=C.getUniverse("RAML08"),n=t.type("NumberTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function s(e){var t=C.getUniverse("RAML08"),n=t.type("IntegerTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function u(e){var t=C.getUniverse("RAML08"),n=t.type("DateTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function l(e){var t=C.getUniverse("RAML08"),n=t.type("FileTypeDeclaration"),r=M.createStubNode(n,null,e);return r}function p(e){var t=C.getUniverse("RAML08"),n=t.type("XMLBody"),r=M.createStubNode(n,null,e);return r}function c(e){var t=C.getUniverse("RAML08"),n=t.type("JSONBody"),r=M.createStubNode(n,null,e);return r}function f(e){var t=C.getUniverse("RAML08"),n=t.type("SecuritySchemePart"),r=M.createStubNode(n,null,e);return r}function d(e){var t=C.getUniverse("RAML08"),n=t.type("Trait"),r=M.createStubNode(n,null,e);return r}function h(e){var t=C.getUniverse("RAML08"),n=t.type("OAuth1SecuritySchemeSettings"),r=M.createStubNode(n,null,e);return r}function m(e){var t=C.getUniverse("RAML08"),n=t.type("OAuth2SecuritySchemeSettings"),r=M.createStubNode(n,null,e);return r}function y(e){var t=C.getUniverse("RAML08"),n=t.type("OAuth2SecurityScheme"),r=M.createStubNode(n,null,e);return r}function v(e){var t=C.getUniverse("RAML08"),n=t.type("OAuth1SecurityScheme"),r=M.createStubNode(n,null,e);return r}function g(e){var t=C.getUniverse("RAML08"),n=t.type("BasicSecurityScheme"),r=M.createStubNode(n,null,e);return r}function A(e){var t=C.getUniverse("RAML08"),n=t.type("DigestSecurityScheme"),r=M.createStubNode(n,null,e);return r}function E(e){var t=C.getUniverse("RAML08"),n=t.type("CustomSecurityScheme"),r=M.createStubNode(n,null,e);return r}function T(e){var t=C.getUniverse("RAML08"),n=t.type("GlobalSchema"),r=M.createStubNode(n,null,e);return r}function S(e){var t=C.getUniverse("RAML08"),n=t.type("DocumentationItem"),r=M.createStubNode(n,null,e);return r}function b(e,t,n){return P.loadApi(e,t,n).getOrElse(null)}function _(e,t,n){return P.loadApi(e,t,n).getOrElse(null)}function N(e,t,n){return P.loadApiAsync(e,t,n)}function w(e,t,n){return P.loadRAMLAsync(e,t,n)}function R(e){return P.getLanguageElementByRuntimeType(e)}var I=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},M=n(17),C=n(39),L=n(51),P=n(8),O=n(79),D=function(e){function t(){e.apply(this,arguments)}return I(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,"title",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate("title").setValue(""+e),this},t.prototype.version=function(){return e.prototype.attribute.call(this,"version",this.toString)},t.prototype.setVersion=function(e){return this.highLevel().attrOrCreate("version").setValue(""+e),this},t.prototype.baseUri=function(){return e.prototype.attribute.call(this,"baseUri",function(e){return new Ie(e)})},t.prototype.baseUriParameters_original=function(){return e.prototype.elements.call(this,"baseUriParameters")},t.prototype.uriParameters=function(){return e.prototype.elements.call(this,"uriParameters")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,"protocols",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate("protocols").setValue(""+e),this},t.prototype.mediaType=function(){return e.prototype.attribute.call(this,"mediaType",function(e){return new Ne(e)})},t.prototype.schemas=function(){return e.prototype.elements.call(this,"schemas")},t.prototype.traits_original=function(){return e.prototype.elements.call(this,"traits")},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,"securedBy",function(e){return new pe(e)})},t.prototype.securitySchemes=function(){return e.prototype.elements.call(this,"securitySchemes")},t.prototype.resourceTypes_original=function(){return e.prototype.elements.call(this,"resourceTypes")},t.prototype.resources=function(){return e.prototype.elements.call(this,"resources")},t.prototype.documentation=function(){return e.prototype.elements.call(this,"documentation")},t.prototype.wrapperClassName=function(){return"ApiImpl"},t.prototype.kind=function(){return"Api"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat("Api")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat("RAML08.ApiImpl")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&"function"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t=0;i=e.indexOf("<<",r)){if(t+=e.substring(r,i),r=e.indexOf(">>",i),0>r)return{status:I.ERROR};r+=">>".length;var a=e.substring(i,r),o=M+i+M;n[o]=a,t+=o}return 0==t.length?{status:I.NOT_REQUIRED}:(t+=e.substring(r,e.length),{resultingString:t,substitutions:n,status:I.OK})}function i(e,t){if(null==e)return{status:I.NOT_REQUIRED};for(var n="",r=0,i=e.indexOf(M);i>=0;i=e.indexOf(M,r)){if(r=e.indexOf(M,i+1),r+=M.length,0>r)return{status:I.ERROR};var a=e.substring(i,r),o=t[a];if(null==o)return{status:I.ERROR};n+=o}return 0==n.length?{status:I.NOT_REQUIRED}:(n+=e.substring(r,e.length),{resultingString:n,substitutions:t,status:I.OK})}function a(e){for(var t=!1,n=0;nt&&A.LowLevelProxyNode.isInstance(e);t++)e=e.originalNode();return e}function p(e){return e?null!=e.namespace&&"function"==typeof e.namespace&&null!=e.name&&"function"==typeof e.name&&null!=e.collectionName&&"function"==typeof e.collectionName&&null!=e.referencedUnit&&"function"==typeof e.referencedUnit&&null!=e.mode&&"function"==typeof e.mode:!1}function c(e,t,n){var r=n[0].project().namespaceResolver();if(!e)return null;var i="",a=e,o=e.lastIndexOf(".");o>=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,l=n.length;l>0;l--){var p=n[l-1],c=p.highLevel();if(c.isElement()&&S.isLibraryType(c.asElement().definition())){if(u)break;u=!0}var f=p;if(i){f=null;var d=r.nsMap(p);if(d){var h=d[i];h&&(f=h.unit)}}if(f){var m=f.highLevel();if(m&&m.isElement()&&(s=T.find(m.asElement().elementsOfKind(t),function(e){return e.name()==a})))break}}return s}function f(e){var t=e.indexOf("<<");if(0>t)return!1;if(0!=t)return!0;var n=e.indexOf(">>",t);return n+">>".length!=e.length?!0:!1}var d=n(10),h=n(16),m=n(77),y=n(24),v=n(54),g=n(33),A=n(44),E=n(18),T=n(70),S=n(14),b=n(50),_=n(39),N=_.rt.typeExpressions;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.PATH=1]="PATH"}(t.PatchMode||(t.PatchMode={}));var w=t.PatchMode,R=function(){function e(e){void 0===e&&(e=w.DEFAULT),this.mode=e,this._outerDependencies={},this._libModels={}}return e.prototype.process=function(e,t,n,r){var i=this;if(void 0===t&&(t=e),void 0===n&&(n=!1),void 0===r&&(r=!1),!e.lowLevel().libProcessed){var a=e.lowLevel().unit().project().namespaceResolver();this.patchReferences(e,t,a),r&&this.patchNodeName(e,t.lowLevel().unit(),a),n?this.removeUses(e):this.patchUses(e,a),e.elements().forEach(function(e){return i.removeUses(e)}),this.resetTypes(e),e.lowLevel().libProcessed=!0}},e.prototype.patchReferences=function(e,t,n,r){if(void 0===t&&(t=e),void 0===n&&(n=new b.NamespaceResolver),void 0===r&&(r=[t.lowLevel().unit()]),!e.isReused()){var i;if(null!=e.definition().property(E.Universe10.TypeDeclaration.properties.annotations.name)){var a=e.lowLevel();if(!A.LowLevelCompositeNode.isInstance(a))return;var o=E.Universe10.MethodBase.properties.is.name,u=e.attributes(o);if(0!=u.length){var l=e.lowLevel().children().filter(function(e){return e.key()==E.Universe10.MethodBase.properties.is.name});1==l.length&&l[0].valueKind()==m.Kind.SEQ&&(i=s(e,u.map(function(e){return e.lowLevel()}).map(function(e){return A.LowLevelProxyNode.isInstance(e)?{node:e,transformer:e.transformer()}:{node:e,transformer:null}}),r[0].absolutePath()))}}for(var p=e.attrs(),c=0,f=p;c0&&(p=c[0])}var d=O(p);if(!d&&p.isArray()&&(d=O(p.componentType())),!d){var m=t.lowLevel().unit(),y=(m.absolutePath(),e.attributes(E.Universe10.TypeDeclaration.properties.type.name));0==y.length&&(y=e.attributes(E.Universe10.TypeDeclaration.properties.schema.name));var v=e.attributes(E.Universe10.ArrayTypeDeclaration.properties.items.name);y=y.concat(v);for(var g=0,S=y;g=0){var x=l(_),U=x.value();if(P=r(U),P.status==I.OK)L=M?P.resultingString:U;else{if(P.status==I.ERROR)return;C=null}}var k;if(D){k=[];for(var F=0,B=D;F=0&&f(a)&&(p=!1);var c=s.resolveReferenceValue(a,m,o,n,C,u,p);null!=c&&(r.value=c.value(),$=!0,s.registerPatchedReference(c))}}),W=$&&!Y?N.serializeToString(H):R}else if(P.status!=I.OK||null!=C){L.indexOf("<<")>=0&&f(L)&&(L=R,C=null);var G=this.resolveReferenceValue(L,m,o,n,C,u);null!=G&&(this.registerPatchedReference(G),W=G.value())}if(null!=W&&(b.lowLevel().setValueOverride(W),b.overrideValue(null)),this.popUnitIfNeeded(o,j),k)for(var X=0,z=k.reverse();X=0){var c=!0,f=t.highLevel().types(),d=i.transform(e,!0,function(){return c},function(e,n){var i=s.resolveReferenceValueBasic(e,t,r,n.unitsChain,a);return null==i&&(i=new C(null,e,s.collectionName(a),t,w.DEFAULT)),c=l?null!=f.getAnnotationType(i.value())?!1:!1:null!=f.getType(i.value())?!1:!1,i});u=d.value}return void 0!==u&&p(u)||(u=this.resolveReferenceValueBasic(e,t,r,n,a)),u},e.prototype.patchNodeName=function(e,t,n){var r=e.lowLevel(),i=r.key(),a=e.definition();if(S.isTypeDeclarationSibling(a)){var o=e.localType();o.isAnnotationType()&&(a=o)}var s=this.resolveReferenceValueBasic(i,t,n,[r.unit()],a);null!=s&&(r.setKeyOverride(s.value()),e.resetIDs())},e.prototype.resolveReferenceValueBasic=function(e,t,n,r,i){if(null==e||"string"!=typeof e)return null;var a=S.isTypeDeclarationDescendant(i),o=a&&g.stringEndsWith(e,"?"),s=o?e.substring(0,e.length-1):e;if(!(s.indexOf("<<")>=0)){var u,l,p=s.lastIndexOf(".");if(p>=0){var c=s.substring(0,p);l=s.substring(p+1);for(var f=r.length;f>0;f--){var h=r[f-1],m=n.nsMap(h);if(null!=m){var y=m[c];if(null!=y&&(u=y.unit,null!=u))break}}}else{if(a&&null!=_.rt.builtInTypes().get(s))return null;l=s,u=r[r.length-1]}var v=this.collectionName(i);if(!u)return null;if(u.absolutePath()==t.absolutePath())return null!=c?new C(null,l,v,u,this.mode):null;var A=n.resolveNamespace(t,u);if(null==A)return null;var E=A.namespace();if(null==E)return null;if(this.mode==w.PATH){var T=u.absolutePath().replace(/\\/g,"/");d.isWebPath(T)||(T="file://"+T),E=T+"#/"+v}return o&&(l+="?"),new C(E,l,v,u,this.mode)}},e.prototype.patchUses=function(e,t){var n=e.lowLevel();if(e.children(),A.LowLevelCompositeNode.isInstance(n)){var r=n.unit(),i=t.expandedPathMap(r);if(null!=i){var a=t.pathMap(r);a||(a={});for(var o=n,s=n.children(),u=E.Universe10.FragmentDeclaration.properties.uses.name,p=s.filter(function(e){return e.key()==u}),c=l(n),f=c;A.LowLevelProxyNode.isInstance(f);)f=f.originalNode();var d,m=Object.keys(a).map(function(e){return i[e]}),v=Object.keys(i).map(function(e){return i[e]}).filter(function(e){return!a[e.absolutePath()]}),g=r.absolutePath(),T={};if(p.length>0)d=p[0],d.children().forEach(function(e){return T[e.key()]=!0});else{var b=y.createMapNode("uses");b._parent=f,b.setUnit(f.unit()),d=o.replaceChild(null,b)}for(var _=e.definition().property(u),N=_.range(),w=e._children.filter(function(e){if(e.lowLevel().unit().absolutePath()==g)return!0;var t=e.property();return!t||!S.isUsesProperty(t)}),R=e._mergedChildren.filter(function(e){if(e.lowLevel().unit().absolutePath()==g)return!0;var t=e.property();return!t||!S.isUsesProperty(t)}),I=0,M=m.concat(v);I0&&n.removeChild(i[0]),e._children=e.directChildren().filter(function(e){var t=e.property();return null==t||!S.isUsesProperty(t)}),e._mergedChildren=e.children().filter(function(e){var t=e.property();return null==t||!S.isUsesProperty(t)})}},e.prototype.resetTypes=function(e){for(var t=0,n=e.elements();t0&&(n.__$errors__=r)}return n}var s=[];return e.children().forEach(function(e){s.push(i(e,t))}),s}function a(e){var t=[].concat(e.errors());return e.children().forEach(function(e){var n=e.children();return 0==n.length?void e.errors().forEach(function(e){return t.push(e)}):void(n[0].key()||n.forEach(function(e){0==e.children().length&&e.errors().forEach(function(e){return t.push(e)})}))}),t}function o(e,t){return t&&e&&t.escapeNumericKeys&&0==e.replace(/\d/g,"").trim().length?"__$EscapedKey$__"+e:e}function s(e,t){return e?(t=t||{},t.escapeNumericKeys&&c.stringStartsWith(e,"__$EscapedKey$__")&&0==e.substring("__$EscapedKey$__".length).replace(/\d/g,"").trim().length?e.substring("__$EscapedKey$__".length):e):e}var u=n(77),l=n(10),p=n(16),c=n(33),f=n(24),d=u.YAMLException,h=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this._absolutePath=e,this._path=t,this._content=n,this._project=r,this._isTopoLevel=i,this.serializeOptions=a,this._node=new m(this,JSON.parse(this._content),null,a)}return e.prototype.highLevel=function(){return p.fromUnit(this)},e.prototype.absolutePath=function(){return this._absolutePath},e.prototype.clone=function(){return null},e.prototype.contents=function(){return this._content},e.prototype.lexerErrors=function(){return[]},e.prototype.path=function(){return this._content},e.prototype.isTopLevel=function(){return this._isTopoLevel},e.prototype.ast=function(){return this._node},e.prototype.expandedHighLevel=function(){return this.highLevel()},e.prototype.isDirty=function(){return!0},e.prototype.getIncludeNodes=function(){return[]},e.prototype.resolveAsync=function(e){return null},e.prototype.isRAMLUnit=function(){return!0},e.prototype.project=function(){return this._project},e.prototype.updateContent=function(e){},e.prototype.ramlVersion=function(){throw new d("not implemented")},e.prototype.lineMapper=function(){return new l.LineMapperImpl(this.contents(),this.absolutePath())},e.prototype.resolve=function(e){return null},e.prototype.isOverlayOrExtension=function(){return!1},e.prototype.getMasterReferenceNode=function(){return null},e}();t.CompilationUnit=h;var m=function(){function e(e,t,n,r,i){var a=this;void 0===r&&(r={}),this._unit=e,this._object=t,this._parent=n,this.options=r,this._key=i,this._isOptional=!1,this._object instanceof Object&&Object.keys(this._object).forEach(function(e){var t=s(e,a.options);if(t!=e){var n=a._object[e];delete a._object[e],a._object[t]=n}}),this._key&&c.stringEndsWith(this._key,"?")&&(this._isOptional=!0,this._key=this._key.substring(0,this._key.length-1))}return e.prototype.keyKind=function(){return null},e.prototype.isAnnotatedScalar=function(){return!1},e.prototype.hasInnerIncludeError=function(){return!1},e.prototype.start=function(){return-1},e.prototype.end=function(){return-1},e.prototype.value=function(){return this._object},e.prototype.actual=function(){return this._object},e.prototype.includeErrors=function(){return[]},e.prototype.includePath=function(){return null},e.prototype.includeReference=function(){return null},e.prototype.key=function(){return this._key},e.prototype.optional=function(){return this._isOptional},e.prototype.children=function(){var t=this;return this._object?Array.isArray(this._object)?this._object.map(function(n){return new e(t._unit,n,t,t.options)}):this._object instanceof Object?Object.keys(this._object).map(function(n){return new e(t._unit,t._object[n],t,t.options,n)}):[]:[]},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.anchorId=function(){return null},e.prototype.errors=function(){return[]},e.prototype.anchoredFrom=function(){return this},e.prototype.includedFrom=function(){return this},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.dumpToObject=function(){return this._object},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return JSON.stringify(this._object)},e.prototype.keyStart=function(){return-1},e.prototype.keyEnd=function(){return-1},e.prototype.valueStart=function(){return-1},e.prototype.valueEnd=function(){return-1},e.prototype.isValueLocal=function(){return!0},e.prototype.kind=function(){return Array.isArray(this._object)?u.Kind.SEQ:this._object instanceof Object?u.Kind.MAP:u.Kind.SCALAR},e.prototype.valueKind=function(){if(!this._object)return null;var e=typeof this._object;return Array.isArray(this._object)?u.Kind.SEQ:"object"==e?u.Kind.MAP:"string"==e||"number"==e||"boolean"==e?u.Kind.SCALAR:null; -},e.prototype.anchorValueKind=function(){return null},e.prototype.resolvedValueKind=function(){return this.valueKind()},e.prototype.show=function(e){},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.text=function(e){throw new d("not implemented")},e.prototype.copy=function(){throw new d("not implemented")},e.prototype.markup=function(e){throw new d("not implemented")},e.prototype.nodeDefinition=function(){return f.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return!1},e}();t.AstNode=m,t.serialize2=r,t.serialize=i},function(e,t,n){"use strict";var r=n(28),i=n(83),a=function(){function e(){this.uriToResources={},this.conflictingUriToResources={}}return e.prototype.validateApi=function(e,t){var n=this,a=e.resources();a.forEach(function(e){n.acceptResource(e);var t=e.resources();t.forEach(function(e){return n.acceptResource(e)})});for(var o in this.conflictingUriToResources){var a=this.conflictingUriToResources[o];if(a.length>1){var s={};a.forEach(function(e){var t=e.highLevel(),n="";null!=t.parent()&&(n+=t.parent().id()+"."),n+=t.localId();var r=s[n];null==r&&(r=[],s[n]=r),r.push(e)});var u=Object.keys(s);u.length>1&&a.forEach(function(e){t.accept(r.createIssue1(i.RESOURCES_SHARE_SAME_URI,{},e.highLevel(),!1))})}}},e.prototype.acceptResource=function(e){var t=e.absoluteUri(),n=this.uriToResources[t];n||(n=[],this.uriToResources[t]=n),n.push(e),n.length>1&&(this.conflictingUriToResources[t]=n)},e}();e.exports=a},function(e,t,n){"use strict";function r(e,t,n){null==n&&(n=i(e)),n.length>0&&(n+=":");for(var r=e.getElementsByTagName(n+t),a=[],o=0;o"))return!1;var t=new p.DOMParser(f).parseFromString(e),n=r(t,"schema",i(t));return n.length>0}catch(a){return!1}}function o(e){var t={};if(1==e.nodeType){if(e.attributes.length>0)for(var n=0;n1&&!n[n.length-1]){var r=n[n.length-2],o=r.lastIndexOf(".");o>=0&&(n[n.length-2]=r.substring(0,o),n[n.length-1]=r.substring(o))}for(var s=n[0],u={},f=1;f0?n:null},e.prototype.matches=function(e,t){var n=t.definition();return null==n?!1:a.isSecuredByProperty(e)},e.prototype.kind=function(){return l.CALCULATED},e}(),m=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n,r=t.attr(i.Universe10.Api.properties.baseUri.name);if(r){var o=r.value();if(o&&"string"==typeof o){var s=o.indexOf("://");s>=0&&(n=[o.substring(0,s).toUpperCase()]),n||(n=["HTTP"])}}return n},e.prototype.matches=function(e,t){if(!a.isProtocolsProperty(e))return!1;var n=t.definition(),r=!1;if(a.isApiSibling(n))r=!0;else if(a.isResourceType(n))r=!0;else if(a.isMethodType(n)){var i=t.parent();r=i&&a.isResourceType(i.definition())}return r},e.prototype.kind=function(){return l.CALCULATED},e}(),y=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n=t.attr(i.Universe10.Api.properties.version.name);if(n){var r=n.value();if(r&&r.trim())return[r]}return null},e.prototype.matches=function(e,t){if(!a.isEnumProperty(e))return!1;var n=t.property();if(!n)return!1;if(!a.isBaseUriParametersProperty(n))return!1;var r=t.attr(i.Universe10.TypeDeclaration.properties.name.name),o=r&&r.value();return"version"!=o?!1:!0},e.prototype.kind=function(){return l.CALCULATED},e}(),v=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition();if(null==n)return null;var r=n.getAdapter(o.RAMLService);if(null==r)return null;var i=r.getKeyProp();if(null==i)return null;var a=t.attr(i.nameId());return null==a?null:a.optional()?!1:null},e.prototype.matches=function(e,t){return a.isRequiredProperty(e)},e.prototype.kind=function(){return l.BY_DEFAULT},e}()},function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=_.Universe10.ResourceBase.properties.uriParameters.name,r=e.elementsOfKind(n);if(!C.isResourceType(e.definition()))return r;var i=e.attr(_.Universe10.Resource.properties.relativeUri.name).value();return a(r,i,e,n,t)}function i(e,t){void 0===t&&(t=!0);var n=e.attr(_.Universe10.Api.properties.baseUri.name),r=n?n.value():"",i=_.Universe10.Api.properties.baseUriParameters.name,o=e.elementsOfKind(i);return a(o,r,e,i,t)}function a(e,t,n,r,i){if("string"!=typeof t)return[];var a=n.definition(),o=a.property(r);if(!t)return[];var s={};e.forEach(function(e){var t=s[e.name()];t||(t=[],s[e.name()]=t),t.push(e)});for(var u=[],l=0,p={},c=t.indexOf("{");c>=0&&(l=t.indexOf("}",++c),!(0>l));c=t.indexOf("{",l)){var f=t.substring(c,l);if(p[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var d=a.universe(),h=d.type(b.Universe10.StringTypeDeclaration.name),m=T.createStubNode(h,null,f,n.lowLevel().unit());m.setParent(n),i&&m.wrapperNode().meta().setCalculated(),m.attrOrCreate("name").setValue(f),m.patchProp(o),u.push(m)}}return Object.keys(s).filter(function(e){return!p[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function o(e){var t="",n=e;do e=n,t=e.attr(b.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(C.isResourceType(n.definition()));return t}function s(e){if(!C.isResourceType(e.definition()))return null;var t="",n=e;do e=n,t=e.attr(b.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent();while(C.isResourceType(n.definition()));t=t.replace(/\/\//g,"/");var r="",i=n.attr(b.Universe10.Api.properties.baseUri.name);return i&&(r=i?i.value():""),r=r?r:"",N.stringEndsWith(r,"/")&&(t=t.substring(1)),t=r+t}function u(e,t){void 0===t&&(t=!1);var n=c(e,!0,t);return n.length>0?n[0]:null}function l(e,t){return void 0===t&&(t=!1),c(e,!1,t)}function p(e,t){void 0===t&&(t=!1);var n;n=e.isJSONString()||e.isYAML()?e.asJSON():e.original();var r={value:n,strict:e.strict(),name:e.name()};if(e.hasAnnotations()){var i=e.annotations(),a=f(i);Object.keys(a).length>0&&(r.annotations=a)}if(e.hasScalarAnnotations()){var o=e.scalarsAnnotations(),s={};Object.keys(o).forEach(function(e){var t=f(o[e]);Object.keys(t).length>0&&(s[e]=Object.keys(t).map(function(e){return t[e]}))}),Object.keys(s).length>0&&(r.scalarsAnnotations=s)}var u=e.displayName();u&&(r.displayName=u);var l=e.description();return null!=l&&(r.description=l),t&&(r.asXMLString=e.asXMLString()),r}function c(e,t,n){void 0===n&&(n=!1);var r=e.localType();r.isAnnotationType()&&(r=S.find(r.superTypes(),function(e){return e.nameId()==r.nameId()}));var i=r.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==t}).map(function(e){return p(e,n)});return i}function f(e){var t={};return e&&Object.keys(e).forEach(function(n){t[n]={structuredValue:e[n].value(),name:n}}),t}function d(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return C.isTraitType(e)},t)}function h(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:m(e,function(e){return C.isResourceTypeType(e)},t)}function m(e,t,n){var r=M.globalDeclarations(e).filter(function(e){return t(e.definition())}),i=e.lowLevel(),a=i.includePath();a||(a=i.unit().path());for(var o="RAML10"==e.definition().universe().version()&&!C.isOverlayType(e.definition()),s=o?new w.TraitsAndResourceTypesExpander:null,u=[],l=new I.ReferencePatcher,p=0,c=r;p=0:!1});if(0==o.length)return null;var s={};return o.forEach(function(e){var t=e.dumpToObject();Object.keys(t).forEach(function(e){return s[e]=t[e]})}),s}function A(e){var t=e.localType(),n=t.fixedFacets(),r=Object.keys(n);if(!t.hasUnionInHierarchy())for(var i=0,a=r;i=0;i(e,n,a,o)}),Object.keys(e.annotationOverridings()).forEach(function(r){var a=[].concat(e.annotationOverridings()[r]),o={};a.forEach(function(e){return o[e.name]=!0});for(var s,u=e.getSuperTypes(),l={},p=0;p=300){var t=new Error("Server responded with status code "+this.statusCode+":\n"+this.body.toString());throw t.statusCode=this.statusCode,t.headers=this.headers,t.body=this.body,t.url=this.url,t}return e?this.body.toString(e):this.body}},function(e,t,n){(function(t){function r(e,t){if(!(this instanceof r))return new r(e,t);"function"==typeof e&&(t=e,e={}),e||(e={});var n=e.encoding,i=!1;n?(n=String(n).toLowerCase(),("u8"===n||"uint8"===n)&&(n="uint8array")):i=!0,p.call(this,{objectMode:!0}),this.encoding=n,this.shouldInferEncoding=i,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}function i(e){return/Array\]$/.test(Object.prototype.toString.call(e))}function a(e){return"string"==typeof e||i(e)||e&&"function"==typeof e.subarray}function o(e){for(var n=[],r=0;r0&&!l.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(f,"\\$1")+'"'}function s(e){var t=m.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var n,r=t[1],i=t[2],a=i.lastIndexOf("+");-1!==a&&(n=i.substr(a+1),i=i.substr(0,a));var o={type:r,subtype:i,suffix:n};return o}/*! - * media-typer - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ -var u=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,l=/^[\u0020-\u007e\u0080-\u00ff]+$/,p=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,c=/\\([\u0000-\u007f])/g,f=/([\\"])/g,d=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,h=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,m=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;t.format=r,t.parse=i},function(e,t,n){var r="undefined"!=typeof JSON?JSON:n(112);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var o="boolean"==typeof t.cycles?t.cycles:!1,s=t.replacer||function(e,t){return t},u=t.cmp&&function(e){return function(t){return function(n,r){var i={key:n,value:t[n]},a={key:r,value:t[r]};return e(i,a)}}}(t.cmp),l=[];return function p(e,t,c,f){var d=n?"\n"+new Array(f+1).join(n):"",h=n?": ":":";if(c&&c.toJSON&&"function"==typeof c.toJSON&&(c=c.toJSON()),c=s.call(e,t,c),void 0!==c){if("object"!=typeof c||null===c)return r.stringify(c);if(i(c)){for(var m=[],y=0;y=0&&o>a;a+=e){var s=i?i[a]:a;r=n(r,t[s],s,t)}return r}return function(n,r,i,a){r=b(r,a,4);var o=!C(n)&&S.keys(n),s=(o||n).length,u=e>0?0:s-1;return arguments.length<3&&(i=n[o?o[u]:u],u+=e),t(n,r,i,o,u,s)}}function a(e){return function(t,n,r){n=_(n,r);for(var i=M(t),a=e>0?0:i-1;a>=0&&i>a;a+=e)if(n(t[a],a,t))return a;return-1}}function o(e,t,n){return function(r,i,a){var o=0,s=M(r);if("number"==typeof a)e>0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(h.call(r,o,s),S.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&s>a;a+=e)if(r[a]===i)return a;return-1}}function s(e,t){var n=x.length,r=e.constructor,i=S.isFunction(r)&&r.prototype||c,a="constructor";for(S.has(e,a)&&!S.contains(t,a)&&t.push(a);n--;)a=x[n],a in e&&e[a]!==i[a]&&!S.contains(t,a)&&t.push(a)}var u=this,l=u._,p=Array.prototype,c=Object.prototype,f=Function.prototype,d=p.push,h=p.slice,m=c.toString,y=c.hasOwnProperty,v=Array.isArray,g=Object.keys,A=f.bind,E=Object.create,T=function(){},S=function(e){return e instanceof S?e:this instanceof S?void(this._wrapped=e):new S(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=S),t._=S,S.VERSION="1.8.3";var b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return null==e?S.identity:S.isFunction(e)?b(e,t,n):S.isObject(e)?S.matcher(e):S.property(e)};S.iteratee=function(e,t){return _(e,t,1/0)};var N=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var a=arguments[i],o=e(a),s=o.length,u=0;s>u;u++){var l=o[u];t&&void 0!==n[l]||(n[l]=a[l])}return n}},w=function(e){if(!S.isObject(e))return{};if(E)return E(e);T.prototype=e;var t=new T;return T.prototype=null,t},R=function(e){return function(t){return null==t?void 0:t[e]}},I=Math.pow(2,53)-1,M=R("length"),C=function(e){var t=M(e);return"number"==typeof t&&t>=0&&I>=t};S.each=S.forEach=function(e,t,n){t=b(t,n);var r,i;if(C(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var a=S.keys(e);for(r=0,i=a.length;i>r;r++)t(e[a[r]],a[r],e)}return e},S.map=S.collect=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=Array(i),o=0;i>o;o++){var s=r?r[o]:o;a[o]=t(e[s],s,e)}return a},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(e,t,n){var r;return r=C(e)?S.findIndex(e,t,n):S.findKey(e,t,n),void 0!==r&&-1!==r?e[r]:void 0},S.filter=S.select=function(e,t,n){var r=[];return t=_(t,n),S.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},S.reject=function(e,t,n){return S.filter(e,S.negate(_(t)),n)},S.every=S.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(!t(e[o],o,e))return!1}return!0},S.some=S.any=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(t(e[o],o,e))return!0}return!1},S.contains=S.includes=S.include=function(e,t,n,r){return C(e)||(e=S.values(e)),("number"!=typeof n||r)&&(n=0),S.indexOf(e,t,n)>=0},S.invoke=function(e,t){var n=h.call(arguments,2),r=S.isFunction(t);return S.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},S.pluck=function(e,t){return S.map(e,S.property(t))},S.where=function(e,t){return S.filter(e,S.matcher(t))},S.findWhere=function(e,t){return S.find(e,S.matcher(t))},S.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],r>a&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},S.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],a>r&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(o>i||i===1/0&&a===1/0)&&(a=e,o=i)});return a},S.shuffle=function(e){for(var t,n=C(e)?e:S.values(e),r=n.length,i=Array(r),a=0;r>a;a++)t=S.random(0,a),t!==a&&(i[a]=i[t]),i[t]=n[a];return i},S.sample=function(e,t,n){return null==t||n?(C(e)||(e=S.values(e)),e[S.random(e.length-1)]):S.shuffle(e).slice(0,Math.max(0,t))},S.sortBy=function(e,t,n){return t=_(t,n),S.pluck(S.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var L=function(e){return function(t,n,r){var i={};return n=_(n,r),S.each(t,function(r,a){var o=n(r,a,t);e(i,r,o)}),i}};S.groupBy=L(function(e,t,n){S.has(e,n)?e[n].push(t):e[n]=[t]}),S.indexBy=L(function(e,t,n){e[n]=t}),S.countBy=L(function(e,t,n){S.has(e,n)?e[n]++:e[n]=1}),S.toArray=function(e){return e?S.isArray(e)?h.call(e):C(e)?S.map(e,S.identity):S.values(e):[]},S.size=function(e){return null==e?0:C(e)?e.length:S.keys(e).length},S.partition=function(e,t,n){t=_(t,n);var r=[],i=[];return S.each(e,function(e,n,a){(t(e,n,a)?r:i).push(e)}),[r,i]},S.first=S.head=S.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:S.initial(e,e.length-t)},S.initial=function(e,t,n){return h.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},S.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:S.rest(e,Math.max(0,e.length-t))},S.rest=S.tail=S.drop=function(e,t,n){return h.call(e,null==t||n?1:t)},S.compact=function(e){return S.filter(e,S.identity)};var P=function(e,t,n,r){for(var i=[],a=0,o=r||0,s=M(e);s>o;o++){var u=e[o];if(C(u)&&(S.isArray(u)||S.isArguments(u))){t||(u=P(u,t,n));var l=0,p=u.length;for(i.length+=p;p>l;)i[a++]=u[l++]}else n||(i[a++]=u)}return i};S.flatten=function(e,t){return P(e,t,!1)},S.without=function(e){return S.difference(e,h.call(arguments,1))},S.uniq=S.unique=function(e,t,n,r){S.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=_(n,r));for(var i=[],a=[],o=0,s=M(e);s>o;o++){var u=e[o],l=n?n(u,o,e):u;t?(o&&a===l||i.push(u),a=l):n?S.contains(a,l)||(a.push(l),i.push(u)):S.contains(i,u)||i.push(u)}return i},S.union=function(){return S.uniq(P(arguments,!0,!0))},S.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=M(e);i>r;r++){var a=e[r];if(!S.contains(t,a)){for(var o=1;n>o&&S.contains(arguments[o],a);o++);o===n&&t.push(a)}}return t},S.difference=function(e){var t=P(arguments,!0,!0,1);return S.filter(e,function(e){return!S.contains(t,e)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(e){for(var t=e&&S.max(e,M).length||0,n=Array(t),r=0;t>r;r++)n[r]=S.pluck(e,r);return n},S.object=function(e,t){for(var n={},r=0,i=M(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},S.findIndex=a(1),S.findLastIndex=a(-1),S.sortedIndex=function(e,t,n,r){n=_(n,r,1);for(var i=n(t),a=0,o=M(e);o>a;){var s=Math.floor((a+o)/2);n(e[s])a;a++,e+=n)i[a]=e;return i};var O=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var a=w(e.prototype),o=e.apply(a,i);return S.isObject(o)?o:a};S.bind=function(e,t){if(A&&e.bind===A)return A.apply(e,h.call(arguments,1));if(!S.isFunction(e))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return O(e,r,t,this,n.concat(h.call(arguments)))};return r},S.partial=function(e){var t=h.call(arguments,1),n=function(){for(var r=0,i=t.length,a=Array(i),o=0;i>o;o++)a[o]=t[o]===S?arguments[r++]:t[o];for(;r=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=S.bind(e[n],e);return e},S.memoize=function(e,t){var n=function(r){var i=n.cache,a=""+(t?t.apply(this,arguments):r);return S.has(i,a)||(i[a]=e.apply(this,arguments)),i[a]};return n.cache={},n},S.delay=function(e,t){var n=h.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},S.defer=S.partial(S.delay,S,1),S.throttle=function(e,t,n){var r,i,a,o=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:S.now(),o=null,a=e.apply(r,i),o||(r=i=null)};return function(){var l=S.now();s||n.leading!==!1||(s=l);var p=t-(l-s);return r=this,i=arguments,0>=p||p>t?(o&&(clearTimeout(o),o=null),s=l,a=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(u,p)),a}},S.debounce=function(e,t,n){var r,i,a,o,s,u=function(){var l=S.now()-o;t>l&&l>=0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(a,i),r||(a=i=null)))};return function(){a=this,i=arguments,o=S.now();var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(a,i),a=i=null),s}},S.wrap=function(e,t){return S.partial(t,e)},S.negate=function(e){return function(){return!e.apply(this,arguments)}},S.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},S.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},S.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},S.once=S.partial(S.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(e){if(!S.isObject(e))return[];if(g)return g(e);var t=[];for(var n in e)S.has(e,n)&&t.push(n);return D&&s(e,t),t},S.allKeys=function(e){if(!S.isObject(e))return[];var t=[];for(var n in e)t.push(n);return D&&s(e,t),t},S.values=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},S.mapObject=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=i.length,o={},s=0;a>s;s++)r=i[s],o[r]=t(e[r],r,e);return o},S.pairs=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},S.invert=function(e){for(var t={},n=S.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},S.functions=S.methods=function(e){var t=[];for(var n in e)S.isFunction(e[n])&&t.push(n);return t.sort()},S.extend=N(S.allKeys),S.extendOwn=S.assign=N(S.keys),S.findKey=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=0,o=i.length;o>a;a++)if(r=i[a],t(e[r],r,e))return r},S.pick=function(e,t,n){var r,i,a={},o=e;if(null==o)return a;S.isFunction(t)?(i=S.allKeys(o),r=b(t,n)):(i=P(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var s=0,u=i.length;u>s;s++){var l=i[s],p=o[l];r(p,l,o)&&(a[l]=p)}return a},S.omit=function(e,t,n){if(S.isFunction(t))t=S.negate(t);else{var r=S.map(P(arguments,!1,!1,1),String);t=function(e,t){return!S.contains(r,t)}}return S.pick(e,t,n)},S.defaults=N(S.allKeys,!0),S.create=function(e,t){var n=w(e);return t&&S.extendOwn(n,t),n},S.clone=function(e){return S.isObject(e)?S.isArray(e)?e.slice():S.extend({},e):e},S.tap=function(e,t){return t(e),e},S.isMatch=function(e,t){var n=S.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;r>a;a++){var o=n[a];if(t[o]!==i[o]||!(o in i))return!1}return!0};var U=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof S&&(e=e._wrapped),t instanceof S&&(t=t._wrapped);var i=m.call(e);if(i!==m.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var a="[object Array]"===i;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var o=e.constructor,s=t.constructor;if(o!==s&&!(S.isFunction(o)&&o instanceof o&&S.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),a){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!U(e[u],t[u],n,r))return!1}else{var l,p=S.keys(e);if(u=p.length,S.keys(t).length!==u)return!1;for(;u--;)if(l=p[u],!S.has(t,l)||!U(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0};S.isEqual=function(e,t){return U(e,t)},S.isEmpty=function(e){return null==e?!0:C(e)&&(S.isArray(e)||S.isString(e)||S.isArguments(e))?0===e.length:0===S.keys(e).length},S.isElement=function(e){return!(!e||1!==e.nodeType)},S.isArray=v||function(e){return"[object Array]"===m.call(e)},S.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){S["is"+e]=function(t){return m.call(t)==="[object "+e+"]"}}),S.isArguments(arguments)||(S.isArguments=function(e){return S.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(S.isFunction=function(e){return"function"==typeof e||!1}),S.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},S.isNaN=function(e){return S.isNumber(e)&&e!==+e},S.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===m.call(e)},S.isNull=function(e){return null===e},S.isUndefined=function(e){return void 0===e},S.has=function(e,t){return null!=e&&y.call(e,t)},S.noConflict=function(){return u._=l,this},S.identity=function(e){return e},S.constant=function(e){return function(){return e}},S.noop=function(){},S.property=R,S.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},S.matcher=S.matches=function(e){return e=S.extendOwn({},e),function(t){return S.isMatch(t,e)}},S.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},S.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},S.now=Date.now||function(){return(new Date).getTime()};var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},F=S.invert(k),B=function(e){var t=function(t){return e[t]},n="(?:"+S.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};S.escape=B(k),S.unescape=B(F),S.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),S.isFunction(r)?r.call(e):r};var K=0;S.uniqueId=function(e){var t=++K+"";return e?e+t:t},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+j[e]};S.template=function(e,t,n){!t&&n&&(t=n),t=S.defaults({},t,S.templateSettings);var r=RegExp([(t.escape||V).source,(t.interpolate||V).source,(t.evaluate||V).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(W,q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var o=new Function(t.variable||"obj","_",a)}catch(s){throw s.source=a,s}var u=function(e){return o.call(this,e,S)},l=t.variable||"obj";return u.source="function("+l+"){\n"+a+"}",u},S.chain=function(e){var t=S(e);return t._chain=!0,t};var Y=function(e,t){return e._chain?S(t).chain():t};S.mixin=function(e){S.each(S.functions(e),function(t){var n=S[t]=e[t];S.prototype[t]=function(){var e=[this._wrapped];return d.apply(e,arguments),Y(this,n.apply(S,e))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=p[e];S.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Y(this,n)}}),S.each(["concat","join","slice"],function(e){var t=p[e];S.prototype[e]=function(){return Y(this,t.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,i,a,o,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,a,o,s,u],c=0;l=new Error(n.replace(/%s/g,function(){return p[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=n}).call(t,n(64))},function(e,t,n){"use strict";function r(e,t,n,s){var u=new i(function(i,u){function l(a){r(e,t,{qs:n.qs,headers:n.headers,timeout:n.timeout}).nodeify(function(e,t){var r=e||t.statusCode>=400;if("function"==typeof n.retry&&(r=n.retry(e,t,a+1)),a>=(5|n.maxRetries)&&(r=!1),r){var o=n.retryDelay;"function"==typeof n.retryDelay&&(o=n.retryDelay(e,t,a+1)),o=o||200,setTimeout(function(){l(a+1)},o)}else e?u(e):i(t)})}var p=new window.XMLHttpRequest;if("string"!=typeof e)throw new TypeError("The method must be a string.");if("string"!=typeof t)throw new TypeError("The URL/path must be a string.");if("function"==typeof n&&(s=n,n={}),(null===n||void 0===n)&&(n={}),"object"!=typeof n)throw new TypeError("Options must be an object (or null).");if("function"!=typeof s&&(s=void 0),e=e.toUpperCase(),n.headers=n.headers||{},n.retry&&"GET"===e)return l(0);var c,f=!(!(c=/^([\w-]+:)?\/\/([^\/]+)/.exec(t))||c[2]==window.location.host);if(f||(n.headers["X-Requested-With"]="XMLHttpRequest"),n.qs&&(t=o(t,n.qs)),n.json&&(n.body=JSON.stringify(n.json),n.headers["Content-Type"]="application/json"),n.timeout){p.timeout=n.timeout;var d=Date.now();p.ontimeout=function(){var e=Date.now()-d,t=new Error("Request timed out after "+e+"ms");t.timeout=!0,t.duration=e,u(t)}}p.onreadystatechange=function(){if(4===p.readyState){var e={};p.getAllResponseHeaders().split("\r\n").forEach(function(t){var n=t.split(":");n.length>1&&(e[n[0].toLowerCase()]=n.slice(1).join(":").trim())});var n=new a(p.status,e,p.responseText);n.url=t,i(n)}},p.open(e,t,!0);for(var h in n.headers)p.setRequestHeader(h,n.headers[h]);p.send(n.body?n.body:null)});return u.getBody=function(){return u.then(function(e){return e.getBody()})},u.nodeify(s)}var i=n(113),a=n(65),o=n(92);e.exports=r},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=!0),new v({rootNodeDetails:!0,serializeMetadata:t}).dump(e)}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(18),o=n(51),s=n(44),u=n(39),l=n(16),p=n(29),c=n(14),f=n(18),d=n(33),h=n(70),m=n(11),y=n(15);t.dump=r;var v=function(){function e(e){this.options=e,this.nodeTransformers=[new V,new k,new Y,new b,new L,new P,new W,new I,new M,new F,new B,new O,new q,new j],this.nodePropertyTransformers=[new S,new _,new N,new R,new w,new C,new K],this.ignore=new A([new g(c.isResponseType,c.isDisplayNameProperty),new g(c.isApiSibling,c.isDisplayNameProperty),new g(c.isAnnotationRefTypeOrDescendant,c.isAnnotationProperty),new g(c.isSecuritySchemeRefType,c.isSecuritySchemeProperty),new g(c.isTraitRefType,c.isTraitProperty),new g(c.isResourceTypeRefType,c.isResourceTypeProperty),new g(c.isApiSibling,c.isRAMLVersionProperty),new g(c.isTypeDeclarationDescendant,c.isStructuredItemsProperty)]),this.missingProperties=new H,this.options=this.options||{},null==this.options.serializeMetadata&&(this.options.serializeMetadata=!0)}return e.prototype.printMissingProperties=function(){return this.missingProperties.print()},e.prototype.dump=function(e){var t=e.highLevel(),n=t&&t.parent(),r=!n&&this.options.rootNodeDetails,i=this.dumpInternal(e,r);return i},e.prototype.dumpInternal=function(e,t,n){var r=this;if(void 0===t&&(t=!1),null==e)return null;if(o.BasicNodeImpl.isInstance(e)){var i={},s=e,u=s.highLevel().definition();u.allProperties().filter(function(e){return!r.ignore.match(s.definition(),e)}).forEach(function(e){i[e.nameId()]=e}),u.allCustomProperties().filter(function(e){return!r.ignore.match(s.definition(),e)}).forEach(function(e){i[e.nameId()]=e});var p=this.dumpProperties(i,e);if(i.schema&&this.options.dumpSchemaContents&&i.schema.range().key()==f.Universe08.SchemaString){var d=s.highLevel().root().elementsOfKind("schemas");d.forEach(function(e){if(e.name()==p.schema){var t=e.attr("value");t&&(p.schema=t.value(),p.schemaContent=t.value())}})}if(this.serializeScalarsAnnotations(p,s,i),this.serializeMeta(p,s),this.canBeFragment(e)&&m.isFragment(e)){var h=m.asFragment(e),y=h.uses();y.length>0&&(p.uses=y.map(function(e){return e.toJSON()}))}if(c.isTypeDeclarationDescendant(u)){var v=s.highLevel().property();if(v&&!(c.isHeadersProperty(v)||c.isQueryParametersProperty(v)||c.isUriParametersProperty(v)||c.isPropertiesProperty(v)||c.isBaseUriParametersProperty(v))){delete p.required;var g=p.__METADATA__;if(g){var A=g.primitiveValuesMeta;A&&delete A.required}}}this.nodeTransformers.forEach(function(t){t.match(e,n||e.highLevel().property())&&(p=t.transform(p,e))});var E={};if(t){if(u){var T=u.universe().version();E.ramlVersion=T,E.type=u.nameId()}E.specification=p,E.errors=this.dumpErrors(s.errors())}else E=p;return E}if(o.AttributeNodeImpl.isInstance(e)){var i={},S=e,u=S.highLevel().definition(),b=S.highLevel().property().range();b.isArray()&&(b=b.array().componentType()),u.allCustomProperties().filter(function(e){return!r.ignore.match(b,e)}).forEach(function(e){i[e.nameId()]=e});var _=b.isValueType();if(_&&S.value){var N=S.value();if(null==N||"number"==typeof N||"string"==typeof N||"boolean"==typeof N)return N;if(b.isAssignableFrom(a.Universe08.StringType.name)&&l.StructuredValue.isInstance(N)){var w=N,R=w.lowLevel();return N=R?R.dumpToObject():null}}var p=this.dumpProperties(i,e);return this.nodeTransformers.forEach(function(t){t.match(e,e.highLevel().property())&&(p=t.transform(p,e))}),this.serializeScalarsAnnotations(p,e,i),this.serializeMeta(p,S),p}return o.TypeInstanceImpl.isInstance(e)?this.serializeTypeInstance(e):o.TypeInstancePropertyImpl.isInstance(e)?this.serializeTypeInstanceProperty(e):e},e.prototype.canBeFragment=function(e){var t=e.definition(),n=[t].concat(t.allSubTypes()),r=n.filter(function(e){return e.getAdapter(u.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==u.universesInfo.Universe10.FragmentDeclaration.name}).length>0});return r.length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.stringLooksLikeXML=function(e){return"<"===e[0]&&">"===e[e.length-1]},e.prototype.stringLooksLikeJSON=function(e){return"{"===e[0]&&"}"===e[e.length-1]},e.prototype.dumpProperties=function(e,t){var n,r=this,i={};return t.highLevel().isElement()&&(n=t.highLevel().definition()),Object.keys(e).forEach(function(s){var u;if(n&&(u=n.property(s),u||(u=h.find(n.allCustomProperties(),function(e){return e.nameId()==s}))),!t[s])return void r.missingProperties.addProperty(e[s],t.kind());var f=e[s],d=t[s]();if(d&&"structuredType"==s&&"object"==typeof d){d=null;var m=t.highLevel(),v=m.lowLevel();v.children().forEach(function(e){if("type"==e.key()||"schema"==e.key()){var t=m.definition().universe().type(a.Universe10.TypeDeclaration.name),n=m.definition().universe().type(a.Universe10.LibraryBase.name),i=new l.ASTNodeImpl(e,m,t,n.property(a.Universe10.LibraryBase.properties.types.name));i.patchType(p.doDescrimination(i)),d=r.dumpInternal(i.wrapperNode(),!1,u),s=e.key()}})}else if("items"==s&&"object"==typeof d){var g=Array.isArray(d),A=!g;if(g&&(A=null!=h.find(d,function(e){return"object"==typeof e})),A){d=null;var m=t.highLevel(),v=m.lowLevel();v.children().forEach(function(e){if("items"==e.key()){var t=m.definition().universe().type(a.Universe10.TypeDeclaration.name),n=m.definition().universe().type(a.Universe10.LibraryBase.name),i=new l.ASTNodeImpl(e,m,t,n.property(a.Universe10.LibraryBase.properties.types.name));i.patchType(p.doDescrimination(i)),d=r.dumpInternal(i.wrapperNode(),!1,u),s=e.key()}})}}if(n&&n.isAssignableFrom("TypeDeclaration")&&("type"===s||"schema"==s)&&d)if(d.forEach&&"string"==typeof d[0]){var m=t.highLevel(),E=m.localType();if(E&&E.hasExternalInHierarchy()){var T=d[0].trim(),S="{"===T[0]&&"}"===T[T.length-1],b="<"===T[0]&&">"===T[T.length-1];S?i.typePropertyKind="JSON":b&&(i.typePropertyKind="XML")}else i.typePropertyKind="TYPE_EXPRESSION"}else"object"==typeof d&&(i.typePropertyKind="INPLACE");if(("type"===s||"schema"==s)&&d&&d.forEach&&"string"==typeof d[0]){var T=d[0].trim(),S=r.stringLooksLikeJSON(T),b=r.stringLooksLikeXML(T);if(S||b){var _=t.highLevel().lowLevel().includePath&&t.highLevel().lowLevel().includePath();if(!_&&t.highLevel().isElement()){var N=t.highLevel().asElement().attr("type");N||(N=t.highLevel().asElement().attr("schema")),N&&(_=N.lowLevel().includePath&&N.lowLevel().includePath())}if(_){var w=_.indexOf("#"),R="";w>=0&&(R=_.substring(w),_=_.substring(0,w));var I,M=t.highLevel().lowLevel().unit().resolve(_).absolutePath();I=0===M.indexOf("http://")||0===M.indexOf("https://")?M:y.relative(t.highLevel().lowLevel().unit().project().getRootPath(),M),I=I.replace(/\\/g,"/"),i.schemaPath=I+R}}}if((d||"type"!=s)&&(d||"schema"!=s)&&(d||"items"!=s)){if(t.definition&&c.isTypeDeclarationSibling(t.definition())&&c.isTypeProperty(f)){var C=t[a.Universe10.TypeDeclaration.properties.schema.name]();if(null!=C&&(!Array.isArray(C)||0!=C.length))return;var m=t.highLevel(),v=m.lowLevel(),L=!1;if(v.children().forEach(function(e){return"schema"==e.key()?void(L=!0):void 0}),L)return}if(Array.isArray(d)){for(var P=[],O=0,D=d;O0)if(Array.isArray(l[0])){var p=[];l.forEach(function(e,t){p.push(e.map(function(e){return r.dumpInternal(e)}))}),p.filter(function(e){return e.length>0}).length>0&&(i[u]=p)}else i[u]=l.map(function(e){return r.dumpInternal(e)})}}Object.keys(i).length>0&&(e.scalarsAnnotations=i)}},e.prototype.serializeMeta=function(e,t){if(this.options.serializeMetadata){var n=t.meta();n.isDefault()||(e.__METADATA__=n.toJSON())}},e.prototype.serializeTypeInstance=function(e){var t=this;if(e.isScalar())return e.value();if(e.isArray())return e.items().map(function(e){return t.serializeTypeInstance(e)});var n=e.properties();if(0==n.length)return null;var r={};return n.forEach(function(e){return r[e.name()]=t.serializeTypeInstanceProperty(e)}),r},e.prototype.serializeTypeInstanceProperty=function(e){var t=this;if(e.isArray()){var n=e.values(),r=[];return n.forEach(function(e){return r.push(t.serializeTypeInstance(e))}),r}return this.serializeTypeInstance(e.value())},e.prototype.isDefined=function(e,t){var n=e.highLevel();return n.elementsOfKind(t).length>0?!0:n.attributes(t).length>0?!0:!1},e}();t.TCKDumper=v;var g=function(){function e(e,t){this.typeMatcher=e,this.propMatcher=t}return e.prototype.match=function(e,t){return(null==e||this.typeMatcher(e))&&(null==t||this.propMatcher(t))},e}(),A=function(){function e(e){this.matchers=e}return e.prototype.match=function(e,t){for(var n=this.matchers.length,r=0;n>r;r++)if(this.matchers[r].match(e,t))return!0;return!1},e}(),E=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition(),t)},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0&&e[0][this.propName]){var n={};return e.forEach(function(e){var r=e[t.propName],i=n[r];i?Array.isArray(i)?i.push(e):n[r]=[i,e]:n[r]=e}),n}return e},e}(),T=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition?e.definition():null,t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e[this.propName]]=e,t},e}(),S=function(e){function t(){e.call(this,new A([new g(c.isApiSibling,c.isBaseUriParametersProperty),new g(c.isResourceBaseSibling,c.isUriParametersProperty),new g(c.isResourceBaseSibling,c.isQueryParametersProperty),new g(c.isTraitType,c.isQueryParametersProperty),new g(c.isMethodType,c.isQueryParametersProperty),new g(c.isSecuritySchemePartType,c.isQueryParametersProperty),new g(c.isTraitType,c.isHeadersProperty),new g(c.isMethodType,c.isHeadersProperty),new g(c.isSecuritySchemePartType,c.isHeadersProperty),new g(c.isBodyLikeType,c.isFormParametersProperty)]),"name")}return i(t,e),t}(E),b=function(e){function t(){e.call(this,new A([new g(c.isLibraryBaseSibling,c.isTypesProperty),new g(function(e){return c.isLibraryBaseSibling(e)&&c.isRAML10Type(e)},c.isSchemasProperty)]),"name")}return i(t,e),t.prototype.match=function(e,t){var n=null!=e.parent()&&this.matcher.match(e.parent().definition(),t);return n?!0:!1},t}(T),_=(function(e){ -function t(){e.call(this,new A([new g(c.isLibraryBaseSibling,c.isUsesProperty)]),"name")}return i(t,e),t}(E),function(e){function t(){e.call(this,new A([new g(c.isObjectTypeDeclarationSibling,c.isPropertiesProperty)]),"name")}return i(t,e),t}(E)),N=function(e){function t(){e.call(this,new A([new g(c.isMethodBaseSibling,c.isResponsesProperty)]),"code")}return i(t,e),t}(E),w=function(e){function t(){e.call(this,new A([new g(function(e){return!0},c.isAnnotationsProperty)]),"name")}return i(t,e),t}(E),R=function(e){function t(){e.call(this,new A([new g(c.isResponseType,c.isBodyProperty),new g(c.isMethodBaseSibling,c.isBodyProperty)]),"name")}return i(t,e),t}(E),I=function(e){function t(){e.call(this,new A([new g(c.isTraitType,c.isTraitsProperty)]),"name")}return i(t,e),t}(T),M=function(e){function t(){e.call(this,new A([new g(c.isResourceTypeType,c.isResourceTypesProperty)]),"name")}return i(t,e),t.prototype.transform=function(t){var n=f.Universe10.ResourceBase.properties.methods.name;if(Array.isArray(t))return t;var r=t[n];return r&&r.forEach(function(e){var n=Object.keys(e);if(n.length>0){var r=n[0];t[r]=e[r]}}),delete t[n],e.prototype.transform.call(this,t)},t}(T),C=function(e){function t(){e.call(this,new A([new g(c.isTypeDeclarationSibling,c.isFacetsProperty)]),"name")}return i(t,e),t}(E),L=function(e){function t(){e.call(this,null,"name")}return i(t,e),t.prototype.match=function(e,t){return null!=t&&c.isSecuritySchemesProperty(t)},t}(T),P=function(e){function t(){e.call(this,new A([new g(c.isLibraryBaseSibling,c.isAnnotationTypesProperty)]),"name")}return i(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},t}(T),O=function(e){function t(){e.call(this,null,"method")}return i(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&c.isResourceTypeType(e.parent().definition())&&c.isMethodsProperty(t)},t}(T),D=a.Universe10.ExampleSpec.properties.name.name,x=a.Universe10.ExampleSpec.properties.value.name,U="structuredContent",k=(function(){function e(){}return e.prototype.match=function(e,t){return c.isExampleSpecType(e.definition())},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0){if(e[0][D]){var n={};return e.forEach(function(e){return n[e[D]]=t.getActualExample(e)}),n}var r=e.map(function(e){return t.getActualExample(e)});return r}return e},e.prototype.getActualExample=function(e){return e[U]?e[U]:e[x]},e}(),function(){function e(){}return e.prototype.match=function(e,t){return e.definition&&c.isTypeDeclarationSibling(e.definition())},e.prototype.transform=function(e){var t=Array.isArray(e),n=t?e:[e];return n.forEach(function(e){var t=e.example;t&&(e.example=t.structuredValue,e.structuredExample=t)}),t?n:n[0]},e}()),F=function(){function e(){this.matcher=new g(function(e){return c.isApiType(e)&&c.isRAML08Type(e)},c.isSchemasProperty)}return e.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,t},e.prototype.getActualExample=function(e){return e[U]?e[U]:e[x]},e}(),B=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&c.isProtocolsProperty(t)},e.prototype.transform=function(e){return"string"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},e}(),K=function(){function e(){this.usecases=new A([new g(c.isApiSibling,c.isMediaTypeProperty)])}return e.prototype.match=function(e,t){return this.usecases.match(e.definition(),t)},e.prototype.transform=function(e){return Array.isArray(e)&&1==e.length?e[0]:e},e}(),V=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&c.isResourcesProperty(t)},e.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[f.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split("/");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=t.absoluteUri()}return e},e}(),j=function(){function e(){}return e.prototype.match=function(e,t){return e.parent()&&e.parent().highLevel().lowLevel().libProcessed?c.isAnnotationTypesProperty(t)||c.isTypesProperty(t)||c.isResourceTypesProperty(t)||c.isTraitsProperty(t)||c.isSecuritySchemesProperty(t):!1},e.prototype.transform=function(e,t){for(var n=t.highLevel().lowLevel(),r=n.key(),i=n;s.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e[Object.keys(e)[0]];return o.name=a,o.displayName==r&&(o.displayName=a),e},e}(),W=function(){function e(){}return e.prototype.match=function(e,t){var n=e.highLevel();if(!n)return!1;var r=n.definition();return r?c.isResourceTypeType(r)||c.isTraitType(r)||c.isMethodType(r)||c.isTypeDeclarationSibling(r):!1},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t=a.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},e}(),q=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&(c.isSecuredByProperty(t)||c.isIsProperty(t)||null!=e.parent()&&(c.isResourceType(e.parent().highLevel().definition())||c.isResourceTypeType(e.parent().highLevel().definition()))&&c.isTypeProperty(t))},e.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},e.prototype.toSimpleValue=function(e){var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},e}(),Y=function(){function e(){}return e.prototype.match=function(e,t){if(!o.BasicNodeImpl.isInstance(e))return!1;var n=e.highLevel(),r=n.definition();if(!c.isTypeDeclarationDescendant(r))return!1;var i=n.localType();return i&&i.isArray()?!0:!1},e.prototype.transform=function(e){var t=f.Universe10.TypeDeclaration.properties.type.name,n=f.Universe10.TypeDeclaration.properties.schema.name,r=f.Universe10.ArrayTypeDeclaration.properties.items.name,i=e[t];return i||(i=e[n]),1==i.length&&d.stringEndsWith(i[0],"[]")&&(null==e[r]&&(e[r]=i[0].substring(0,i[0].length-2)),i[0]="array"),e},e}(),H=function(){function e(){this.map={}}return e.prototype.addProperty=function(e,t){var n=this.map[t];n||(n=new $(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return Object.keys(this.map).map(function(t){return e.map[t].print()}).join("\n")+"\n"},e}(),$=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.domain().nameId(),n=this.map[t];n||(n=new G(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return this.typeName+":\n"+Object.keys(this.map).map(function(t){return" "+e.map[t].print()}).join("\n")},e}(),G=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.nameId();this.map[t]=e},e.prototype.print=function(){return this.typeName+": "+Object.keys(this.map).sort().join(", ")},e}()},function(e,t,n){var r,i,a;!function(n,o){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=o():(i=[],r=o,a="function"==typeof r?r.apply(t,i):r,!(void 0!==a&&(e.exports=a)))}("object"==typeof window?window:this,function(){"use strict";function e(e){this.capacity=e>0?+e:Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList={length:0,head:null,end:null}}function t(n){return this instanceof t?void(this._LRUCacheState=new e(n)):new t(n)}function n(e,t){t!==e.head&&(e.end?e.end===t&&(e.end=t.n):e.end=t,r(t.n,t.p),r(t,e.head),e.head=t,e.head.n=null)}function r(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}var i=t.prototype;return i.get=function(e){var t=this._LRUCacheState,r=t.hash[e];return r?(n(t.linkedList,r),t.data[e]):void 0},i.set=function(e,t){var r=this._LRUCacheState,i=r.hash[e];return void 0===t?this:(i||(r.hash[e]={key:e},r.linkedList.length+=1,i=r.hash[e]),n(r.linkedList,i),r.data[e]=t,r.linkedList.length>r.capacity&&this.remove(r.linkedList.end.key),this)},i.update=function(e,t){this._LRUCacheState;if(this.has(e)){var n=this.get(e);this.set(e,t(n))}return this},i.remove=function(e){var t=this._LRUCacheState,n=t.hash[e];return n?(n===t.linkedList.head&&(t.linkedList.head=n.p),n===t.linkedList.end&&(t.linkedList.end=n.n),r(n.n,n.p),delete t.hash[e],delete t.data[e],t.linkedList.length-=1,this):this},i.removeAll=function(){return this._LRUCacheState=new e(this._LRUCacheState.capacity),this},i.info=function(){var e=this._LRUCacheState;return{capacity:e.capacity,length:e.linkedList.length}},i.keys=function(){for(var e=this._LRUCacheState,t=[],n=e.linkedList.head;n;)t.push(n.key),n=n.p;return t},i.has=function(e){return!!this._LRUCacheState.hash[e]},i.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},i.popStale=function(){var e=this.staleKey();if(!e)return null;var t=[e,this._LRUCacheState.data[e]];return this.remove(e),t},t.NAME="LRUCache",t.VERSION="v0.2.0",t})},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&o&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"] "+e+s(n))}||function(){}}if(!e){if(t instanceof a)return t;e=t}var i={},o=e instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function a(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){return e?"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]":void 0}function u(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid doc source"),o.doc},a.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;s>u;u++){var e=r.getURI(u),p=r.getValue(u),n=r.getQName(u),c=i.createAttributeNS(e,n);this.locator&&o(r.getLocator(u),c),c.value=c.nodeValue=p,a.setAttributeNode(c)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),l(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=u.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=u.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),l(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),l(this,i)}},warning:function(e){console.warn("[xmldom warning] "+e,s(this.locator))},error:function(e){console.error("[xmldom error] "+e,s(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError] "+e,s(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){a.prototype[e]=function(){return null}});var p=n(88).XMLReader,c=t.DOMImplementation=n(89).DOMImplementation;t.XMLSerializer=n(89).XMLSerializer,t.DOMParser=r},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){function e(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}function t(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function n(t,n){return t===t.toUpperCase()?n.toUpperCase():t[0]===t[0].toUpperCase()?e(n):n.toLowerCase()}function r(e,t){return e.replace(/\$(\d{1,2})/g,function(e,n){return t[n]||""})}function i(e,t,i){if(!e.length||l.hasOwnProperty(e))return t;for(var a=i.length;a--;){var o=i[a];if(o[0].test(t))return t.replace(o[0],function(e,t,i){var a=r(o[1],arguments);return""===e?n(i[t-1],a):n(e,a)})}return t}function a(e,t,r){return function(a){var o=a.toLowerCase();return t.hasOwnProperty(o)?n(a,o):e.hasOwnProperty(o)?n(a,e[o]):i(o,a,r)}}function o(e,t,n){var r=1===t?o.singular(e):o.plural(e);return(n?t+" ":"")+r}var s=[],u=[],l={},p={},c={};return o.plural=a(c,p,s),o.singular=a(p,c,u),o.addPluralRule=function(e,n){s.push([t(e),n])},o.addSingularRule=function(e,n){u.push([t(e),n])},o.addUncountableRule=function(e){return"string"==typeof e?void(l[e.toLowerCase()]=!0):(o.addPluralRule(e,"$0"),void o.addSingularRule(e,"$0"))},o.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),c[e]=t,p[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["thief","thieves"],["genie","genies"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach(function(e){return o.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return o.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(?:sis|ses)$/i,"$1sis"],[/(^analy)(?:sis|ses)$/i,"$1sis"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(^[pl]|zomb|^(?:neck)?t|[aeo][lt]|cut)ies$/i,"$1ie"],[/(\b(?:mon|smil))ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(e[mn]u)s?$/i,"$1"],[/(movie|twelve)s$/i,"$1"],[/(cris|test|diagnos)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return o.addSingularRule(e[0],e[1])}),["advice","agenda","bison","bream","buffalo","carp","chassis","cod","cooperation","corps","digestion","debris","diabetes","energy","equipment","elk","excretion","expertise","flounder","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","information","jeans","justice","kudos","labour","machinery","mackerel","media","mews","moose","news","pike","plankton","pliers","pollution","premises","rain","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","trout","tuna","whiting","wildebeest","wildlife","you",/pox$/i,/ois$/i,/deer$/i,/fish$/i,/sheep$/i,/measles$/i,/[^aeiou]ese$/i].forEach(o.addUncountableRule),o})},function(e,t,n){"use strict";function r(e,t){var n=t?t.endPosition:e.endPosition+1,r={key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:f.MAPPING,parent:null,errors:[]};return r}function i(e,t,n,r){return{errors:[],referencesAnchor:e,value:r,startPosition:t,endPosition:n,kind:f.ANCHOR_REF,parent:null}}function a(e){return void 0===e&&(e=""),{errors:[],startPosition:-1,endPosition:-1,value:e,kind:f.SCALAR,parent:null,doubleQuoted:!1}}function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:f.SEQ,parent:null}}function s(){return o()}function u(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e?e:[],kind:f.MAP,parent:null}}var l=n(90),p=n(91),c=function(){function e(e,t){void 0===t&&(t=null),this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1)}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&"function"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n=0&&(u=t.indexOf("}",++p),!(0>u));p=t.indexOf("{",u)){var c=t.substring(p,u);if(l[c]=!0,o[c])o[c].forEach(function(e){return s.push(e)});else{var f=new Y.StringTypeDeclarationImpl(c);f.setName(c);var d=f.highLevel();d.setParent(i),f.meta().setCalculated(),d.patchProp(a),s.push(f)}}return Object.keys(o).filter(function(e){return!l[e]}).forEach(function(e){return o[e].forEach(function(e){return s.push(e)})}),s}function W(e){var t=e.schema();if(null==t)return null;var n=t.value();if(!n)return null;if(te.stringStartsWith(n,"{")||te.stringStartsWith(n,"[")||te.stringStartsWith(n,"<"))return n;var r=e.highLevel(),i=r.root(),a=i.elementsOfKind(z.Universe08.Api.properties.schemas.name),o=oe.find(a,function(e){return e.name()==n});if(!o)return n;if(!o.getKind||o.getKind()!=G.NodeKind.NODE)return n;if(o.definition().key()!=z.Universe08.GlobalSchema)return n;var s=o.attr(z.Universe08.GlobalSchema.properties.value.name);return null==s?null:s.value()}function q(e){var t=e.highLevel();if(null==t)return null;var n=t.lowLevel();if(null==n)return null;var r=n.children().filter(function(e){return e.key().indexOf("<<")>=0});if(0==r.length)return null;var i=new $.TypeInstanceImpl(r);return i}var Y=n(52),H=n(48),$=n(51),G=n(9),X=n(16),z=n(18),J=n(27),Q=n(30),Z=n(44),ee=n(28),te=n(33),ne=n(13),re=n(14),ie=n(24),ae=n(15),oe=n(70);t.load=r,t.expandTraitsAndResourceTypes=i,t.completeRelativeUri=a,t.absoluteUri=o,t.qName=s,t.traitsPrimary=u,t.allTraits=l,t.resourceTypesPrimary=p,t.allResourceTypes=c,t.relativeUriSegments=d,t.parentResource=h,t.parent=m,t.childResource=y,t.getResource=v,t.childMethod=g,t.getMethod=A,t.ownerApi=T,t.methodId=S,t.isOkRange=b,t.allResources=_;t.uriParametersPrimary=N,t.uriParameters=w,t.baseUriParametersPrimary=R,t.baseUriParameters=I,t.absoluteUriParameters=M,t.protocolsPrimary=C,t.allProtocols=L,t.securedByPrimary=P,t.allSecuredBy=O,t.securitySchemeName=D,t.securityScheme=x,t.RAMLVersion=U,t.structuredValue=k,t.referenceName=F,t.referencedTrait=B,t.referencedResourceType=K,t.schemaContent=W,t.getTemplateParametrizedProperties=q},function(e,t,n){"use strict";function r(e){return null==e}function i(e){return r(e)?"":String(e)}function a(e){return-1===[0,!1,"","0","false"].indexOf(e)}function o(e){return isFinite(e)?Number(e):null}function s(e){return e%1===0?Number(e):null}function u(e){return isNaN(Date.parse(e))?null:new Date(e)}function l(e,t,n){var i=Array.isArray(e)?e:[e],a=i.map(function(e){function i(e,t,n){for(var r=0;r1)return null;t=t[0]}return i(t,n,a)}});return function(e,t,n){for(var r=0;r=e}}function u(e){return function(t){return e>=t}}function l(t){return function(n){return e.byteLength(n)>=t}}function p(t){return function(n){return e.byteLength(n)<=t}}function c(e){return e&&0!=e.length?function(t){return e.indexOf(t)>-1}:function(e){return!0}}function f(e){var t="string"==typeof e?new RegExp(e):e;return t.test.bind(t)}function d(e,t,n,r,i){return{valid:e,rule:r,attr:i,value:n,key:t}}function h(e,t){var n=[];return Object.keys(e).forEach(function(r){var i=t[r];if(i){var a=e[r];n.push([r,i(a,r),a])}}),function(e,t,r){for(var i=0;ie.length)return"array should contain at least "+t.value()+" items"}return null}),"enum"==e.arguments[0]&&t.setFacetValidator(function(e,t){var n=e+"",r=t;try{if(!r.some(function(e){return e==n}))return"value should be one of :"+r.join(",")}catch(i){return}return null}),"maxItems"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){var n=Number.parseInt(""+t);if(nObject.keys(e).length)return"object should contain at least "+t.value()+" properties"}return null}),"maxProperties"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Object){var n=Number.parseInt(""+t);if(ne.length)return"string length should be at least "+n}return null}),"maxLength"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(("number"==typeof e||"boolean"==typeof e)&&(e=""+e),"string"==typeof e){var n=Number.parseInt(""+t);if(ne)return"value should be not less then "+n}return null}),"maximum"==e.arguments[0]&&t.setFacetValidator(function(e,t){if("string"==typeof e&&(e=parseFloat(e)),"number"==typeof e){var n=parseFloat(t);if(e>n)return"value should be not more then "+n}return null}),"pattern"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(("number"==typeof e||"boolean"==typeof e)&&(e=""+e),"string"==typeof e){var n=new RegExp(t);if(!n.test(e))return"string should match to "+t}return null})},extraMetaKey:function(e,t){"statusCodes"==e.arguments[0]&&(t.withOftenKeys(o.statusCodes.filter(function(e){return e.code.indexOf("x")<0}).map(function(e){return e.code})),t.setValueDocProvider(function(e){var t=s.find(o.statusCodes,function(t){return t.code==e});return t?e+":"+t.description:null})),"headers"==e.arguments[0]&&(t.setValueSuggester(function(e){if(e.property()){var t=e.property().getChildValueConstraints();if(s.find(t,function(e){return"location"==e.name&&"Params.ParameterLocation.HEADERS"==e.value}))return o.headers.map(function(e){return e.header});if(e.property()&&"headers"==e.property().nameId())return o.headers.map(function(e){return e.header})}return null}),t.setValueDocProvider(function(e){var t=s.find(o.headers,function(t){return t.header==e});return t?e+":"+t.description:null})),"methods"==e.arguments[0]&&t.setValueDocProvider(function(e){var t=s.find(o.methods,function(t){return t.method==e.toUpperCase()});return t?e+":"+t.description:null})},requireValue:function(e,t){t.withContextRequirement(""+e.arguments[0],""+e.arguments[1])},allowMultiple:function(e,t){t.withMultiValue(!0)},constraint:function(e,t){},newInstanceName:function(e,t){t.withNewInstanceName(""+e.arguments[0])},declaringFields:function(e,t){t.withThisPropertyDeclaresFields()},describesAnnotation:function(e,t){t.withDescribes(e.arguments[0])},allowNull:function(e,t){t.withAllowNull()},descriminatingProperty:function(e,t){t.withDescriminating(!0)},description:function(e,t){t.withDescription(""+e.arguments[0])},inherited:function(e,t){t.withInherited(!0)},selfNode:function(e,t){t.withSelfNode()},grammarTokenKind:function(e,t){t.getAdapter(u.RAMLPropertyService).withPropertyGrammarType(""+e.arguments[0])},canInherit:function(e,t){t.withInheritedContextValue(""+e.arguments[0])},canBeDuplicator:function(e,t){t.setCanBeDuplicator()},example:function(e,t){t.getAdapter(u.RAMLPropertyService).setExample(!0)},typeExpression:function(e,t){t.getAdapter(u.RAMLPropertyService).setTypeExpression(!0)},hide:function(e,t){0==e.arguments.length?t.getAdapter(u.RAMLPropertyDocumentationService).setHidden(!0):t.getAdapter(u.RAMLPropertyDocumentationService).setHidden(e.arguments[0])},documentationTableLabel:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setDocTableName(""+e.arguments[0])},markdownDescription:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setMarkdownDescription(""+e.arguments[0])},valueDescription:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setValueDescription(null!=e.arguments[0]?""+e.arguments[0]:null)},customHandling:function(e,t){}},t.recordAnnotation=i},function(e,t,n){e.exports={34:{code:"34",message:""},1105:{code:"1105",message:""},1106:{code:"1106",message:""},1107:{code:"1107",message:""},1108:{code:"1108",message:""},1109:{code:"1109",message:""},1110:{code:"1110",message:""},CONTEXT_REQUIREMENT_VIOLATION:{code:"CONTEXT_REQUIREMENT_VIOLATION",message:"{{v1}} should be {{v2}} to use type {{v3}}"},INVALID_PARAMETER_NAME:{code:"INVALID_PARAMETER_NAME",message:"Invalid parameter name: '{{paramName}}' is reserved"},UNUSED_PARAMETER:{code:"UNUSED_PARAMETER",message:"Unused parameter: '{{paramName}}'"},INVALID_PROPERTY_OWNER_TYPE:{code:"INVALID_PROPERTY_OWNER_TYPE",message:"Property '{{propName}}' can only be used if type is {{namesStr}}"},NODE_KEY_IS_A_MAP:{code:"NODE_KEY_IS_A_MAP",message:"Node key can not be a map"},NODE_KEY_IS_A_SEQUENCE:{code:"NODE_KEY_IS_A_SEQUENCE",message:"Node key can not be a sequence"},SEQUENCE_REQUIRED:{code:"SEQUENCE_REQUIRED",message:"Node: '{{name}}' should be wrapped in sequence"},PROPERTY_MUST_BE_A_MAP_10:{code:"PROPERTY_MUST_BE_A_MAP_10",message:"'{{propName}}' should be a map in RAML 1.0"},PROPERTY_MUST_BE_A_MAP:{code:"PROPERTY_MUST_BE_A_MAP",message:"Property '{{propName}}' should be a map"},PROPERTY_MUST_BE_A_SEQUENCE:{code:"PROPERTY_MUST_BE_A_SEQUENCE",message:"Property '{{propName}}' should be a sequence"},INVALID_PROPERTY_RANGE:{code:"INVALID_PROPERTY_RANGE",message:"Property '{{propName}}' must be a {{range}}"},MAP_REQUIRED:{code:"MAP_REQUIRED",message:"should be a map in RAML 1.0"},UNRESOLVED_REFERENCE:{code:"UNRESOLVED_REFERENCE",message:"Reference: '{{ref}}' can not be resolved"},SCALAR_PROHIBITED:{code:"SCALAR_PROHIBITED",message:"Property '{{propName}}' can not have scalar value"},UNKNOWN_NODE:{code:"UNKNOWN_NODE",message:"Unknown node: '{{name}}'"},RECURSIVE_DEFINITION:{code:"RECURSIVE_DEFINITION",message:"Recursive definition: '{{name}}'"},PROPERTY_ALREADY_SPECIFIED:{code:"PROPERTY_ALREADY_SPECIFIED",message:"'{{propName}}' is already specified.`"},ISSUES_IN_THE_LIBRARY:{code:"ISSUES_IN_THE_LIBRARY",message:"Issues in the used library: '{{value}}'"},INVALID_LIBRARY_PATH:{code:"INVALID_LIBRARY_PATH",message:"Can not resolve library from path: '{{path}}'"},EMPTY_FILE:{code:"EMPTY_FILE",message:"Empty file: {{path}}"},SPACES_IN_KEY:{code:"SPACES_IN_KEY",message:"Keys should not have spaces '{{value}}'"},INCLUDE_ERROR:{code:"INCLUDE_ERROR",message:"{{msg}}"},PATH_EXCEEDS_ROOT:{code:"PATH_EXCEEDS_ROOT",message:"Resolved include path exceeds file system root"},ILLEGAL_PATTERN:{code:"ILLEGAL_PATTERN",message:"Illegal pattern: '{{value}}'"},UNKNOWN_FUNCTION:{code:"UNKNOWN_FUNCTION",message:"Unknown function applied to parameter: '{{transformerName}}'"},REQUEST_BODY_DISABLED:{code:"REQUEST_BODY_DISABLED",message:"Request body is disabled for '{{methodName}}' method."},SCALAR_EXPECTED:{code:"SCALAR_EXPECTED",message:"Scalar is expected here"},STRING_EXPECTED:{code:"STRING_EXPECTED",message:"Property '{{propName}}' must be a string"},UNKNOWN_ANNOTATION:{code:"UNKNOWN_ANNOTATION",message:"Unknown annotation: '{{aName}}'"},STRING_EXPECTED_2:{code:"STRING_EXPECTED_2",message:"{{propName}} value should be a string"},SECUREDBY_LIST_08:{code:"SECUREDBY_LIST_08",message:"'securedBy' should be a list in RAML08"},INVALID_ANNOTATION_LOCATION:{code:"INVALID_ANNOTATION_LOCATION",message:"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}"},BOOLEAN_EXPECTED:{code:"BOOLEAN_EXPECTED",message:"'true' or 'false' is expected here"},NUMBER_EXPECTED:{code:"NUMBER_EXPECTED",message:"Value of '{{propName}}' must be a number"},STRING_EXPECTED_3:{code:"STRING_EXPECTED_3",message:"'{{propName}}' must be a string"},STATUS_MUST_BE_3NUMBER:{code:"STATUS_MUST_BE_3NUMBER",message:"Status code should be 3 digits number."},EMPTY_VALUE_NOT_ALLOWED:{code:"EMPTY_VALUE_NOT_ALLOWED",message:"Empty value is not allowed here"},INVALID_VALUE_SCHEMA:{code:"INVALID_VALUE_SCHEMA",message:"Invalid value schema: '{{iValue}}'"},INVALID_VALUE:{code:"INVALID_VALUE",message:"Invalid value: '{{iValue}}'. Allowed values are: {{aValues}}"},SCHEMA_EXCEPTION:{code:"SCHEMA_EXCEPTION",message:"Schema exception: {{msg}}"},SCHEMA_ERROR:{code:"SCHEMA_ERROR",message:"{{msg}}"},MISSING_VERSION:{code:"MISSING_VERSION",message:"Missing 'version'"},URI_PARAMETER_NAME_MISSING:{code:"URI_PARAMETER_NAME_MISSING",message:"URI parameter must have name specified"},URI_EXCEPTION:{code:"URI_EXCEPTION",message:"{{msg}}"},INVALID_MEDIATYPE:{code:"INVALID_MEDIATYPE",message:"Invalid media type '{{mediaType}}'"},MEDIATYPE_EXCEPTION:{code:"MEDIATYPE_EXCEPTION",message:"{{msg}}"},FORM_IN_RESPONSE:{code:"FORM_IN_RESPONSE",message:"Form related media types can not be used in responses"},UNUSED_URL_PARAMETER:{code:"UNUSED_URL_PARAMETER",message:"Unused url parameter {{paramName}}"},UNRECOGNIZED_ELEMENT:{code:"UNRECOGNIZED_ELEMENT",message:"Unrecognized {{referencedToName}}: '{{ref}}'."},TYPES_VARIETY_RESTRICTION:{code:"TYPES_VARIETY_RESTRICTION",message:"Type can be either of: string, number, integer, file, date or boolean"},UNRECOGNIZED_SECURITY_SCHEME:{code:"UNRECOGNIZED_SECURITY_SCHEME",message:"Unrecognized security scheme type: '{{ref}}'. Allowed values are: 'OAuth 1.0', 'OAuth 2.0', 'Basic Authentication', 'DigestSecurityScheme Authentication', 'x-{other}'"},DUPLICATE_TRAIT_REFERENCE:{code:"DUPLICATE_TRAIT_REFERENCE",message:"Duplicate trait reference: '{{refValue}}'."},IS_IS_ARRAY:{code:"IS_IS_ARRAY",message:"Property 'is' must be an array"},RESOURCE_TYPE_NAME:{code:"RESOURCE_TYPE_NAME",message:"Resource type name must be provided"},MULTIPLE_RESOURCE_TYPES:{code:"MULTIPLE_RESOURCE_TYPES",message:"A resource or resourceType can inherit from a single resourceType"},UNKNOWN_RAML_VERSION:{code:"UNKNOWN_RAML_VERSION",message:"Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'"},UNKNOWN_TOPL_LEVEL_TYPE:{code:"UNKNOWN_TOPL_LEVEL_TYPE",message:"Unknown top level type: '{{typeName}}'"},REDUNDANT_FRAGMENT_NAME:{code:"REDUNDANT_FRAGMENT_NAME",message:"Redundant fragment name: '{{typeName}}'"},WEB_FORMS:{code:"WEB_FORMS",message:"File type can be only used in web forms"},MISSING_REQUIRED_PROPERTY:{code:"MISSING_REQUIRED_PROPERTY",message:"Missing required property '{{propName}}'"},VALUE_NOT_PROVIDED:{code:"VALUE_NOT_PROVIDED",message:"Value is not provided for parameter: '{{propName}}'"},SUSPICIOUS_DOUBLEQUOTE:{code:"SUSPICIOUS_DOUBLEQUOTE",message:'Suspicious double quoted multiline scalar, it is likely that you forgot closing "{{value}}'},ANNOTATION_TARGET_MUST_BE_A_STRING:{code:"ANNOTATION_TARGET_MUST_BE_A_STRING",message:"Annotation target must be set by a string"},ALLOWED_TARGETS_MUST_BE_ARRAY:{code:"ALLOWED_TARGETS_MUST_BE_ARRAY",message:"'allowedTargets' property value must be an array of type names or a single type name"},UNSUPPORTED_ANNOTATION_TARGET:{code:"UNSUPPORTED_ANNOTATION_TARGET",message:"Unsupported annotation target: '{{aTarget}}'"},SCHEMA_NAME_MUST_BE_STRING:{code:"SCHEMA_NAME_MUST_BE_STRING",message:"Schema '{{name}}' must be a string"},FORM_PARAMS_IN_RESPONSE:{code:"FORM_PARAMS_IN_RESPONSE",message:"Form parameters can not be used in response"},FORM_PARAMS_WITH_EXAMPLE:{code:"FORM_PARAMS_WITH_EXAMPLE",message:"'formParameters' property cannot be used together with the 'example' or 'schema' properties"},AUTHORIZATION_GRANTS_ENUM:{code:"AUTHORIZATION_GRANTS_ENUM",message:"'authorizationGrants' value should be one of 'authorization_code', 'implicit', 'password', 'client_credentials' or to be an abolute URI"},AUTHORIZATION_URI_REQUIRED:{code:"AUTHORIZATION_URI_REQUIRED",message:"'authorizationUri' is required when `authorization_code` or `implicit` grant type are used "},REPEATING_COMPONENTS_IN_ENUM:{code:"REPEATING_COMPONENTS_IN_ENUM",message:"'enum' value contains repeating components"},INTEGER_EXPECTED:{code:"INTEGER_EXPECTED",message:"Integer is expected"},NUMBER_EXPECTED_2:{code:"NUMBER_EXPECTED_2",message:"Number is expected"},RESOURCE_TYPE_NULL:{code:"RESOURCE_TYPE_NULL",message:"Resource type can not be null"},SCALAR_PROHIBITED_2:{code:"SCALAR_PROHIBITED_2",message:"Node '{{name}}' can not be a scalar"},VERSION_NOT_ALLOWED:{code:"VERSION_NOT_ALLOWED",message:"'version' parameter not allowed here",comment:"I dont like the message, but its coming from JS 0.8 parser @Denis"},INVALID_OVERLAY_NODE:{code:"INVALID_OVERLAY_NODE",message:"The '{{nodeId}}' node does not match any node of the master api."},INVALID_OVERRIDE_IN_OVERLAY:{code:"INVALID_OVERRIDE_IN_OVERLAY",message:"Property '{{propName}}' is not allowed to be overriden or added in overlays"},KEYS_SHOULD_BE_UNIQUE:{code:"KEYS_SHOULD_BE_UNIQUE",message:"Keys should be unique"},ALREADY_EXISTS:{code:"ALREADY_EXISTS",message:"{{capitalized}} '{{name}}' already exists"},ALREADY_EXISTS_IN_CONTEXT:{code:"ALREADY_EXISTS_IN_CONTEXT",message:"{{name}}' already exists in this context"},PROPERTY_USED:{code:"PROPERTY_USED",message:"Property already used: '{{propName}}'"},PARENT_PROPERTY_USED:{code:"PARENT_PROPERTY_USED",message:"{{parent}} property already used: '{{propName}}'"},INVALID_JSON_SCHEMA:{code:"INVALID_JSON_SCHEMA",message:"Invalid JSON schema. Unexpected value '{{propName}}'"},EXAMPLE_SCHEMA_FAILURE:{code:"EXAMPLE_SCHEMA_FAILURE",message:"Example does not conform to schema: {{msg}}"},CAN_NOT_PARSE_JSON:{code:"CAN_NOT_PARSE_JSON",message:"Can not parse JSON: {{msg}}"},CAN_NOT_PARSE_XML:{code:"CAN_NOT_PARSE_XML",message:"Can not parse XML: {{msg}}"},OPTIONAL_SCLARAR_PROPERTIES_10:{code:"OPTIONAL_SCLARAR_PROPERTIES_10",message:"Optional scalar properties are not allowed in {{templateNamePlural}} and their descendants: '{{propName}}?'"},OPTIONAL_PROPERTIES_10:{code:"OPTIONAL_PROPERTIES_10",message:"Optional properties are not allowed in '{{propName}}': '{{oPropName}}'"},ONLY_METHODS_CAN_BE_OPTIONAL:{code:"ONLY_METHODS_CAN_BE_OPTIONAL",message:"Only method nodes can be optional"},PROPERTY_UNUSED:{code:"PROPERTY_UNUSED",message:"{{propName}} unused"},CYCLE_IN_DEFINITION:{code:"CYCLE_IN_DEFINITION",message:"{{typeName}} definition contains cycle: {{cycle}}"},SEQUENCE_NOT_ALLOWED_10:{code:"SEQUENCE_NOT_ALLOWED_10",message:"In RAML 1.0 {{propName}} is not allowed to have sequence as definition"},MAP_EXPECTED:{code:"MAP_EXPECTED",message:"Map is expected here"},ERROR_IN_INCLUDED_FILE:{code:"ERROR_IN_INCLUDED_FILE",message:"Error in the included file: {{msg}}"},NODE_SHOULD_HAVE_VALUE:{code:"NODE_SHOULD_HAVE_VALUE",message:"node should have at least one member value"},NAMED_PARAMETER_NEEDS_TYPE:{code:"NAMED_PARAMETER_NEEDS_TYPE",message:"named parameter needs at least one type"},ENUM_IS_EMPTY:{code:"ENUM_IS_EMPTY",message:"enum is empty"},ENUM_MUST_BE_AN_ARRAY:{code:"ENUM_MUST_BE_AN_ARRAY",message:"the value of enum must be an array"},DEFINITION_SHOULD_BE_A_MAP:{code:"DEFINITION_SHOULD_BE_A_MAP",message:"{{typeName}} definition should be a map"},RESOURCES_SHARE_SAME_URI:{code:"RESOURCES_SHARE_SAME_URI",message:"Resources share same URI"},TYPES_AND_SCHEMAS_ARE_EXCLUSIVE:{code:"TYPES_AND_SCHEMAS_ARE_EXCLUSIVE",message:"'types' and 'schemas' are mutually exclusive"},TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS:{code:"TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS",message:"Trait or resource type parameter name must contain non whitespace characters"},INVALID_SECURITY_SCHEME_SCOPE:{code:"INVALID_SECURITY_SCHEME_SCOPE",message:"The '{{invalidScope}}' scope is not allowed for the '{{securityScheme}}' security scheme. Allowed scopes are: {{allowedScopes}}."},INCLUDE_TAG_MISSING:{code:"INCLUDE_TAG_MISSING",message:"The '!include' tag is missing"}}},function(e,t,n){(function(e){(function(){var r,i=[].slice;r=n(120),t.allowUnsafeEval=function(t){var n;n=e.eval;try{return e.eval=function(e){return r.runInThisContext(e)},t()}finally{e.eval=n}},t.allowUnsafeNewFunction=function(n){var r;r=e.Function;try{return e.Function=t.Function,n()}finally{e.Function=r}},t.Function=function(){var e,t,n,a,o,s,u;for(n=2<=arguments.length?i.call(arguments,0,o=arguments.length-1):(o=0,[]),e=arguments[o++],a=[],s=0,u=n.length;u>s;s++)t=n[s],"string"==typeof t&&(t=t.split(/\s*,\s*/)),a.push.apply(a,t);return r.runInThisContext("(function("+a.join(", ")+") {\n "+e+"\n})")},t.Function.prototype=e.Function.prototype}).call(this)}).call(t,function(){return this}())},function(e,t,n){"use strict";t.decode=t.parse=n(98),t.encode=t.stringify=n(99)},function(e,t,n){"use strict";function r(){return L}function i(e){return e instanceof b.AbstractType}function a(e,t){return void 0===t&&(t=b.builtInRegistry()),_.parseJSONTypeCollection(e,t)}function o(e){return _.parseJSON(null,e,b.builtInRegistry())}function s(e){return e.types||e.annotationTypes?_.parseJSONTypeCollection(e):_.parseJSON(null,e)}function u(e,t){return _.parseJSON(null,e,t?t.getTypeRegistry():b.builtInRegistry())}function l(e){return _.parseTypeCollection(e,b.builtInRegistry())}function p(e,t,n,r,i,a,o){if(void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===o&&(o=!1),a){var s;if(s=i?n.getAnnotationType(e):n.getType(e),null!=s)return s}return _.parse(e,t,n?n.getTypeRegistry():b.builtInRegistry(),r,i,a,o)}function c(e){return _.storeAsJSON(e)}function f(e,t,n){void 0===n&&(n=!1),b.autoCloseFlag=n;try{return t.validate(e,n)}finally{b.autoCloseFlag=!1}}function d(e,t){return e.validateType(t.getAnnotationTypeRegistry())}function h(e,t){return t.ac(e)}function m(e){return e.canDoAc()}function y(){return N.getInstance().allPrototypes()}function v(){return b.builtInRegistry()}function g(e){for(var t=[],n=1;n1&&(r=n[0]+"@",e=n[1]),e=e.replace(L,".");var i=e.split("."),a=s(i,t).join(".");return r+a}function l(e){for(var t,n,r=[],i=0,a=e.length;a>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&a>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function p(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:T}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?D(e/N):e>>1,e+=D(e/t);e>O*b>>1;r+=T)e=D(e/O);return D(r+(O+1)*e/(e+_))}function h(e){var t,n,r,i,a,s,u,l,f,h,m=[],y=e.length,v=0,g=R,A=w;for(n=e.lastIndexOf(I),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;y>i;){for(a=v,s=1,u=T;i>=y&&o("invalid-input"),l=c(e.charCodeAt(i++)),(l>=T||l>D((E-v)/s))&&o("overflow"),v+=l*s,f=A>=u?S:u>=A+b?b:u-A,!(f>l);u+=T)h=T-f,s>D(E/h)&&o("overflow"),s*=h;t=m.length+1,A=d(v-a,t,0==a),D(v/t)>E-g&&o("overflow"),g+=D(v/t),v%=t,m.splice(v++,0,g)}return p(m)}function m(e){var t,n,r,i,a,s,u,p,c,h,m,y,v,g,A,_=[];for(e=l(e),y=e.length,t=R,n=0,a=w,s=0;y>s;++s)m=e[s],128>m&&_.push(x(m));for(r=i=_.length,i&&_.push(I);y>r;){for(u=E,s=0;y>s;++s)m=e[s],m>=t&&u>m&&(u=m);for(v=r+1,u-t>D((E-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;y>s;++s)if(m=e[s],t>m&&++n>E&&o("overflow"),m==t){for(p=n,c=T;h=a>=c?S:c>=a+b?b:c-a,!(h>p);c+=T)A=p-h,g=T-h,_.push(x(f(h+A%g,0))),p=D(A/g);_.push(x(f(p,0))),a=d(n,v,r==i),n=0,++r}++n,++t}return _.join("")}function y(e){return u(e,function(e){return M.test(e)?h(e.slice(4).toLowerCase()):e})}function v(e){return u(e,function(e){return C.test(e)?"xn--"+m(e):e})}var g=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);(g.global===g||g.window===g||g.self===g)&&(a=g);var A,E=2147483647,T=36,S=1,b=26,_=38,N=700,w=72,R=128,I="-",M=/^xn--/,C=/[^\x20-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=T-S,D=Math.floor,x=String.fromCharCode;A={version:"1.3.2",ucs2:{decode:l,encode:p},decode:h,encode:m,toASCII:v,toUnicode:y},r=function(){return A}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(149)(e),function(){return this}())},function(e,t,n){function r(){}function i(e,t,n,r,i){function p(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function h(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?p(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function m(t){if(t>b){var n=e.substring(b,t).replace(/&#?\w+;/g,h);E&&y(b),r.characters(n,0,t-b),b=t}}function y(t,n){for(;t>=g&&(n=A.exec(e));)v=n.index,g=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,g=0,A=/.*(?:\r\n?|\n)|.*$/g,E=r.locator,T=[{currentNSMap:t}],S={},b=0;;){try{var _=e.indexOf("<",b);if(0>_){if(!e.substr(b).match(/^\s*$/)){var N=r.doc,w=N.createTextNode(e.substr(b));N.appendChild(w),r.currentElement=w}return}switch(_>b&&m(_),e.charAt(_+1)){case"/":var R=e.indexOf(">",_+3),I=e.substring(_+2,R),M=T.pop();0>R?(I=e.substring(_+2).replace(/[\s<].*/,""),i.error("end tag name: "+I+" is not complete:"+M.tagName),R=_+1+I.length):I.match(/\sF;F++){var B=D[F];y(B.offset),B.locator=a(E,{})}r.locator=k,s(D,r,x)&&T.push(D),r.locator=E}else s(D,r,x)&&T.push(D);"http://www.w3.org/1999/xhtml"!==D.uri||D.closed?R++:R=u(e,R,D.tagName,h,r)}}catch(K){i.error("element parse error: "+K),R=-1}R>b?b=R:m(Math.max(_,b)+1)}}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function o(e,t,n,r,i,a){for(var o,s,u=++t,l=A;;){var p=e.charAt(u);switch(p){case"=":if(l===E)o=e.slice(t,u),l=S;else{if(l!==T)throw new Error("attribute equal must after attrName");l=S}break;case"'":case'"':if(l===S||l===E){if(l===E&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,u=e.indexOf(p,t),!(u>0))throw new Error("attribute value no end '"+p+"' match");s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t-1),l=_}else{if(l!=b)throw new Error('attribute value must after "="');s=e.slice(t,u).replace(/&#?\w+;/g,i),n.add(o,s,t),a.warning('attribute "'+o+'" missed start quot('+p+")!!"),t=u+1,l=_}break;case"/":switch(l){case A:n.setTagName(e.slice(t,u));case _:case N:case w:l=w,n.closed=!0;case b:case E:case T:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==A&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case A:n.setTagName(e.slice(t,u));case _:case N:case w:break;case b:case E:s=e.slice(t,u),"/"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case T:l===T&&(s=o),l==b?(a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t));break;case S:throw new Error("attribute value missed!!")}return u;case"€":p=" ";default:if(" ">=p)switch(l){case A:n.setTagName(e.slice(t,u)),l=N;break;case E:o=e.slice(t,u),l=T;break;case b:var s=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+s+'" missed quot(")!!'),n.add(o,s,t);case _:l=N}else switch(l){case T:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),n.add(o,o,t),t=u,l=E;break;case _:a.warning('attribute space is required"'+o+'"!!');case N:l=E,t=u;break;case S:l=b,t=u;break;case w:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function s(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,l=s.indexOf(":");if(l>0)var c=o.prefix=s.slice(0,l),f=s.slice(l+1),d="xmlns"===c&&f;else f=s,c=null,d="xmlns"===s&&"";o.localName=f,d!==!1&&(null==i&&(i={},p(n,n={})),n[d]=i[d]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(var a=e.length;a--;){o=e[a];var c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=n[c||""]))}var l=r.indexOf(":");l>0?(c=e.prefix=r.slice(0,l),f=e.localName=r.slice(l+1)):(c=null,f=e.localName=r);var h=e.uri=n[c||""];if(t.startElement(h,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(h,f,r),i)for(c in i)t.endPrefixMapping(c)}function u(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function l(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(""),t>i&&(i=e.lastIndexOf("i}function p(e,t){for(var n in e)t[n]=e[n]}function c(e,t,n,r){var i=e.charAt(t+2);switch(i){case"-":if("-"===e.charAt(t+3)){var a=e.indexOf("-->",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=m(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var u=o[1][0],l=s>3&&/^public$/i.test(o[2][0])&&o[3][0],p=s>4&&o[4][0],c=o[s-1];return n.startDTD(u,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),p&&p.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function f(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function d(e){}function h(e,t){return e.__proto__=t,e}function m(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var y=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=new RegExp("[\\-\\.0-9"+y.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),g=new RegExp("^"+y.source+v.source+"*(?::"+y.source+v.source+"*)?$"),A=0,E=1,T=2,S=3,b=4,_=5,N=6,w=7;r.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),p(t,t={}),i(e,t,n,r,this.errorHandler),r.endDocument()}},d.prototype={setTagName:function(e){if(!g.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!g.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=r},function(e,t,n){function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t){function n(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(n.prototype=t.prototype,n=new n,r(i,n),e.prototype=i=n),i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}function a(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ae[e]),this.message=ae[e],Error.captureStackTrace&&Error.captureStackTrace(this,a);return n.code=e,t&&(this.message=this.message+": "+t),n}function o(){}function s(e,t){this._node=e,this._refresh=t,u(this)}function u(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);j(e,"length",n.length),r(n,e),e._inc=t}}function l(){}function p(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function c(e,t,n,r){if(r?t[p(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&A(i,e,r),g(i,e,n))}}function f(e,t,n){var r=p(t,n);if(!(r>=0))throw a(se,new Error(e.tagName+"@"+n));for(var i=t.length-1;i>r;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument; -o&&(A(o,e,n),n.ownerElement=null)}}function d(e){if(this._features={},e)for(var t in e)this._features=e[t]}function h(){}function m(e){return"<"==e&&"<"||">"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function y(e,t){if(t(e))return!0;if(e=e.firstChild)do if(y(e,t))return!0;while(e=e.nextSibling)}function v(){}function g(e,t,n){e&&e._inc++;var r=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function A(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;"http://www.w3.org/2000/xmlns/"==i&&delete t._nsMap[n.prefix?n.localName:""]}function E(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function T(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,E(e.ownerDocument,e),t}function S(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===ne){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return E(e.ownerDocument||e,e),t.nodeType==ne&&(t.firstChild=t.lastChild=null),t}function b(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,E(e.ownerDocument,e,t),t}function _(){this._nsMap={}}function N(){}function w(){}function R(){}function I(){}function M(){}function C(){}function L(){}function P(){}function O(){}function D(){}function x(){}function U(){}function k(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return B(this,n,e,t,o),n.join("")}function F(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function B(e,t,n,r,i){if(r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case H:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=q===e.namespaceURI||n,t.push("<",u);for(var l=0;o>l;l++){var p=a.item(l);"xmlns"==p.prefix?i.push({prefix:p.localName,namespace:p.value}):"xmlns"==p.nodeName&&i.push({prefix:"",namespace:p.value})}for(var l=0;o>l;l++){var p=a.item(l);if(F(p,n,i)){var c=p.prefix||"",f=p.namespaceURI,d=c?" xmlns:"+c:" xmlns";t.push(d,'="',f,'"'),i.push({prefix:c,namespace:f})}B(p,t,n,r,i)}if(F(e,n,i)){var c=e.prefix||"",f=e.namespaceURI,d=c?" xmlns:"+c:" xmlns";t.push(d,'="',f,'"'),i.push({prefix:c,namespace:f})}if(s||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):B(s,t,n,r,i),s=s.nextSibling;else for(;s;)B(s,t,n,r,i),s=s.nextSibling;t.push("")}else t.push("/>");return;case ee:case ne:for(var s=e.firstChild;s;)B(s,t,n,r,i),s=s.nextSibling;return;case $:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,m),'"');case G:return t.push(e.data.replace(/[<&]/g,m));case X:return t.push("");case Z:return t.push("");case te:var h=e.publicId,y=e.systemId;if(t.push("');else if(y&&"."!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case Q:return t.push("");case z:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function K(e,t,n){var r;switch(t.nodeType){case H:r=t.cloneNode(!1),r.ownerDocument=e;case ne:break;case $:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(K(e,i,n)),i=i.nextSibling;return r}function V(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new o),r.ownerDocument=e,r.nodeType){case H:var s=t.attributes,u=r.attributes=new l,p=s.length;u._ownerElement=r;for(var c=0;p>c;c++)r.setAttributeNode(V(e,s.item(c),!0));break;case $:n=!0}if(n)for(var f=t.firstChild;f;)r.appendChild(V(e,f,n)),f=f.nextSibling;return r}function j(e,t,n){e[t]=n}function W(e){switch(e.nodeType){case H:case ne:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(W(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}var q="http://www.w3.org/1999/xhtml",Y={},H=Y.ELEMENT_NODE=1,$=Y.ATTRIBUTE_NODE=2,G=Y.TEXT_NODE=3,X=Y.CDATA_SECTION_NODE=4,z=Y.ENTITY_REFERENCE_NODE=5,J=Y.ENTITY_NODE=6,Q=Y.PROCESSING_INSTRUCTION_NODE=7,Z=Y.COMMENT_NODE=8,ee=Y.DOCUMENT_NODE=9,te=Y.DOCUMENT_TYPE_NODE=10,ne=Y.DOCUMENT_FRAGMENT_NODE=11,re=Y.NOTATION_NODE=12,ie={},ae={},oe=(ie.INDEX_SIZE_ERR=(ae[1]="Index size error",1),ie.DOMSTRING_SIZE_ERR=(ae[2]="DOMString size error",2),ie.HIERARCHY_REQUEST_ERR=(ae[3]="Hierarchy request error",3)),se=(ie.WRONG_DOCUMENT_ERR=(ae[4]="Wrong document",4),ie.INVALID_CHARACTER_ERR=(ae[5]="Invalid character",5),ie.NO_DATA_ALLOWED_ERR=(ae[6]="No data allowed",6),ie.NO_MODIFICATION_ALLOWED_ERR=(ae[7]="No modification allowed",7),ie.NOT_FOUND_ERR=(ae[8]="Not found",8)),ue=(ie.NOT_SUPPORTED_ERR=(ae[9]="Not supported",9),ie.INUSE_ATTRIBUTE_ERR=(ae[10]="Attribute in use",10));ie.INVALID_STATE_ERR=(ae[11]="Invalid state",11),ie.SYNTAX_ERR=(ae[12]="Syntax error",12),ie.INVALID_MODIFICATION_ERR=(ae[13]="Invalid modification",13),ie.NAMESPACE_ERR=(ae[14]="Invalid namespace",14),ie.INVALID_ACCESS_ERR=(ae[15]="Invalid access",15);a.prototype=Error.prototype,r(ie,a),o.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==$?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==$?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},r(Y,h),r(Y,h.prototype),v.prototype={nodeName:"#document",nodeType:ee,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==ne){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==H&&(this.documentElement=e),S(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),T(this,e)},importNode:function(e,t){return K(this,e,t)},getElementById:function(e){var t=null;return y(this.documentElement,function(n){return n.nodeType==H&&n.getAttribute("id")==e?(t=n,!0):void 0}),t},createElement:function(e){var t=new _;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new o;var n=t.attributes=new l;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new D;return e.ownerDocument=this,e.childNodes=new o,e},createTextNode:function(e){var t=new R;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new I;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new M;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new x;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new N;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new O;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new _,r=t.split(":"),i=n.attributes=new l;return n.childNodes=new o,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new N,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},i(v,h),_.prototype={nodeType:H,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===ne?this.insertBefore(e,null):b(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new s(this,function(t){var n=[];return y(t,function(r){r===t||r.nodeType!=H||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new s(this,function(n){var r=[];return y(n,function(i){i===n||i.nodeType!==H||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)}),r})}},v.prototype.getElementsByTagName=_.prototype.getElementsByTagName,v.prototype.getElementsByTagNameNS=_.prototype.getElementsByTagNameNS,i(_,h),N.prototype.nodeType=$,i(N,h),w.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ae[oe])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},i(w,h),R.prototype={nodeName:"#text",nodeType:G,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},i(R,w),I.prototype={nodeName:"#comment",nodeType:Z},i(I,w),M.prototype={nodeName:"#cdata-section",nodeType:X},i(M,w),C.prototype.nodeType=te,i(C,h),L.prototype.nodeType=re,i(L,h),P.prototype.nodeType=J,i(P,h),O.prototype.nodeType=z,i(O,h),D.prototype.nodeName="#document-fragment",D.prototype.nodeType=ne,i(D,h),x.prototype.nodeType=Q,i(x,h),U.prototype.serializeToString=function(e,t,n){return k.call(e,t,n)},h.prototype.toString=k;try{Object.defineProperty&&(Object.defineProperty(s.prototype,"length",{get:function(){return u(this),this.$$length}}),Object.defineProperty(h.prototype,"textContent",{get:function(){return W(this)},set:function(e){switch(this.nodeType){case H:case ne:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),j=function(e,t,n){e["$$"+t]=n})}catch(le){}t.DOMImplementation=d,t.XMLSerializer=U},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function l(e){return e>=48&&57>=e?e-48:-1}function p(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?" ":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function c(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){return new j(t,new W(e.filename,e.input,e.position,e.line-1,e.position-e.lineStart))}function d(e,t,n){var r=A(e,t);if(r){var i=n+t;if(!e.errorMap[i]){var a=new W(e.filename,e.input,t,r.line-1,t-r.start),o=new j(n,a);e.errors.push(o)}}}function h(e,t){var n=f(e,t),r=n.message+n.mark.position;e.errorMap[r]||(e.errors.push(n),e.errorMap[r]=1);for(var i=e.position;;){if(e.position>=e.input.length-1)return;var a=e.input.charAt(e.position);if("\n"==a)return e.position--,void(e.position==i&&(e.position+=1));if("\r"==a)return e.position--,void(e.position==i&&(e.position+=1));e.position++}}function m(e,t){var n=f(e,t);e.onWarning&&e.onWarning.call(null,n)}function y(e,t,n,r){var i,a,o,s,u=e.result;if(-1==u.startPosition&&(u.startPosition=t),n>=t){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;a>i;i+=1)o=s.charCodeAt(i),9===o||o>=32&&1114111>=o||h(e,"expected valid JSON character");u.value+=s,u.endPosition=n}}function v(e,t,n,r,i){if(null!=r){null===t&&(t={startPosition:r.startPosition,endPosition:i.endPosition,parent:null,errors:[],mappings:[],kind:K.Kind.MAP});var a=K.newMapping(r,i);return a.parent=t,r.parent=a,null!=i&&(i.parent=a),!e.ignoreDuplicateKeys&&t.mappings.forEach(function(t){t.key&&t.key.value===(a.key&&a.key.value)&&(d(e,a.key.startPosition,"duplicate key"),d(e,t.key.startPosition,"duplicate key"))}),t.mappings.push(a),t.endPosition=i?i.endPosition:r.endPosition+1,t}}function g(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):h(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function A(e,t){for(var n,r=0;rt);r++)n=e.lines[r];return n?n:{start:0,line:0}}function E(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!r(o))break;for(g(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==a&&e.lineIndent1&&(t.value+=V.repeat("\n",n-1))}function b(e,t,n){var s,u,l,p,c,f,d,h,m,v=e.kind,g=e.result,A=K.newScalar();if(A.plainScalar=!0,e.result=A,m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u)))return!1;for(e.kind="scalar",l=p=e.position,c=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&T(e)||n&&o(m))break;if(r(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,E(e,!1,-1),e.lineIndent>=t){c=!0,m=e.input.charCodeAt(e.position);continue}e.position=p,e.line=f,e.lineStart=d,e.lineIndent=h;break}}if(c&&(y(e,l,p,!1),S(e,A,e.line-f),l=p=e.position,c=!1),i(m)||(p=e.position+1),m=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return y(e,l,p,!1),-1!=e.result.startPosition?(A.rawValue=e.input.substring(A.startPosition,A.endPosition),!0):(e.kind=v,e.result=g,!1)}function _(e,t){var n,i,a;if(n=e.input.charCodeAt(e.position),39!==n)return!1;var o=K.newScalar();for(o.singleQuoted=!0,e.kind="scalar",e.result=o,o.startPosition=e.position,e.position++,i=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(y(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,39!==n)return!0;i=a=e.position,e.position++}else r(n)?(y(e,i,a,!0),S(e,o,E(e,!1,t)),i=a=e.position):e.position===e.lineStart&&T(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position,o.endPosition=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function N(e,t){var n,i,a,o,l,p;if(p=e.input.charCodeAt(e.position),34!==p)return!1;e.kind="scalar";var f=K.newScalar();for(f.doubleQuoted=!0,e.result=f,f.startPosition=e.position,e.position++,n=i=e.position;0!==(p=e.input.charCodeAt(e.position));){if(34===p)return y(e,n,e.position,!0),e.position++,f.endPosition=e.position,f.rawValue=e.input.substring(f.startPosition,f.endPosition),!0;if(92===p){if(y(e,n,e.position,!0),p=e.input.charCodeAt(++e.position),r(p))E(e,!1,t);else if(256>p&&(e.allowAnyEscape?se[p]:ae[p]))f.value+=e.allowAnyEscape?ue[p]:oe[p],e.position++;else if((l=u(p))>0){for(a=l,o=0;a>0;a--)p=e.input.charCodeAt(++e.position),(l=s(p))>=0?o=(o<<4)+l:h(e,"expected hexadecimal character");f.value+=c(o),e.position++}else h(e,"unknown escape sequence");n=i=e.position}else r(p)?(y(e,n,i,!0),S(e,f,E(e,!1,t)),n=i=e.position):e.position===e.lineStart&&T(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function w(e,t){var n,r,i,o,s,u,l,p,c,f,d,m=!0,y=e.tag,g=e.anchor;if(d=e.input.charCodeAt(e.position),91===d)o=93,l=!1,r=K.newItems(),r.startPosition=e.position;else{if(123!==d)return!1;o=125,l=!0,r=K.newMap(),r.startPosition=e.position}for(null!==e.anchor&&(r.anchorId=e.anchor,e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(E(e,!0,t),d=e.input.charCodeAt(e.position),d===o)return e.position++,e.tag=y,e.anchor=g,e.kind=l?"mapping":"sequence",e.result=r,r.endPosition=e.position,!0;if(!m){var A=e.position;h(e,"missed comma between flow collection entries"),e.position=A+1}if(c=p=f=null,s=u=!1,63===d&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=u=!0,e.position++,E(e,!0,t))),n=e.line,O(e,t,$,!1,!0),c=e.tag,p=e.result,E(e,!0,t),d=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==d||(s=!0,d=e.input.charCodeAt(++e.position),E(e,!0,t),O(e,t,$,!1,!0),f=e.result),l)v(e,r,c,p,f);else if(s){var T=v(e,null,c,p,f);T.parent=r,r.items.push(T)}else p.parent=r,r.items.push(p);r.endPosition=e.position+1,E(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(m=!0,d=e.input.charCodeAt(++e.position)):m=!1}h(e,"unexpected end of the stream within a flow collection")}function R(e,t){var n,a,o,s,u=J,p=!1,c=t,f=0,d=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}var m=K.newScalar();for(e.kind="scalar",e.result=m,m.startPosition=e.position;0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)J===u?u=43===s?Z:Q:h(e,"repeat of a chomping mode identifier");else{if(!((o=l(s))>=0))break;0===o?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?h(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(g(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentc&&(c=e.lineIndent),r(s))f++;else{if(e.lineIndentt)&&0!==i)h(e,"bad indentation of a sequence entry");else if(e.lineIndent0;)if(l=e.input.charCodeAt(--e.position),r(l)){e.position++;break}}}else 63===l?(g&&(v(e,f,d,m,null),d=m=y=null),A=!0,g=!0,s=!0):g?(g=!1,s=!0):h(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,l=o;if((e.line===u||e.lineIndent>t)&&(O(e,t,z,!0,s)&&(g?m=e.result:y=e.result),g||(v(e,f,d,m,y),d=m=y=null),E(e,!0,-1),l=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==l)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentu;u+=1){p=e.implicitTypes[u];var T=e.result.value;if(p.resolve(T)){e.result.valueObject=p.construct(e.result.value),e.tag=p.tag,null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result);break}}else if(H.call(e.typeMap,e.tag))p=e.typeMap[e.tag],null!==e.result&&p.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag");else{var S=f(e,"unknown tag <"+e.tag+">"),O=S.message+S.mark.position;e.errorMap[O]||(e.errors.push(S),e.errorMap[O]=1),S&&(S.mark.position=g,S.mark.column=A,S.mark.toLineEnd=!0)}return null!==e.tag||null!==e.anchor||v}function D(e){var t,n,o,s,u=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(E(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&g(e),H.call(ce,n)?ce[n](e,n,o):(m(e,'unknown document directive "'+n+'"'),e.position++)}return E(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,E(e,!0,-1)):l&&h(e,"directives end mark is expected"),O(e,e.lineIndent-1,z,!1,!0),E(e,!0,-1),e.checkLineBreaks&&te.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&T(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,E(e,!0,-1))):void(e.positionr;r+=1)t(a[r])}function k(e,t){var n=x(e,t);if(0===n.length)return void 0;if(1===n.length){var r=n[0];return r.endPosition=e.length,r.startPosition>r.endPosition&&(r.startPosition=r.endPosition),r}var i=new j("expected a single document in the stream, but found more");return i.mark=new W("","",0,0,0),i.mark.position=n[0].endPosition,n[0].errors.push(i),n[0]}function F(e,t,n){U(e,t,V.extend({schema:q},n))}function B(e,t){return k(e,V.extend({schema:q},t))}for(var K=n(118),V=n(116),j=n(117),W=n(119),q=n(122),Y=n(121),H=Object.prototype.hasOwnProperty,$=1,G=2,X=3,z=4,J=1,Q=2,Z=3,ee=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/,te=/[\x85\u2028\u2029]/,ne=/[,\[\]\{\}]/,re=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,ae=new Array(256),oe=new Array(256),se=new Array(256),ue=new Array(256),le=0;256>le;le++)ue[le]=oe[le]=p(le),ae[le]=oe[le]?1:0,se[le]=1,ae[le]||(ue[le]="\\"+String.fromCharCode(le));var pe=function(){function e(e,t){this.errorMap={},this.errors=[],this.lines=[],this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.allowAnyEscape=t.allowAnyEscape||!1,this.ignoreDuplicateKeys=t.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}return e}(),ce={YAML:function(e,t,n){var r,i,a;null!==e.version&&h(e,"duplication of %YAML directive"),1!==n.length&&h(e,"YAML directive accepts exactly one argument"), -r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===r&&h(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&h(e,"found incompatible YAML document (version 1.2 is required)"),e.version=n[0],e.checkLineBreaks=2>a,2!==a&&h(e,"found incompatible YAML document (version 1.2 is required)")},TAG:function(e,t,n){var r,i;2!==n.length&&h(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],re.test(r)||h(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,r)&&h(e,'there is a previously declared suffix for "'+r+'" tag handle'),ie.test(i)||h(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};(function(){function e(){}return e})();t.loadAll=U,t.load=k,t.safeLoadAll=F,t.safeLoad=B,e.exports.loadAll=U,e.exports.load=k,e.exports.safeLoadAll=F,e.exports.safeLoad=B},function(e,t,n){"use strict";function r(e,t){var n,r,i,a,o,s,u;if(null===t)return{};for(n={},r=Object.keys(t),i=0,a=r.length;a>i;i+=1)o=r[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),u=e.compiledTypeMap[o],u&&C.call(u.styleAliases,s)&&(s=u.styleAliases[s]),n[o]=s;return n}function i(e){var t,n,r;if(t=e.toString(16).toUpperCase(),255>=e)n="x",r=2;else if(65535>=e)n="u",r=4;else{if(!(4294967295>=e))throw new w("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+N.repeat("0",r-t.length)+t}function a(e){this.schema=e.schema||R,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=N.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var n,r=N.repeat(" ",t),i=0,a=-1,o="",s=e.length;s>i;)a=e.indexOf("\n",i),-1===a?(n=e.slice(i),i=s):(n=e.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(o+=r),o+=n;return o}function s(e,t){return"\n"+N.repeat(" ",e.indent*t)}function u(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;r>n;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function l(e){this.source=e,this.result="",this.checkpoint=0}function p(e,t,n){var r,i,a,s,p,f,m,y,v,g,A,E,T,S,b,_,N,w,R,I,M;if(0===t.length)return void(e.dump="''");if(0==t.indexOf("!include"))return void(e.dump=""+t);if(0==t.indexOf("!$$$novalue"))return void(e.dump="");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(r=!0,i=t.length?t.charCodeAt(0):0,a=D===i||D===t.charCodeAt(t.length-1),(W===i||H===i||$===i||z===i)&&(r=!1),a?(r=!1,s=!1,p=!1):(s=!0,p=!0),f=!0,m=new l(t),y=!1,v=0,g=0,A=e.indent*n,E=80,40>A?E-=A:E=40,S=0;S0&&(N=t.charCodeAt(S-1),N===D&&(p=!1,s=!1)),s&&(w=S-v,v=S,w>g&&(g=w))),T!==U&&(f=!1),m.takeUpTo(S),m.escapeChar())}if(r&&u(e,t)&&(r=!1),R="",(s||p)&&(I=0,t.charCodeAt(t.length-1)===P&&(I+=1,t.charCodeAt(t.length-2)===P&&(I+=1)),0===I?R="-":2===I&&(R="+")),p&&E>g&&(s=!1),y||(p=!1),r)e.dump=t;else if(f)e.dump="'"+t+"'";else if(s)M=c(t,E),e.dump=">"+R+"\n"+o(M,A);else if(p)R||(t=t.replace(/\n$/,"")),e.dump="|"+R+"\n"+o(t,A);else{if(!m)throw new Error("Failed to dump scalar value");m.finish(),e.dump='"'+m.result+'"'}}function c(e,t){var n,r="",i=0,a=e.length,o=/\n+$/.exec(e);for(o&&(a=o.index+1);a>i;)n=e.indexOf("\n",i),n>a||-1===n?(r&&(r+="\n\n"),r+=f(e.slice(i,a),t),i=a):(r&&(r+="\n\n"),r+=f(e.slice(i,n),t),i=n+1);return o&&"\n"!==o[0]&&(r+=o[0]),r}function f(e,t){if(""===e)return e;for(var n,r,i,a=/[^\s] [^\s]/g,o="",s=0,u=0,l=a.exec(e);l;)n=l.index,n-u>t&&(r=s!==u?s:n,o&&(o+="\n"),i=e.slice(u,r),o+=i,u=r+1),s=n+1,l=a.exec(e);return o&&(o+="\n"),o+=u!==s&&e.length-u>t?e.slice(u,s)+"\n"+e.slice(s+1):e.slice(u)}function d(e){return L!==e&&P!==e&&O!==e&&j!==e&&G!==e&&X!==e&&J!==e&&Z!==e&&k!==e&&B!==e&&V!==e&&x!==e&&Q!==e&&Y!==e&&K!==e&&U!==e&&F!==e&&q!==e&&!ee[e]&&!h(e)}function h(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var r,i,a="",o=e.tag;for(r=0,i=n.length;i>r;r+=1)E(e,t,n[r],!1,!1)&&(0!==r&&(a+=", "),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function y(e,t,n,r){var i,a,o="",u=e.tag;for(i=0,a=n.length;a>i;i+=1)E(e,t+1,n[i],!0,!0)&&(r&&0===i||(o+=s(e,t)),o+="- "+e.dump);e.tag=u,e.dump=o||"[]"}function v(e,t,n){var r,i,a,o,s,u="",l=e.tag,p=Object.keys(n);for(r=0,i=p.length;i>r;r+=1)s="",0!==r&&(s+=", "),a=p[r],o=n[a],E(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",E(e,t,o,!1,!1)&&(s+=e.dump,u+=s));e.tag=l,e.dump="{"+u+"}"}function g(e,t,n,r){var i,a,o,u,l,p,c="",f=e.tag,d=Object.keys(n);for(i=0,a=d.length;a>i;i+=1)p="",r&&0===i||(p+=s(e,t)),o=d[i],u=n[o],E(e,t+1,o,!0,!0)&&(l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,l&&(p+=e.dump&&P===e.dump.charCodeAt(0)?"?":"? "),p+=e.dump,l&&(p+=s(e,t)),E(e,t+1,u,!0,l)&&(p+=e.dump&&P===e.dump.charCodeAt(0)?":":": ",p+=e.dump,c+=p));e.tag=f,e.dump=c||"{}"}function A(e,t,n){var r,i,a,o,s,u;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;o>a;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===M.call(s.represent))r=s.represent(t,u);else{if(!C.call(s.represent,u))throw new w("!<"+s.tag+'> tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i){e.tag=null,e.dump=n,A(e,n,!1)||A(e,n,!0);var a=M.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&"?"!==e.tag||2!==e.indent&&t>0)&&(i=!1);var o,s,u="[object Object]"===a||"[object Array]"===a;if(u&&(o=e.duplicates.indexOf(n),s=-1!==o),s&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&s&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(g(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(v(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(y(e,t,e.dump,i),s&&(e.dump="&ref_"+o+(0===t?"\n":"")+e.dump)):(m(e,t,e.dump),s&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new w("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&p(e,e.dump,t)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function T(e,t){var n,r,i=[],a=[];for(S(e,i,a),n=0,r=a.length;r>n;n+=1)t.duplicates.push(i[a[n]]);t.usedDuplicates=new Array(r)}function S(e,t,n){var r,i,a;M.call(e);if(null!==e&&"object"==typeof e)if(i=t.indexOf(e),-1!==i)-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;a>i;i+=1)S(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;a>i;i+=1)S(e[r[i]],t,n)}function b(e,t){t=t||{};var n=new a(t);return T(e,n),E(n,0,e,!0,!0)?n.dump+"\n":""}function _(e,t){return b(e,N.extend({schema:I},t))}var N=n(116),w=n(117),R=n(121),I=n(122),M=Object.prototype.toString,C=Object.prototype.hasOwnProperty,L=9,P=10,O=13,D=32,x=33,U=34,k=35,F=37,B=38,K=39,V=42,j=44,W=45,q=58,Y=62,H=63,$=64,G=91,X=93,z=96,J=123,Q=124,Z=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];l.prototype.takeUpTo=function(e){var t;if(e checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},l.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1,this},l.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.dump=b,t.safeDump=_},function(e,t,n){"use strict";function r(e,t){e=e.split("?");var n=e[0],r=(e[1]||"").split("#")[0],o=e[1]&&e[1].split("#").length>1?"#"+e[1].split("#")[1]:"",s=i(r);for(var u in t)s[u]=t[u];return r=a(s),""!==r&&(r="?"+r),n+r+o}var i=n(167).parse,a=n(167).stringify;e.exports=r},function(e,t,n){e.exports=[{classes:[{name:"GlobalSchema",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[{typeName:"Referencable",nameSpace:"",basicName:"Referencable",typeKind:0,typeArguments:[{typeName:"Sys.SchemaString",nameSpace:"Sys",basicName:"SchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"}],fields:[{name:"key",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the global schema, used to refer on schema content"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"Sys.SchemaString",nameSpace:"Sys",basicName:"SchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},annotations:[{name:"MetaModel.description",arguments:["Content of the schema"]},{name:"MetaModel.value",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.actuallyExports",arguments:["value"]},{name:"MetaModel.description",arguments:["Content of the schema"]}],"extends":[{typeName:"RAMLSimpleElement",nameSpace:"",basicName:"RAMLSimpleElement",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"}],moduleName:"RAMLSpec",annotationOverridings:{}},{name:"Api",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The title property is a short plain text description of the RESTful API. The value SHOULD be suitable for use as a title for the contained user documentation."]}],valueConstraint:null,optional:!1},{name:"version",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["If the RAML API definition is targeted to a specific API version, the API definition MUST contain a version property. The version property is OPTIONAL and should not be used if: The API itself is not versioned. The API definition does not change between versions. The API architect can decide whether a change to user documentation elements, but no change to the API's resources, constitutes a version change. The API architect MAY use any versioning scheme so long as version numbers retain the same format. For example, 'v3', 'v3.0', and 'V3' are all allowed, but are not considered to be equal."]}],valueConstraint:null,optional:!1},{name:"baseUri",type:{typeName:"Sys.FullUriTemplateString",nameSpace:"Sys",basicName:"FullUriTemplateString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},annotations:[{name:"MetaModel.description",arguments:["(Optional during development; Required after implementation) A RESTful API's resources are defined relative to the API's base URI. The use of the baseUri field is OPTIONAL to allow describing APIs that have not yet been implemented. After the API is implemented (even a mock implementation) and can be accessed at a service endpoint, the API definition MUST contain a baseUri property. The baseUri property's value MUST conform to the URI specification RFC2396 or a Level 1 Template URI as defined in RFC6570. The baseUri property SHOULD only be used as a reference value."]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.BURI"]},{name:"MetaModel.description",arguments:["Base uri parameters are named parameters which described template parameters in the base uri"]}],valueConstraint:null,optional:!1},{name:"uriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.BURI"]},{name:"MetaModel.description",arguments:["URI parameters can be further defined by using the uriParameters property. The use of uriParameters is OPTIONAL. The uriParameters property MUST be a map in which each key MUST be the name of the URI parameter as defined in the baseUri property. The uriParameters CANNOT contain a key named version because it is a reserved URI parameter name. The value of the uriParameters property is itself a map that specifies the property's attributes as named parameters"]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["A RESTful API can be reached HTTP, HTTPS, or both. The protocols property MAY be used to specify the protocols that an API supports. If the protocols property is not specified, the protocol specified at the baseUri property is used. The protocols property MUST be an array of strings, of values `HTTP` and/or `HTTPS`."]}],valueConstraint:null,optional:!1},{name:"mediaType",type:{typeName:"Bodies.MimeType",nameSpace:"Bodies",basicName:"MimeType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},annotations:[{name:"MetaModel.oftenKeys",arguments:[["application/json","application/xml","application/x-www-form-urlencoded","multipart/formdata"]]},{name:"MetaModel.description",arguments:["(Optional) The media types returned by API responses, and expected from API requests that accept a body, MAY be defaulted by specifying the mediaType property. This property is specified at the root level of the API definition. The property's value MAY be a single string with a valid media type described in the specification."]},{name:"MetaModel.inherited",arguments:[]}],valueConstraint:null,optional:!1},{name:"schemas",type:{base:{typeName:"GlobalSchema",nameSpace:"",basicName:"GlobalSchema",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["To better achieve consistency and simplicity, the API definition SHOULD include an OPTIONAL schemas property in the root section. The schemas property specifies collections of schemas that could be used anywhere in the API definition. The value of the schemas property is an array of maps; in each map, the keys are the schema name, and the values are schema definitions. The schema definitions MAY be included inline or by using the RAML !include user-defined data type."]}],valueConstraint:null,optional:!1},{name:"traits",type:{base:{typeName:"Methods.Trait",nameSpace:"Methods",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declarations of traits used in this API"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["A list of the security schemes to apply to all methods, these must be defined in the securitySchemes declaration."]}],valueConstraint:null,optional:!1},{name:"securitySchemes",type:{base:{typeName:"Security.AbstractSecurityScheme",nameSpace:"Security",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Security schemes that can be applied using securedBy"]}],valueConstraint:null,optional:!1},{name:"resourceTypes",type:{base:{typeName:"Resources.ResourceType",nameSpace:"Resources",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declaration of resource types used in this API"]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resources.Resource",nameSpace:"Resources",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:["Resources are identified by their relative URI, which MUST begin with a slash (/). A resource defined as a root-level property is called a top-level resource. Its property's key is the resource's URI relative to the baseUri. A resource defined as a child property of another resource is called a nested resource, and its property's key is its URI relative to its parent resource's URI. Every property whose key begins with a slash (/), and is either at the root of the API definition or is the child property of a resource property, is a resource property. The key of a resource, i.e. its relative URI, MAY consist of multiple URI path fragments separated by slashes; e.g. `/bom/items` may indicate the collection of items in a bill of materials as a single resource. However, if the individual URI path fragments are themselves resources, the API definition SHOULD use nested resources to describe this structure; e.g. if `/bom` is itself a resource then `/items` should be a nested resource of `/bom`, while `/bom/items` should not be used."]}],valueConstraint:null,optional:!1},{name:"documentation",type:{base:{typeName:"DocumentationItem",nameSpace:"",basicName:"DocumentationItem",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["The API definition can include a variety of documents that serve as a user guides and reference documentation for the API. Such documents can clarify how the API works or provide business context. Documentation-generators MUST include all the sections in an API definition's documentation property in the documentation output, and they MUST preserve the order in which the documentation is declared. To add user documentation to the API, include the documentation property at the root of the API definition. The documentation property MUST be an array of documents. Each document MUST contain title and content attributes, both of which are REQUIRED. If the documentation property is specified, it MUST include at least one document. Documentation-generators MUST process the content field as if it was defined using Markdown."]}],valueConstraint:null,optional:!1},{name:"RAMLVersion",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns AST node of security scheme, this reference refers to, or null."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[],moduleName:"RAMLSpec",annotationOverridings:{}},{name:"DocumentationItem",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["title of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1},{name:"content",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},annotations:[{name:"MetaModel.description",arguments:["Content of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"RAMLSimpleElement",nameSpace:"",basicName:"RAMLSimpleElement",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"}],moduleName:"RAMLSpec",annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts",Resources:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts"},{classes:[{name:"SpecPartMetaData",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!0,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts"},{classes:[{name:"ValueType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}},{name:"StringType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["string"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"AnyType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["any"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["number"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["boolean"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"Referencable",methods:[],typeParameters:["T"],typeParameterConstraint:[null],"implements":[],fields:[],isInterface:!0,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}},{name:"Reference",methods:[],typeParameters:["T"],typeParameterConstraint:[null],"implements":[],fields:[{name:"structuredValue",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns a structured object if the reference point to one."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns name of referenced object"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DeclaresDynamicType",methods:[],typeParameters:["T"],typeParameterConstraint:[null],"implements":[],fields:[],isInterface:!0,annotations:[],"extends":[{typeName:"Referencable",nameSpace:"",basicName:"Referencable",typeKind:0,typeArguments:[{typeName:"T",nameSpace:"",basicName:"T",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"UriTemplate",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type currently serves both for absolute and relative urls"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"RelativeUriString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes relative uri templates"]}],"extends":[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FullUriTemplateString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes absolute uri templates"]}],"extends":[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FixedUri",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes fixed uris"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"MarkdownString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.innerType",arguments:["markdown"]},{name:"MetaModel.description",arguments:["Mardown string is a string which can contain markdown as an extension this markdown should support links with RAML Pointers since 1.0"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"SchemaString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Schema at this moment only two subtypes are supported (json schema and xsd)"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"JSonSchemaString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.functionalDescriminator",arguments:["this.mediaType&&this.mediaType.isJSON()"]},{name:"MetaModel.description",arguments:["JSON schema"]}],"extends":[{typeName:"SchemaString",nameSpace:"",basicName:"SchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"XMLSchemaString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.innerType",arguments:["xml"]},{name:"MetaModel.description",arguments:["XSD schema"]}],"extends":[{typeName:"SchemaString",nameSpace:"",basicName:"SchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"ExampleString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"StatusCodeString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{} -},{name:"JSONExample",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.functionalDescriminator",arguments:["this.mediaType.isJSON()"]}],"extends":[{typeName:"ExampleString",nameSpace:"",basicName:"ExampleString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"XMLExample",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.functionalDescriminator",arguments:["this.mediaType.isXML()"]}],"extends":[{typeName:"ExampleString",nameSpace:"",basicName:"ExampleString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"TypeInstance",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"properties",type:{base:{typeName:"TypeInstanceProperty",nameSpace:"",basicName:"TypeInstanceProperty",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of instance properties"]}],valueConstraint:null,optional:!1},{name:"isScalar",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether the type is scalar"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["For instances of scalar types returns scalar value"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"TypeInstanceProperty",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Property name"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},annotations:[{name:"MetaModel.description",arguments:["Property value"]}],valueConstraint:null,optional:!1},{name:"values",type:{base:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of values if property value is array"]}],valueConstraint:null,optional:!1},{name:"isArray",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether property has array as value"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},{classes:[{name:"RAMLSimpleElement",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts"},{classes:[{name:"Parameter",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["name of the parameter"]},{name:"MetaModel.extraMetaKey",arguments:["headers"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the parameter"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.defaultValue",arguments:["string"]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["The type attribute specifies the primitive type of the parameter's resolved value. API clients MUST return/throw an error if the parameter's resolved value does not match the specified type. If type is not specified, it defaults to string."]},{name:"MetaModel.canBeDuplicator",arguments:[]}],valueConstraint:null,optional:!1},{name:"location",type:{typeName:"ParameterLocation",nameSpace:"",basicName:"ParameterLocation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"},annotations:[{name:"MetaModel.system",arguments:[]},{name:"MetaModel.description",arguments:["Location of the parameter (can not be edited by user)"]}],valueConstraint:null,optional:!1},{name:"required",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Set to true if parameter is required"]},{name:"MetaModel.defaultBooleanValue",arguments:[!0]}],valueConstraint:null,optional:!1},{name:"default",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The default attribute specifies the default value to use for the property if the property is omitted or its value is not specified. This SHOULD NOT be interpreted as a requirement for the client to send the default attribute's value if there is no other value to send. Instead, the default attribute's value is the value the server uses if the client does not send a value."]}],valueConstraint:null,optional:!1},{name:"example",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional) The example attribute shows an example value for the property. This can be used, e.g., by documentation generators to generate sample values for the property."]}],valueConstraint:null,optional:!1},{name:"repeat",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The repeat attribute specifies that the parameter can be repeated. If the parameter can be used multiple times, the repeat parameter value MUST be set to 'true'. Otherwise, the default value is 'false' and the parameter may not be repeated."]},{name:"MetaModel.defaultBooleanValue",arguments:[!1]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}},{name:"StringTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"string"},optional:!1},{name:"pattern",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The pattern attribute is a regular expression that a parameter of type string MUST match. Regular expressions MUST follow the regular expression specification from ECMA 262/Perl 5. The pattern MAY be enclosed in double quotes for readability and clarity."]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error."]}],valueConstraint:null,optional:!1},{name:"minLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The minLength attribute specifies the parameter value's minimum number of characters."]}],valueConstraint:null,optional:!1},{name:"maxLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The maxLength attribute specifies the parameter value's maximum number of characters."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a string"]}],"extends":[{typeName:"Parameter",nameSpace:"",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"boolean"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a boolean"]}],"extends":[{typeName:"Parameter",nameSpace:"",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"number"},optional:!1},{name:"minimum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The minimum attribute specifies the parameter's minimum value."]}],valueConstraint:null,optional:!1},{name:"maximum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The maximum attribute specifies the parameter's maximum value."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a number. Indicate floating point numbers as defined by YAML."]}],"extends":[{typeName:"Parameter",nameSpace:"",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}},{name:"IntegerTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"integer"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a integer."]}],"extends":[{typeName:"NumberTypeDeclaration",nameSpace:"",basicName:"NumberTypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"date"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a string representation of a date as defined in RFC2616 Section 3.3. "]}],"extends":[{typeName:"Parameter",nameSpace:"",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}},{name:"FileTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"file"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.requireValue",arguments:["location","ParameterLocation.FORM"]},{name:"MetaModel.description",arguments:["(Applicable only to Form properties) Value is a file. Client generators SHOULD use this type to handle file uploads correctly."]}],"extends":[{typeName:"Parameter",nameSpace:"",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[{name:"ParameterLocation",members:["QUERY","HEADERS","URI","FORM","BURI"]}],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts"},{classes:[{name:"MimeType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This sub type of the string represents mime types"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"}],moduleName:null,annotationOverridings:{}},{name:"BodyLike",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Mime type of the request or response body"]},{name:"MetaModel.canInherit",arguments:["mediaType"]},{name:"MetaModel.oftenKeys",arguments:[["application/json","application/xml","application/x-www-form-urlencoded","multipart/form-data"]]}],valueConstraint:null,optional:!1},{name:"schema",type:{typeName:"Sys.SchemaString",nameSpace:"Sys",basicName:"SchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.requireValue",arguments:["this.name.isForm()","false"]},{name:"MetaModel.description",arguments:["The structure of a request or response body MAY be further specified by the schema property under the appropriate media type. The schema key CANNOT be specified if a body's media type is application/x-www-form-urlencoded or multipart/form-data. All parsers of RAML MUST be able to interpret JSON Schema and XML Schema. Schema MAY be declared inline or in an external file. However, if the schema is sufficiently large so as to make it difficult for a person to read the API definition, or the schema is reused across multiple APIs or across multiple miles in the same API, the !include user-defined data type SHOULD be used instead of including the content inline. Alternatively, the value of the schema field MAY be the name of a schema specified in the root-level schemas property, or it MAY be declared in an external file and included by using the by using the RAML !include user-defined data type."]}],valueConstraint:null,optional:!1},{name:"example",type:{typeName:"Sys.ExampleString",nameSpace:"Sys",basicName:"ExampleString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["Documentation generators MUST use body properties' example attributes to generate example invocations."]}],valueConstraint:null,optional:!1},{name:"formParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.FORM"]},{name:"MetaModel.description",arguments:["Web forms REQUIRE special encoding and custom declaration. If the API's media type is either application/x-www-form-urlencoded or multipart/form-data, the formParameters property MUST specify the name-value pairs that the API is expecting. The formParameters property is a map in which the key is the name of the web form parameter, and the value is itself a map the specifies the web form parameter's attributes."]}],valueConstraint:null,optional:!1},{name:"schemaContent",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns schema content for the cases when schema is inlined, when schema is included, and when schema is a reference."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["Human readable description of the body"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.canInherit",arguments:["mediaType"]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"XMLBody",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"schema",type:{typeName:"Sys.XMLSchemaString",nameSpace:"Sys",basicName:"XMLSchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["XSD Schema"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.functionalDescriminator",arguments:["this.mime.isXML()"]},{name:"MetaModel.description",arguments:["Needed to set connection between xml related mime types and xsd schema"]}],"extends":[{typeName:"BodyLike",nameSpace:"",basicName:"BodyLike",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"}],moduleName:null,annotationOverridings:{}},{name:"JSONBody",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"schema",type:{typeName:"Sys.JSonSchemaString",nameSpace:"Sys",basicName:"JSonSchemaString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["JSON Schema"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.functionalDescriminator",arguments:["this.mime.isJSON()"]},{name:"MetaModel.description",arguments:["Needed to set connection between json related mime types and json schema"]}],"extends":[{typeName:"BodyLike",nameSpace:"",basicName:"BodyLike",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"}],moduleName:null,annotationOverridings:{}},{name:"Response",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"code",type:{typeName:"Sys.StatusCodeString",nameSpace:"Sys",basicName:"StatusCodeString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["statusCodes"]},{name:"MetaModel.description",arguments:["Responses MUST be a map of one or more HTTP status codes, where each status code itself is a map that describes that status code."]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.HEADERS"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]},{name:"MetaModel.description",arguments:["An API's methods may support custom header values in responses. The custom, non-standard HTTP headers MUST be specified by the headers property. API's may include the the placeholder token {?} in a header name to indicate that any number of headers that conform to the specified format can be sent in responses. This is particularly useful for APIs that allow HTTP headers that conform to some naming convention to send arbitrary, custom data."]}],valueConstraint:null,optional:!1},{name:"body",type:{base:{typeName:"BodyLike",nameSpace:"",basicName:"BodyLike",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["Each response MAY contain a body property, which conforms to the same structure as request body properties (see Body). Responses that can return more than one response code MAY therefore have multiple bodies defined. For APIs without a priori knowledge of the response types for their responses, `*/*` MAY be used to indicate that responses that do not matching other defined data types MUST be accepted. Processing applications MUST match the most descriptive media type first if `*/*` is used."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts"},{classes:[{name:"Resource",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"relativeUri",type:{typeName:"Sys.RelativeUriString",nameSpace:"Sys",basicName:"RelativeUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:["/"]},{name:"MetaModel.description",arguments:["Relative URL of this resource from the parent resource"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"ResourceTypeRef",nameSpace:"",basicName:"ResourceTypeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed resource type"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"TraitRef",nameSpace:"",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"SecuritySchemeRef",nameSpace:"",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme."]}],valueConstraint:null,optional:!1},{name:"uriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.URI"]},{name:"MetaModel.description",arguments:["Uri parameters of this resource"]}],valueConstraint:null,optional:!1},{name:"methods",type:{base:{typeName:"Methods.Method",nameSpace:"Methods",basicName:"Method",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Method"]},{name:"MetaModel.description",arguments:["Methods that can be called on this resource"]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resource",nameSpace:"",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:["Children resources"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the resource"]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.BURI"]},{name:"MetaModel.description",arguments:["A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}},{name:"ResourceTypeRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"resourceType",type:{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced resource type"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"ResourceType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[{typeName:"DeclaresDynamicType",nameSpace:"",basicName:"DeclaresDynamicType",typeKind:0,typeArguments:[{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"}],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key", -arguments:[]},{name:"MetaModel.description",arguments:["Name of the resource type"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the resource type should be used."]}],valueConstraint:null,optional:!1},{name:"methods",type:{base:{typeName:"Methods.Method",nameSpace:"Methods",basicName:"Method",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Methods that are part of this resource type definition"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"Security.TraitRef",nameSpace:"Security",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"ResourceTypeRef",nameSpace:"",basicName:"ResourceTypeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed resource type"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme."]}],valueConstraint:null,optional:!1},{name:"uriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.URI"]},{name:"MetaModel.description",arguments:["Uri parameters of this resource"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the resource type"]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.BURI"]},{name:"MetaModel.description",arguments:["A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"Sys.TypeInstance",nameSpace:"Sys",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the resource type"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts"},{classes:[{name:"MethodBase",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"responses",type:{base:{typeName:"Bodies.Response",nameSpace:"Bodies",basicName:"Response",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Response"]},{name:"MetaModel.description",arguments:["Resource methods MAY have one or more responses. Responses MAY be described using the description property, and MAY include example attributes or schema properties."]}],valueConstraint:null,optional:!1},{name:"body",type:{base:{typeName:"Bodies.BodyLike",nameSpace:"Bodies",basicName:"BodyLike",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["Some method verbs expect the resource to be sent as a request body. For example, to create a resource, the request must include the details of the resource to create. Resources CAN have alternate representations. For example, an API might support both JSON and XML representations. A method's body is defined in the body property as a hashmap, in which the key MUST be a valid media type."]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["A method can override an API's protocols value for that single method by setting a different value for the fields."]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"SecuritySchemeRef",nameSpace:"",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["A list of the security schemas to apply, these must be defined in the securitySchemes declaration. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme. Security schemas may also be applied to a resource with securedBy, which is equivalent to applying the security schemas to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource."]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","Params.ParameterLocation.BURI"]},{name:"MetaModel.description",arguments:["A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level."]}],valueConstraint:null,optional:!1},{name:"queryParameters",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","ParameterLocation.QUERY"]},{name:"MetaModel.newInstanceName",arguments:["New query parameter"]},{name:"MetaModel.description",arguments:["An APIs resources MAY be filtered (to return a subset of results) or altered (such as transforming a response body from JSON to XML format) by the use of query strings. If the resource or its method supports a query string, the query string MUST be defined by the queryParameters property"]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"Params.Parameter",nameSpace:"Params",basicName:"Parameter",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","ParameterLocation.HEADERS"]},{name:"MetaModel.description",arguments:["Headers that allowed at this position"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Method object allows description of http methods"]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"Method",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"method",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["methods"]},{name:"MetaModel.oneOf",arguments:[["get","put","post","delete","patch","options","head","trace","connect"]]},{name:"MetaModel.description",arguments:["Method that can be called"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"TraitRef",nameSpace:"",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"Trait",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[{typeName:"DeclaresDynamicType",nameSpace:"",basicName:"DeclaresDynamicType",typeKind:0,typeArguments:[{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the trait"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the trait should be used."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"Sys.TypeInstance",nameSpace:"Sys",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the trait"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]}],"extends":[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"TraitRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"trait",type:{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},{classes:[{name:"SecuritySchemePart",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the security scheme part"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"TraitRef",nameSpace:"",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{headers:[{name:"MetaModel.markdownDescription",arguments:["Optional array of headers, documenting the possible headers that could be accepted."]},{name:"MetaModel.valueDescription",arguments:["Object whose property names are the request header names and whose values describe the values."]}],queryParameters:[{name:"MetaModel.markdownDescription",arguments:["Query parameters, used by the schema in order to authorize the request. Mutually exclusive with queryString."]},{name:"MetaModel.valueDescription",arguments:["Object whose property names are the query parameter names and whose values describe the values."]}],queryString:[{name:"MetaModel.description",arguments:["Specifies the query string, used by the schema in order to authorize the request. Mutually exclusive with queryParameters."]},{name:"MetaModel.valueDescription",arguments:["Type name or type declaration"]}],responses:[{name:"MetaModel.description",arguments:["Optional array of responses, describing the possible responses that could be sent."]}],description:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the security scheme part"]},{name:"MetaModel.valueDescription",arguments:["Markdown string"]}]}},{name:"SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"AbstractSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[{typeName:"Referencable",nameSpace:"",basicName:"Referencable",typeKind:0,typeArguments:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:[""]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["Name of the security scheme"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.oneOf",arguments:[["OAuth 1.0","OAuth 2.0","Basic Authentication","DigestSecurityScheme Authentication","x-{other}"]]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["The securitySchemes property MUST be used to specify an API's security mechanisms, including the required settings and the authentication methods that the API supports. one authentication method is allowed if the API supports them."]},{name:"MetaModel.valueDescription",arguments:["string

    The value MUST be one of
    * OAuth 1.0,
    * OAuth 2.0,
    * BasicSecurityScheme Authentication
    * DigestSecurityScheme Authentication
    * x-<other>"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute MAY be used to describe a security schemes property."]}],valueConstraint:null,optional:!1},{name:"describedBy",type:{typeName:"SecuritySchemePart",nameSpace:"",basicName:"SecuritySchemePart",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation."]}],valueConstraint:null,optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"SecuritySchemeRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"securitySchemeName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns the name of security scheme, this reference refers to."]}],valueConstraint:null,optional:!1},{name:"securityScheme",type:{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns AST node of security scheme, this reference refers to, or null."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"requestTokenUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"tokenCredentialsUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Request endpoint as defined in RFC5849 Section 2.3"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]},{name:"MetaModel.functionalDescriminator",arguments:["$parent.type=='OAuth 1.0'"]}],"extends":[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"accessTokenUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUri",nameSpace:"Sys",basicName:"FixedUri",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationGrants",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or refresh_token."]},{name:"MetaModel.markdownDescription",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:
    * authorization_code
    * password
    * client_credentials
    * implicit
    * refresh_token."]}],valueConstraint:null,optional:!1},{name:"scopes",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],"extends":[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 2.0"},optional:!1},{name:"settings",type:{typeName:"OAuth2SecuritySchemeSettings",nameSpace:"",basicName:"OAuth2SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 1.0"},optional:!1},{name:"settings",type:{typeName:"OAuth1SecuritySchemeSettings",nameSpace:"",basicName:"OAuth1SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"BasicSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Basic Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"DigestSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Digest Authentication" -},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"CustomSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"x-{other}"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security schema definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts"}]},function(e,t,n){e.exports=[{classes:[{name:"Library",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why library exist"]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Namespace which the library is imported under"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"LibraryBase",nameSpace:"",basicName:"LibraryBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"LibraryBase",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"schemas",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:['Alias for the equivalent "types" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the "types" property, as the "schemas" alias for that property name may be removed in a future RAML version. The "types" property allows for XML and JSON schemas.']}],valueConstraint:null,optional:!1},{name:"types",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.MODELS"]},{name:"MetaModel.description",arguments:["Declarations of (data) types for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of (data) types for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map type names to type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"traits",type:{base:{typeName:"Methods.Trait",nameSpace:"Methods",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declarations of traits used in this API"]},{name:"MetaModel.description",arguments:["Declarations of traits for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of traits for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map trait names to trait declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"resourceTypes",type:{base:{typeName:"Resources.ResourceType",nameSpace:"Resources",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declaration of resource types used in this API"]},{name:"MetaModel.description",arguments:["Declarations of resource types for use within this API"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of resource types for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map resource type names to resource type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"annotationTypes",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["decls","true"]},{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Declarations of annotation types for use by annotations"]},{name:"MetaModel.markdownDescription",arguments:["Declarations of annotation types for use by annotations."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map annotation type names to annotation type declarations; or an array of such objects"]}],valueConstraint:null,optional:!1},{name:"securitySchemes",type:{base:{typeName:"Security.AbstractSecurityScheme",nameSpace:"Security",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]},{name:"MetaModel.description",arguments:["Security schemas declarations"]},{name:"MetaModel.description",arguments:["Declarations of security schemes for use within this API."]},{name:"MetaModel.markdownDescription",arguments:["Declarations of security schemes for use within this API."]},{name:"MetaModel.valueDescription",arguments:["An object whose properties map security scheme names to security scheme declarations; or an array of such objects"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.internalClass",arguments:[]}],"extends":[{typeName:"FragmentDeclaration",nameSpace:"",basicName:"FragmentDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"Api",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the API"]}],valueConstraint:null,optional:!1},{name:"version",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The version of the API, e.g. 'v1'"]}],valueConstraint:null,optional:!1},{name:"baseUri",type:{typeName:"Sys.FullUriTemplateString",nameSpace:"Sys",basicName:"FullUriTemplateString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["A URI that's to be used as the base of all the resources' URIs. Often used as the base of the URL of each resource, containing the location of the API. Can be a template URI."]}],valueConstraint:null,optional:!1},{name:"baseUriParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.BURI"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.description",arguments:["Named parameters used in the baseUri (template)"]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["The protocols supported by the API"]},{name:"MetaModel.valueDescription",arguments:['Array of strings, with each being "HTTP" or "HTTPS", case-insensitive']}],valueConstraint:null,optional:!1},{name:"mediaType",type:{base:{typeName:"Bodies.MimeType",nameSpace:"Bodies",basicName:"MimeType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.oftenKeys",arguments:[["application/json","application/xml","application/x-www-form-urlencoded","multipart/form-data"]]},{name:"MetaModel.description",arguments:['The default media type to use for request and response bodies (payloads), e.g. "application/json"']},{name:"MetaModel.inherited",arguments:[]},{name:"MetaModel.valueDescription",arguments:["Media type string"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["The security schemes that apply to every resource and method in the API"]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resources.Resource",nameSpace:"Resources",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.documentationTableLabel",arguments:["/<relativeUri>"]},{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:["The resources of the API, identified as relative URIs that begin with a slash (/). Every property whose key begins with a slash (/), and is either at the root of the API definition or is the child property of a resource property, is a resource property, e.g.: /users, /{groupId}, etc"]}],valueConstraint:null,optional:!1},{name:"documentation",type:{base:{typeName:"DocumentationItem",nameSpace:"",basicName:"DocumentationItem",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Additional overall documentation for the API"]}],valueConstraint:null,optional:!1},{name:"RAMLVersion",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:['Returns RAML version. "RAML10" string is returned for RAML 1.0. "RAML08" string is returned for RAML 0.8.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"LibraryBase",nameSpace:"",basicName:"LibraryBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this API. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"Overlay",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why overlay exist"]}],valueConstraint:null,optional:!1},{name:"extends",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Location of a valid RAML API definition (or overlay or extension), the overlay is applied to."]}],valueConstraint:null,optional:!1},{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Api",nameSpace:"",basicName:"Api",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"Extension",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["contains description of why extension exist"]}],valueConstraint:null,optional:!1},{name:"extends",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["Location of a valid RAML API definition (or overlay or extension), the extension is applied to"]}],valueConstraint:null,optional:!1},{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Short plain-text label for the API"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Api",nameSpace:"",basicName:"Api",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"UsesDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"key",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name prefix (without dot) used to refer imported declarations"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Content of the schema"]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.value",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"FragmentDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"uses",type:{base:{typeName:"UsesDeclaration",nameSpace:"",basicName:"UsesDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},typeKind:1},annotations:[{name:"MetaModel.embeddedInMaps",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}},{name:"DocumentationItem",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"title",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Title of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1},{name:"content",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},annotations:[{name:"MetaModel.description",arguments:["Content of documentation section"]},{name:"MetaModel.required",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts",Resources:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts",Decls:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts",Params:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts"},{classes:[{name:"SpecPartMetaData",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!0,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts"},{classes:[{name:"ValueType",methods:[{returnType:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},name:"value",start:170,end:210,text:"\n\n value():string {\n return null\n }",arguments:[]}],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"StringType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["string"]},{name:"MetaModel.alias",arguments:["string"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"AnyType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["any"]},{name:"MetaModel.alias",arguments:["any"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["number"]},{name:"MetaModel.alias",arguments:["number"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"IntegerType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["integer"]},{name:"MetaModel.alias",arguments:["integer"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"NullType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["null"]},{name:"MetaModel.alias",arguments:["null"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"TimeOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["time-only"]},{name:"MetaModel.alias",arguments:["time-only"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["date-only"]},{name:"MetaModel.alias",arguments:["date-only"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeOnlyType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["datetime-only"]},{name:"MetaModel.alias",arguments:["datetime-only"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["datetime"]},{name:"MetaModel.alias",arguments:["datetime"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FileType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["file"]},{name:"MetaModel.alias",arguments:["file"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.nameAtRuntime",arguments:["boolean"]},{name:"MetaModel.alias",arguments:["boolean"]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"Reference",methods:[],typeParameters:["T"],typeParameterConstraint:[null],"implements":[],fields:[{name:"structuredValue",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns a structured object if the reference point to one."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns name of referenced object"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"UriTemplate",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type currently serves both for absolute and relative urls"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"StatusCodeString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"RelativeUriString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes relative uri templates"]}],"extends":[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FullUriTemplateString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes absolute uri templates"]}],"extends":[{typeName:"UriTemplate",nameSpace:"",basicName:"UriTemplate",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"FixedUriString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This type describes fixed uris"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"ContentType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"MarkdownString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.innerType",arguments:["markdown"]},{name:"MetaModel.description",arguments:["[GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/)"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}},{name:"SchemaString",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Schema at this moment only two subtypes are supported (json schema and xsd)"]},{name:"MetaModel.alias",arguments:["schema"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts" -},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts"},{classes:[{name:"ExampleSpec",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"value",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["String representation of example"]},{name:"MetaModel.required",arguments:[]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
    * String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"structuredValue",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of example, if possible"]}],valueConstraint:null,optional:!1},{name:"strict",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["By default, examples are validated against any type declaration. Set this to false to allow examples that need not validate."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["Example identifier, if specified"]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the example"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the example"]},{name:"MetaModel.valueDescription",arguments:["markdown string"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this example. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"TypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["name of the parameter"]},{name:"MetaModel.extraMetaKey",arguments:["headers"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the type display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"facets",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.declaringFields",arguments:[]},{name:"MetaModel.description",arguments:["When extending from a type you can define new facets (which can then be set to concrete values by subtypes)."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"fixedFacets",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns facets fixed by the type. Value is an object with properties named after facets fixed. Value of each property is a value of the corresponding facet."]}],valueConstraint:null,optional:!1},{name:"schema",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.description",arguments:['Alias for the equivalent "type" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the "type" property, as the "schema" alias for that property name may be removed in a future RAML version. The "type" property allows for XML and JSON schemas.']},{name:"MetaModel.valueDescription",arguments:["Single string denoting the base type or type expression"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.defaultValue",arguments:["string"]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["A base type which the current type extends, or more generally a type expression."]},{name:"MetaModel.valueDescription",arguments:["string denoting the base type or type expression"]}],valueConstraint:null,optional:!1},{name:"structuredType",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.description",arguments:["Inlined supertype definition."]},{name:"MetaModel.valueDescription",arguments:["Inlined supertype definition"]}],valueConstraint:null,optional:!1},{name:"location",type:{typeName:"ModelLocation",nameSpace:"",basicName:"ModelLocation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.system",arguments:[]},{name:"MetaModel.description",arguments:["Location of the parameter (can not be edited by user)"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"locationKind",type:{typeName:"LocationKind",nameSpace:"",basicName:"LocationKind",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.system",arguments:[]},{name:"MetaModel.description",arguments:["Kind of location"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"default",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Provides default value for a property"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"example",type:{typeName:"ExampleSpec",nameSpace:"",basicName:"ExampleSpec",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["An example of this type instance represented as string or yaml map/sequence. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the examples property is present."]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
    * String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"examples",type:{base:{typeName:"ExampleSpec",nameSpace:"",basicName:"ExampleSpec",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.example",arguments:[]},{name:"MetaModel.selfNode",arguments:[]},{name:"MetaModel.description",arguments:["An example of this type instance represented as string. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the example property is present."]},{name:"MetaModel.valueDescription",arguments:["* Valid value for this type
    * String representing the serialized version of a valid value"]}],valueConstraint:null,optional:!1},{name:"required",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.requireValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["Sets if property is optional or not"]},{name:"MetaModel.describesAnnotation",arguments:["required"]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.defaultBooleanValue",arguments:[!0]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the type"]},{name:"MetaModel.valueDescription",arguments:["markdown string"]}],valueConstraint:null,optional:!1},{name:"xml",type:{typeName:"XMLFacetInfo",nameSpace:"",basicName:"XMLFacetInfo",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"allowedTargets",type:{base:{typeName:"AnnotationTarget",nameSpace:"",basicName:"AnnotationTarget",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["API","DocumentationItem","Resource","Method","Response","RequestBody","ResponseBody","TypeDeclaration","NamedExample","ResourceType","Trait","SecurityScheme","SecuritySchemeSettings","AnnotationTypeDeclaration","Library","Overlay","Extension","Scalar"]]},{name:"MetaModel.description",arguments:["Restrictions on where annotations of this type can be applied. If this property is specified, annotations of this type may only be applied on a property corresponding to one of the target names specified as the value of this property."]},{name:"MetaModel.valueDescription",arguments:["An array, or single, of names allowed target nodes."]}],valueConstraint:null,optional:!1},{name:"isAnnotation",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether the type represents annotation"]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["For types defined in traits or resource types returns object representation of parametrized properties"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.canInherit",arguments:["mediaType"]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this type. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"XMLFacetInfo",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"attribute",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["If attribute is set to true, a type instance should be serialized as an XML attribute. It can only be true for scalar types."]}],valueConstraint:null,optional:!1},{name:"wrapped",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["If wrapped is set to true, a type instance should be wrapped in its own XML element. It can not be true for scalar types and it can not be true at the same moment when attribute is true."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to override the name of the XML element or XML attribute in it's XML representation."]}],valueConstraint:null,optional:!1},{name:"namespace",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to configure the name of the XML namespace."]}],valueConstraint:null,optional:!1},{name:"prefix",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Allows to configure the prefix which will be used during serialization to XML."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"ArrayTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"array"},optional:!1},{name:"uniqueItems",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["uniqueItems"]},{name:"MetaModel.description",arguments:["Should items in array be unique"]}],valueConstraint:null,optional:!1},{name:"items",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.allowMultiple",arguments:[]},{name:"MetaModel.canBeValue",arguments:[]},{name:"MetaModel.description",arguments:["Array component type."]},{name:"MetaModel.valueDescription",arguments:["Inline type declaration or type name."]}],valueConstraint:null,optional:!1},{name:"structuredItems",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.typeExpression",arguments:[]},{name:"MetaModel.description",arguments:["Inlined component type definition"]},{name:"MetaModel.valueDescription",arguments:["Inlined component type definition"]}],valueConstraint:null,optional:!1},{name:"minItems",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minItems"]},{name:"MetaModel.description",arguments:["Minimum amount of items in array"]},{name:"MetaModel.valueDescription",arguments:["integer ( >= 0 ). Defaults to 0"]}],valueConstraint:null,optional:!1},{name:"maxItems",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxItems"]},{name:"MetaModel.description",arguments:["Maximum amount of items in array"]},{name:"MetaModel.valueDescription",arguments:["integer ( >= 0 ). Defaults to undefined."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.alias",arguments:["array"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"UnionTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"union"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.requireValue",arguments:["locationKind","LocationKind.MODELS"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"ObjectTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[{name:"MetaModel.hide",arguments:[]}],valueConstraint:{isCallConstraint:!1,value:"object"},optional:!1},{name:"properties",type:{base:{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["The properties that instances of this type may or must have."]},{name:"MetaModel.valueDescription",arguments:["An object whose keys are the properties' names and whose values are property declarations."]}],valueConstraint:null,optional:!1},{name:"minProperties",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minProperties"]},{name:"MetaModel.description",arguments:["The minimum number of properties allowed for instances of this type."]}],valueConstraint:null,optional:!1},{name:"maxProperties",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxProperties"]},{name:"MetaModel.description",arguments:["The maximum number of properties allowed for instances of this type."]}],valueConstraint:null,optional:!1},{name:"additionalProperties",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["A Boolean that indicates if an object instance has additional properties."]}],valueConstraint:null,optional:!1},{name:"discriminator",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Type property name to be used as discriminator, or boolean"]}],valueConstraint:null,optional:!1},{name:"discriminatorValue",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The value of discriminator for the type."]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.definingPropertyIsEnough",arguments:["properties"]},{name:"MetaModel.setsContextValue",arguments:["field","true"]},{name:"MetaModel.convertsToGlobalOfType",arguments:["SchemaString"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"StringTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"string"},optional:!1},{name:"pattern",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["pattern"]},{name:"MetaModel.description",arguments:["Regular expression that this string should path"]},{name:"MetaModel.valueDescription",arguments:["regexp"]}],valueConstraint:null,optional:!1},{name:"minLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minLength"]},{name:"MetaModel.description",arguments:["Minimum length of the string"]}],valueConstraint:null,optional:!1},{name:"maxLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maxLength"]},{name:"MetaModel.description",arguments:["Maximum length of the string"]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.facetId",arguments:["enum"]},{name:"MetaModel.describesAnnotation",arguments:["oneOf"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a string"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"BooleanTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"boolean"},optional:!1},{name:"enum",type:{base:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value must be a boolean"]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"NumberTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"number"},optional:!1},{name:"minimum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["minimum"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The minimum attribute specifies the parameter's minimum value."]}],valueConstraint:null,optional:!1},{name:"maximum",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.facetId",arguments:["maximum"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type number or integer) The maximum attribute specifies the parameter's maximum value."]}],valueConstraint:null,optional:!1},{name:"enum",type:{base:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.facetId",arguments:["enum"]},{name:"MetaModel.describesAnnotation",arguments:["oneOf"]},{name:"MetaModel.description",arguments:["(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["int32","int64","int","long","float","double","int16","int8"]]},{name:"MetaModel.description",arguments:["Value format"]}],valueConstraint:null,optional:!1},{name:"multipleOf",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:['A numeric instance is valid against "multipleOf" if the result of the division of the instance by this keyword\'s value is an integer.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a number. Indicate floating point numbers as defined by YAML."]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"IntegerTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"integer"},optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["int32","int64","int","long","int16","int8"]]},{name:"MetaModel.description",arguments:["Value format"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Value MUST be a integer."]},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"NumberTypeDeclaration",nameSpace:"",basicName:"NumberTypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"date-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['the "full-date" notation of RFC3339, namely yyyy-mm-dd (no implications about time or timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"TimeOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"time-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['the "partial-time" notation of RFC3339, namely hh:mm:ss[.ff...] (no implications about date or timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeOnlyTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"datetime-only"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['combined date-only and time-only with a separator of "T", namely yyyy-mm-ddThh:mm:ss[.ff...] (no implications about timezone-offset)']},{name:"MetaModel.declaresSubTypeOf",arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"DateTimeTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"datetime"},optional:!1},{name:"format",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.oneOf",arguments:[["rfc3339","rfc2616"]]},{name:"MetaModel.description",arguments:["Format used for this date time rfc3339 or rfc2616"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:['a timestamp, either in the "date-time" notation of RFC3339, if format is omitted or is set to rfc3339, or in the format defined in RFC2616, if format is set to rfc2616.']},{name:"MetaModel.declaresSubTypeOf", -arguments:["TypeDeclaration"]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"}],moduleName:null,annotationOverridings:{}},{name:"TypeInstance",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"properties",type:{base:{typeName:"TypeInstanceProperty",nameSpace:"",basicName:"TypeInstanceProperty",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of instance properties"]}],valueConstraint:null,optional:!1},{name:"isScalar",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether the type is scalar"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"any",nameSpace:"",basicName:"any",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["For instances of scalar types returns scalar value"]}],valueConstraint:null,optional:!1},{name:"isArray",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Indicates whether the instance is array"]}],valueConstraint:null,optional:!1},{name:"items",type:{base:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Returns components of array instances"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}},{name:"TypeInstanceProperty",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Property name"]}],valueConstraint:null,optional:!1},{name:"value",type:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},annotations:[{name:"MetaModel.description",arguments:["Property value"]}],valueConstraint:null,optional:!1},{name:"values",type:{base:{typeName:"TypeInstance",nameSpace:"",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Array of values if property value is array"]}],valueConstraint:null,optional:!1},{name:"isArray",type:{typeName:"boolean",nameSpace:"",basicName:"boolean",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Whether property has array as value"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.customHandling",arguments:[]}],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[{name:"ModelLocation",members:["QUERY","HEADERS","URI","FORM","BURI","ANNOTATION","MODEL","SECURITYSCHEMATYPE"]},{name:"LocationKind",members:["APISTRUCTURE","DECLARATIONS","MODELS"]}],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts",Declarations:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},{classes:[{name:"MimeType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["This sub type of the string represents mime types"]}],"extends":[{typeName:"StringType",nameSpace:"",basicName:"StringType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"}],moduleName:null,annotationOverridings:{}},{name:"Response",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"code",type:{typeName:"Sys.StatusCodeString",nameSpace:"Sys",basicName:"StatusCodeString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["statusCodes"]},{name:"MetaModel.description",arguments:["Responses MUST be a map of one or more HTTP status codes, where each status code itself is a map that describes that status code."]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.HEADERS"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]},{name:"MetaModel.description",arguments:["Detailed information about any response headers returned by this method"]},{name:"MetaModel.valueDescription",arguments:["Object whose property names are the response header names and whose values describe the values."]}],valueConstraint:null,optional:!1},{name:"body",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["The body of the response: a body declaration"]},{name:"MetaModel.valueDescription",arguments:["Object whose properties are either
    * Media types and whose values are type objects describing the request body for that media type, or
    * a type object describing the request body for the default media type specified in the root mediaType property."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},annotations:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the response"]},{name:"MetaModel.valueDescription",arguments:["Markdown string"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"}],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["An alternate, human-friendly name for the response"]}],annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this response. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts"},{classes:[{name:"Annotable",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"annotations",type:{base:{typeName:"Decls.AnnotationRef",nameSpace:"Decls",basicName:"AnnotationRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},typeKind:1},annotations:[{name:"MetaModel.noDirectParse",arguments:[]},{name:"MetaModel.setsContextValue",arguments:["locationKind","datamodel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.setsContextValue",arguments:["location","datamodel.ModelLocation.ANNOTATION"]},{name:"MetaModel.description",arguments:["Most of RAML model elements may have attached annotations decribing additional meta data about this element"]},{name:"MetaModel.documentationTableLabel",arguments:["(<annotationName>)"]},{name:"MetaModel.valueDescription",arguments:["A value corresponding to the declared type of this annotation."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Decls:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},{classes:[{name:"AnnotationRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"annotation",type:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced annotation"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Annotations allow you to attach information to your API"]},{name:"MetaModel.tags",arguments:[["annotations"]]}],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],moduleName:null,annotationOverridings:{}},{name:"AnnotationTarget",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Elements to which this Annotation can be applied (enum)"]},{name:"MetaModel.tags",arguments:[["annotations"]]}],"extends":[{typeName:"ValueType",nameSpace:"",basicName:"ValueType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Common:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts"},{classes:[{name:"TraitRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"trait",type:{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"Trait",nameSpace:"",basicName:"Trait",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"Trait",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the trait"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the trait should be used."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the trait"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],"extends":[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the trait display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}]}},{name:"MethodBase",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"body",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Body"]},{name:"MetaModel.description",arguments:["Some method verbs expect the resource to be sent as a request body. For example, to create a resource, the request must include the details of the resource to create. Resources CAN have alternate representations. For example, an API might support both JSON and XML representations. A method's body is defined in the body property as a hashmap, in which the key MUST be a valid media type."]}],valueConstraint:null,optional:!1},{name:"protocols",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HTTP","HTTPS"]]},{name:"MetaModel.description",arguments:["A method can override the protocols specified in the resource or at the API root, by employing this property."]},{name:"MetaModel.valueDescription",arguments:["array of strings of value HTTP or HTTPS, or a single string of such kind, case-insensitive"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"TraitRef",nameSpace:"",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Instantiation of applyed traits"]}],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme."]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Operation",nameSpace:"",basicName:"Operation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}},{name:"Method",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"method",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.extraMetaKey",arguments:["methods"]},{name:"MetaModel.oneOf",arguments:[["get","put","post","delete","options","head","patch"]]},{name:"MetaModel.description",arguments:["Method that can be called"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["For types defined in resource types returns object representation of parametrized properties"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"MethodBase",nameSpace:"",basicName:"MethodBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{displayName:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the method display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}]}},{name:"Operation",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"queryParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.QUERY"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.newInstanceName",arguments:["New query parameter"]},{name:"MetaModel.description",arguments:["An APIs resources MAY be filtered (to return a subset of results) or altered (such as transforming a response body from JSON to XML format) by the use of query strings. If the resource or its method supports a query string, the query string MUST be defined by the queryParameters property"]}],valueConstraint:null,optional:!1},{name:"headers",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.HEADERS"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.description",arguments:["Headers that allowed at this position"]},{name:"MetaModel.newInstanceName",arguments:["New Header"]}],valueConstraint:null,optional:!1},{name:"queryString",type:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},annotations:[{name:"MetaModel.description",arguments:["Specifies the query string needed by this method. Mutually exclusive with queryParameters."]}],valueConstraint:null,optional:!1},{name:"responses",type:{base:{typeName:"Bodies.Response",nameSpace:"Bodies",basicName:"Response",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["response","true"]},{name:"MetaModel.newInstanceName",arguments:["New Response"]},{name:"MetaModel.description",arguments:["Information about the expected responses to a request"]},{name:"MetaModel.valueDescription",arguments:["An object whose keys are the HTTP status codes of the responses and whose values describe the responses."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Bodies:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},{classes:[{name:"SecuritySchemePart",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[],"extends":[{typeName:"Operation",nameSpace:"",basicName:"Operation",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{annotations:[{name:"MetaModel.description",arguments:['Annotations to be applied to this security scheme part. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:"SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"requestTokenUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"tokenCredentialsUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Request endpoint as defined in RFC5849 Section 2.3"]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"signatures",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.oneOf",arguments:[["HMAC-SHA1","RSA-SHA1","PLAINTEXT"]]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["List of the signature methods used by the server. Available methods: HMAC-SHA1, RSA-SHA1, PLAINTEXT"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]},{name:"MetaModel.functionalDescriminator",arguments:["$parent.type=='OAuth 1.0'"]}],"extends":[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecuritySchemeSettings",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"accessTokenUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.description",arguments:["The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationUri",type:{typeName:"Sys.FixedUriString",nameSpace:"Sys",basicName:"FixedUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types."]},{name:"MetaModel.valueDescription",arguments:["FixedUriString"]}],valueConstraint:null,optional:!1},{name:"authorizationGrants",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.oftenKeys",arguments:[["authorization_code","password","client_credentials","implicit"]]},{name:"MetaModel.description",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or any absolute url."]},{name:"MetaModel.markdownDescription",arguments:["A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:
    * authorization_code
    * password
    * client_credentials
    * implicit
    * or any absolute url."]}],valueConstraint:null,optional:!1},{name:"scopes",type:{base:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.allowAny",arguments:[]}],"extends":[{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"SecuritySchemeRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"securitySchemeName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns the name of security scheme, this reference refers to."]}],valueConstraint:null,optional:!1},{name:"securityScheme",type:{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns AST node of security scheme, this reference refers to, or null."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[], -modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"AbstractSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:[""]},{name:"MetaModel.hide",arguments:[]},{name:"MetaModel.description",arguments:["Name of the security scheme"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.required",arguments:[]},{name:"MetaModel.oneOf",arguments:[["OAuth 1.0","OAuth 2.0","Basic Authentication","Digest Authentication","Pass Through","x-{other}"]]},{name:"MetaModel.descriminatingProperty",arguments:[]},{name:"MetaModel.description",arguments:["The securitySchemes property MUST be used to specify an API's security mechanisms, including the required settings and the authentication methods that the API supports. one authentication method is allowed if the API supports them."]},{name:"MetaModel.valueDescription",arguments:["string

    The value MUST be one of
    * OAuth 1.0,
    * OAuth 2.0,
    * BasicSecurityScheme Authentication
    * DigestSecurityScheme Authentication
    * Pass Through
    * x-<other>"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The description attribute MAY be used to describe a security schemes property."]},{name:"MetaModel.description",arguments:["The description MAY be used to describe a securityScheme."]}],valueConstraint:null,optional:!1},{name:"describedBy",type:{typeName:"SecuritySchemePart",nameSpace:"",basicName:"SecuritySchemePart",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation."]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the security scheme display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[{name:"MetaModel.description",arguments:["The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth2SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 2.0"},optional:!1},{name:"settings",type:{typeName:"OAuth2SecuritySchemeSettings",nameSpace:"",basicName:"OAuth2SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"OAuth1SecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"OAuth 1.0"},optional:!1},{name:"settings",type:{typeName:"OAuth1SecuritySchemeSettings",nameSpace:"",basicName:"OAuth1SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"PassThroughSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Pass Through"},optional:!1},{name:"settings",type:{typeName:"SecuritySchemeSettings",nameSpace:"",basicName:"SecuritySchemeSettings",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"BasicSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Basic Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"DigestSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"Digest Authentication"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}},{name:"CustomSecurityScheme",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"x-{other}"},optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["Declares globally referable security scheme definition"]},{name:"MetaModel.actuallyExports",arguments:["$self"]},{name:"MetaModel.referenceIs",arguments:["settings"]}],"extends":[{typeName:"AbstractSecurityScheme",nameSpace:"",basicName:"AbstractSecurityScheme",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts"},{classes:[{name:"ResourceTypeRef",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"resourceType",type:{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns referenced resource type"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Reference",nameSpace:"",basicName:"Reference",typeKind:0,typeArguments:[{typeName:"ResourceType",nameSpace:"",basicName:"ResourceType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"ResourceType",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the resource type display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"name",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.description",arguments:["Name of the resource type"]}],valueConstraint:null,optional:!1},{name:"usage",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["Instructions on how and when the resource type should be used."]}],valueConstraint:null,optional:!1},{name:"parametrizedProperties",type:{typeName:"DataModel.TypeInstance",nameSpace:"DataModel",basicName:"TypeInstance",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.customHandling",arguments:[]},{name:"MetaModel.description",arguments:["Returns object representation of parametrized properties of the resource type"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.inlinedTemplates",arguments:[]},{name:"MetaModel.allowQuestion",arguments:[]},{name:"MetaModel.possibleInterfaces",arguments:[["FragmentDeclaration"]]}],"extends":[{typeName:"ResourceBase",nameSpace:"",basicName:"ResourceBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"ResourceBase",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"methods",type:{base:{typeName:"Methods.Method",nameSpace:"Methods",basicName:"Method",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["Methods that are part of this resource type definition"]},{name:"MetaModel.markdownDescription",arguments:["The methods available on this resource."]},{name:"MetaModel.documentationTableLabel",arguments:["get?
    patch?
    put?
    post?
    delete?
    options?
    head?"]},{name:"MetaModel.valueDescription",arguments:["Object describing the method"]}],valueConstraint:null,optional:!1},{name:"is",type:{base:{typeName:"Methods.TraitRef",nameSpace:"Methods",basicName:"TraitRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["A list of the traits to apply to all methods declared (implicitly or explicitly) for this resource. Individual methods may override this declaration"]},{name:"MetaModel.valueDescription",arguments:["array, which can contain each of the following elements:
    * name of unparametrized trait
    * a key-value pair with trait name as key and a map of trait parameters as value
    * inline trait declaration

    (or a single element of any above kind)"]}],valueConstraint:null,optional:!1},{name:"type",type:{typeName:"ResourceTypeRef",nameSpace:"",basicName:"ResourceTypeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.description",arguments:["The resource type which this resource inherits."]},{name:"MetaModel.valueDescription",arguments:["one of the following elements:
    * name of unparametrized resource type
    * a key-value pair with resource type name as key and a map of its parameters as value
    * inline resource type declaration"]}],valueConstraint:null,optional:!1},{name:"description",type:{typeName:"Sys.MarkdownString",nameSpace:"Sys",basicName:"MarkdownString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[],valueConstraint:null,optional:!1},{name:"securedBy",type:{base:{typeName:"Security.SecuritySchemeRef",nameSpace:"Security",basicName:"SecuritySchemeRef",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.allowNull",arguments:[]},{name:"MetaModel.description",arguments:["The security schemes that apply to all methods declared (implicitly or explicitly) for this resource."]},{name:"MetaModel.valueDescription",arguments:["array of security scheme names or a single security scheme name"]}],valueConstraint:null,optional:!1},{name:"uriParameters",type:{base:{typeName:"DataModel.TypeDeclaration",nameSpace:"DataModel",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.setsContextValue",arguments:["location","DataModel.ModelLocation.URI"]},{name:"MetaModel.setsContextValue",arguments:["locationKind","DataModel.LocationKind.APISTRUCTURE"]},{name:"MetaModel.setsContextValue",arguments:["fieldOrParam",!0]},{name:"MetaModel.description",arguments:["Detailed information about any URI parameters of this resource"]},{name:"MetaModel.valueDescription",arguments:["object whose property names are the URI parameter names and whose values describe the values"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"Annotable",nameSpace:"",basicName:"Annotable",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{}},{name:"Resource",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"relativeUri",type:{typeName:"Sys.RelativeUriString",nameSpace:"Sys",basicName:"RelativeUriString",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},annotations:[{name:"MetaModel.key",arguments:[]},{name:"MetaModel.startFrom",arguments:["/"]},{name:"MetaModel.description",arguments:["Relative URL of this resource from the parent resource"]},{name:"MetaModel.hide",arguments:[]}],valueConstraint:null,optional:!1},{name:"displayName",type:{typeName:"string",nameSpace:"",basicName:"string",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The displayName attribute specifies the resource display name. It is a friendly name used only for display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself)."]}],valueConstraint:null,optional:!1},{name:"resources",type:{base:{typeName:"Resource",nameSpace:"",basicName:"Resource",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},typeKind:1},annotations:[{name:"MetaModel.newInstanceName",arguments:["New Resource"]},{name:"MetaModel.description",arguments:['A nested resource is identified as any property whose name begins with a slash ("/") and is therefore treated as a relative URI.']},{name:"MetaModel.documentationTableLabel",arguments:["/<relativeUri>"]},{name:"MetaModel.valueDescription",arguments:["object describing the nested resource"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],"extends":[{typeName:"ResourceBase",nameSpace:"",basicName:"ResourceBase",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"}],moduleName:null,annotationOverridings:{description:[{name:"MetaModel.description",arguments:["A longer, human-friendly description of the resource."]},{name:"MetaModel.valueDescription",arguments:["Markdown string"]}],annotations:[{name:"MetaModel.markdownDescription",arguments:['Annotations to be applied to this resource. Annotations are any property whose key begins with "(" and ends with ")" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts",Security:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts",Methods:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts"},{classes:[{name:"FileTypeDeclaration",methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[{name:"type",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:"file"},optional:!1},{name:"fileTypes",type:{base:{typeName:"Sys.ContentType",nameSpace:"Sys",basicName:"ContentType",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"},typeKind:1},annotations:[{name:"MetaModel.description",arguments:["It should also include a new property: fileTypes, which should be a list of valid content-type strings for the file. The file type */* should be a valid value."]}],valueConstraint:null,optional:!1},{name:"minLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The minLength attribute specifies the parameter value's minimum number of bytes."]}],valueConstraint:null,optional:!1},{name:"maxLength",type:{typeName:"number",nameSpace:"",basicName:"number",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:"MetaModel.description",arguments:["The maxLength attribute specifies the parameter value's maximum number of bytes."]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:"MetaModel.description",arguments:["(Applicable only to Form properties) Value is a file. Client generators SHOULD use this type to handle file uploads correctly."]}],"extends":[{typeName:"TypeDeclaration",nameSpace:"",basicName:"TypeDeclaration",typeKind:0,typeArguments:[],modulePath:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts",Sys:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts",DataModel:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts"},name:"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts"}]},function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,a,o){for(;a>=0&&o>a;a+=e){var s=i?i[a]:a;r=n(r,t[s],s,t)}return r}return function(n,r,i,a){r=b(r,a,4);var o=!C(n)&&S.keys(n),s=(o||n).length,u=e>0?0:s-1;return arguments.length<3&&(i=n[o?o[u]:u],u+=e),t(n,r,i,o,u,s)}}function a(e){return function(t,n,r){n=_(n,r);for(var i=M(t),a=e>0?0:i-1;a>=0&&i>a;a+=e)if(n(t[a],a,t))return a;return-1}}function o(e,t,n){return function(r,i,a){var o=0,s=M(r);if("number"==typeof a)e>0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(h.call(r,o,s),S.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&s>a;a+=e)if(r[a]===i)return a;return-1}}function s(e,t){var n=x.length,r=e.constructor,i=S.isFunction(r)&&r.prototype||c,a="constructor";for(S.has(e,a)&&!S.contains(t,a)&&t.push(a);n--;)a=x[n],a in e&&e[a]!==i[a]&&!S.contains(t,a)&&t.push(a)}var u=this,l=u._,p=Array.prototype,c=Object.prototype,f=Function.prototype,d=p.push,h=p.slice,m=c.toString,y=c.hasOwnProperty,v=Array.isArray,g=Object.keys,A=f.bind,E=Object.create,T=function(){},S=function(e){return e instanceof S?e:this instanceof S?void(this._wrapped=e):new S(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=S),t._=S,S.VERSION="1.8.3";var b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return null==e?S.identity:S.isFunction(e)?b(e,t,n):S.isObject(e)?S.matcher(e):S.property(e)};S.iteratee=function(e,t){return _(e,t,1/0)};var N=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var a=arguments[i],o=e(a),s=o.length,u=0;s>u;u++){var l=o[u];t&&void 0!==n[l]||(n[l]=a[l])}return n}},w=function(e){if(!S.isObject(e))return{};if(E)return E(e);T.prototype=e;var t=new T;return T.prototype=null,t},R=function(e){return function(t){return null==t?void 0:t[e]}},I=Math.pow(2,53)-1,M=R("length"),C=function(e){var t=M(e);return"number"==typeof t&&t>=0&&I>=t};S.each=S.forEach=function(e,t,n){t=b(t,n);var r,i;if(C(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var a=S.keys(e);for(r=0,i=a.length;i>r;r++)t(e[a[r]],a[r],e)}return e},S.map=S.collect=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=Array(i),o=0;i>o;o++){var s=r?r[o]:o;a[o]=t(e[s],s,e)}return a},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(e,t,n){var r;return r=C(e)?S.findIndex(e,t,n):S.findKey(e,t,n),void 0!==r&&-1!==r?e[r]:void 0},S.filter=S.select=function(e,t,n){var r=[];return t=_(t,n),S.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},S.reject=function(e,t,n){return S.filter(e,S.negate(_(t)),n)},S.every=S.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(!t(e[o],o,e))return!1}return!0},S.some=S.any=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(t(e[o],o,e))return!0}return!1},S.contains=S.includes=S.include=function(e,t,n,r){return C(e)||(e=S.values(e)),("number"!=typeof n||r)&&(n=0),S.indexOf(e,t,n)>=0},S.invoke=function(e,t){var n=h.call(arguments,2),r=S.isFunction(t);return S.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},S.pluck=function(e,t){return S.map(e,S.property(t))},S.where=function(e,t){return S.filter(e,S.matcher(t))},S.findWhere=function(e,t){return S.find(e,S.matcher(t))},S.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],r>a&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},S.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],a>r&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(o>i||i===1/0&&a===1/0)&&(a=e,o=i)});return a},S.shuffle=function(e){for(var t,n=C(e)?e:S.values(e),r=n.length,i=Array(r),a=0;r>a;a++)t=S.random(0,a),t!==a&&(i[a]=i[t]),i[t]=n[a];return i},S.sample=function(e,t,n){return null==t||n?(C(e)||(e=S.values(e)),e[S.random(e.length-1)]):S.shuffle(e).slice(0,Math.max(0,t))},S.sortBy=function(e,t,n){return t=_(t,n),S.pluck(S.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var L=function(e){return function(t,n,r){var i={};return n=_(n,r),S.each(t,function(r,a){var o=n(r,a,t);e(i,r,o)}),i}};S.groupBy=L(function(e,t,n){S.has(e,n)?e[n].push(t):e[n]=[t]}),S.indexBy=L(function(e,t,n){e[n]=t}),S.countBy=L(function(e,t,n){S.has(e,n)?e[n]++:e[n]=1}),S.toArray=function(e){return e?S.isArray(e)?h.call(e):C(e)?S.map(e,S.identity):S.values(e):[]},S.size=function(e){return null==e?0:C(e)?e.length:S.keys(e).length},S.partition=function(e,t,n){t=_(t,n);var r=[],i=[];return S.each(e,function(e,n,a){(t(e,n,a)?r:i).push(e)}),[r,i]},S.first=S.head=S.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:S.initial(e,e.length-t)},S.initial=function(e,t,n){return h.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},S.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:S.rest(e,Math.max(0,e.length-t))},S.rest=S.tail=S.drop=function(e,t,n){return h.call(e,null==t||n?1:t)},S.compact=function(e){return S.filter(e,S.identity)};var P=function(e,t,n,r){for(var i=[],a=0,o=r||0,s=M(e);s>o;o++){var u=e[o];if(C(u)&&(S.isArray(u)||S.isArguments(u))){t||(u=P(u,t,n));var l=0,p=u.length;for(i.length+=p;p>l;)i[a++]=u[l++]}else n||(i[a++]=u)}return i};S.flatten=function(e,t){return P(e,t,!1)},S.without=function(e){return S.difference(e,h.call(arguments,1))},S.uniq=S.unique=function(e,t,n,r){S.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=_(n,r));for(var i=[],a=[],o=0,s=M(e);s>o;o++){var u=e[o],l=n?n(u,o,e):u;t?(o&&a===l||i.push(u),a=l):n?S.contains(a,l)||(a.push(l),i.push(u)):S.contains(i,u)||i.push(u)}return i},S.union=function(){return S.uniq(P(arguments,!0,!0))},S.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=M(e);i>r;r++){var a=e[r];if(!S.contains(t,a)){for(var o=1;n>o&&S.contains(arguments[o],a);o++);o===n&&t.push(a)}}return t},S.difference=function(e){var t=P(arguments,!0,!0,1);return S.filter(e,function(e){return!S.contains(t,e)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(e){for(var t=e&&S.max(e,M).length||0,n=Array(t),r=0;t>r;r++)n[r]=S.pluck(e,r);return n},S.object=function(e,t){for(var n={},r=0,i=M(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},S.findIndex=a(1),S.findLastIndex=a(-1),S.sortedIndex=function(e,t,n,r){n=_(n,r,1);for(var i=n(t),a=0,o=M(e);o>a;){var s=Math.floor((a+o)/2);n(e[s])a;a++,e+=n)i[a]=e;return i};var O=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var a=w(e.prototype),o=e.apply(a,i);return S.isObject(o)?o:a};S.bind=function(e,t){if(A&&e.bind===A)return A.apply(e,h.call(arguments,1));if(!S.isFunction(e))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return O(e,r,t,this,n.concat(h.call(arguments)))};return r},S.partial=function(e){var t=h.call(arguments,1),n=function(){for(var r=0,i=t.length,a=Array(i),o=0;i>o;o++)a[o]=t[o]===S?arguments[r++]:t[o];for(;r=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=S.bind(e[n],e);return e},S.memoize=function(e,t){var n=function(r){var i=n.cache,a=""+(t?t.apply(this,arguments):r);return S.has(i,a)||(i[a]=e.apply(this,arguments)),i[a]};return n.cache={},n},S.delay=function(e,t){var n=h.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},S.defer=S.partial(S.delay,S,1),S.throttle=function(e,t,n){var r,i,a,o=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:S.now(),o=null,a=e.apply(r,i),o||(r=i=null)};return function(){var l=S.now();s||n.leading!==!1||(s=l);var p=t-(l-s);return r=this,i=arguments,0>=p||p>t?(o&&(clearTimeout(o),o=null),s=l,a=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(u,p)),a}},S.debounce=function(e,t,n){var r,i,a,o,s,u=function(){var l=S.now()-o;t>l&&l>=0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(a,i),r||(a=i=null)))};return function(){a=this,i=arguments,o=S.now();var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(a,i), -a=i=null),s}},S.wrap=function(e,t){return S.partial(t,e)},S.negate=function(e){return function(){return!e.apply(this,arguments)}},S.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},S.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},S.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},S.once=S.partial(S.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(e){if(!S.isObject(e))return[];if(g)return g(e);var t=[];for(var n in e)S.has(e,n)&&t.push(n);return D&&s(e,t),t},S.allKeys=function(e){if(!S.isObject(e))return[];var t=[];for(var n in e)t.push(n);return D&&s(e,t),t},S.values=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},S.mapObject=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=i.length,o={},s=0;a>s;s++)r=i[s],o[r]=t(e[r],r,e);return o},S.pairs=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},S.invert=function(e){for(var t={},n=S.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},S.functions=S.methods=function(e){var t=[];for(var n in e)S.isFunction(e[n])&&t.push(n);return t.sort()},S.extend=N(S.allKeys),S.extendOwn=S.assign=N(S.keys),S.findKey=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=0,o=i.length;o>a;a++)if(r=i[a],t(e[r],r,e))return r},S.pick=function(e,t,n){var r,i,a={},o=e;if(null==o)return a;S.isFunction(t)?(i=S.allKeys(o),r=b(t,n)):(i=P(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var s=0,u=i.length;u>s;s++){var l=i[s],p=o[l];r(p,l,o)&&(a[l]=p)}return a},S.omit=function(e,t,n){if(S.isFunction(t))t=S.negate(t);else{var r=S.map(P(arguments,!1,!1,1),String);t=function(e,t){return!S.contains(r,t)}}return S.pick(e,t,n)},S.defaults=N(S.allKeys,!0),S.create=function(e,t){var n=w(e);return t&&S.extendOwn(n,t),n},S.clone=function(e){return S.isObject(e)?S.isArray(e)?e.slice():S.extend({},e):e},S.tap=function(e,t){return t(e),e},S.isMatch=function(e,t){var n=S.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;r>a;a++){var o=n[a];if(t[o]!==i[o]||!(o in i))return!1}return!0};var U=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof S&&(e=e._wrapped),t instanceof S&&(t=t._wrapped);var i=m.call(e);if(i!==m.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var a="[object Array]"===i;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var o=e.constructor,s=t.constructor;if(o!==s&&!(S.isFunction(o)&&o instanceof o&&S.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),a){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!U(e[u],t[u],n,r))return!1}else{var l,p=S.keys(e);if(u=p.length,S.keys(t).length!==u)return!1;for(;u--;)if(l=p[u],!S.has(t,l)||!U(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0};S.isEqual=function(e,t){return U(e,t)},S.isEmpty=function(e){return null==e?!0:C(e)&&(S.isArray(e)||S.isString(e)||S.isArguments(e))?0===e.length:0===S.keys(e).length},S.isElement=function(e){return!(!e||1!==e.nodeType)},S.isArray=v||function(e){return"[object Array]"===m.call(e)},S.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){S["is"+e]=function(t){return m.call(t)==="[object "+e+"]"}}),S.isArguments(arguments)||(S.isArguments=function(e){return S.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(S.isFunction=function(e){return"function"==typeof e||!1}),S.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},S.isNaN=function(e){return S.isNumber(e)&&e!==+e},S.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===m.call(e)},S.isNull=function(e){return null===e},S.isUndefined=function(e){return void 0===e},S.has=function(e,t){return null!=e&&y.call(e,t)},S.noConflict=function(){return u._=l,this},S.identity=function(e){return e},S.constant=function(e){return function(){return e}},S.noop=function(){},S.property=R,S.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},S.matcher=S.matches=function(e){return e=S.extendOwn({},e),function(t){return S.isMatch(t,e)}},S.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},S.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},S.now=Date.now||function(){return(new Date).getTime()};var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},F=S.invert(k),B=function(e){var t=function(t){return e[t]},n="(?:"+S.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};S.escape=B(k),S.unescape=B(F),S.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),S.isFunction(r)?r.call(e):r};var K=0;S.uniqueId=function(e){var t=++K+"";return e?e+t:t},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+j[e]};S.template=function(e,t,n){!t&&n&&(t=n),t=S.defaults({},t,S.templateSettings);var r=RegExp([(t.escape||V).source,(t.interpolate||V).source,(t.evaluate||V).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(W,q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var o=new Function(t.variable||"obj","_",a)}catch(s){throw s.source=a,s}var u=function(e){return o.call(this,e,S)},l=t.variable||"obj";return u.source="function("+l+"){\n"+a+"}",u},S.chain=function(e){var t=S(e);return t._chain=!0,t};var Y=function(e,t){return e._chain?S(t).chain():t};S.mixin=function(e){S.each(S.functions(e),function(t){var n=S[t]=e[t];S.prototype[t]=function(){var e=[this._wrapped];return d.apply(e,arguments),Y(this,n.apply(S,e))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=p[e];S.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Y(this,n)}}),S.each(["concat","join","slice"],function(e){var t=p[e];S.prototype[e]=function(){return Y(this,t.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){"use strict";function r(e,t){return{name:e,methods:[],typeParameters:[],typeParameterConstraint:[],"implements":[],fields:[],isInterface:t,annotations:[],"extends":[],moduleName:null,annotationOverridings:{}}}function i(e,t,n){return a.parseStruct(e,t,n)}t.helpers=n(140);var a=n(141),o=function(){function e(){}return e}();t.EnumDeclaration=o,function(e){e[e.BASIC=0]="BASIC",e[e.ARRAY=1]="ARRAY",e[e.UNION=2]="UNION"}(t.TypeKind||(t.TypeKind={}));t.TypeKind;t.classDecl=r,t.parseStruct=i},function(e,t,n){(function(e,r){/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -"use strict";function i(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}function a(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?o(this,t):"string"==typeof t?s(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function o(t,n){if(t=m(t,0>n?0:0|y(n)),!e.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)t[r]=0;return t}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|g(t,n);return e=m(e,r),e.write(t,n),e}function u(t,n){if(e.isBuffer(n))return l(t,n);if(z(n))return p(t,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return c(t,n);if(n instanceof ArrayBuffer)return f(t,n)}return n.length?d(t,n):h(t,n)}function l(e,t){var n=0|y(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function p(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function c(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function f(t,n){return e.TYPED_ARRAY_SUPPORT?(n.byteLength,t=e._augment(new Uint8Array(n))):t=c(t,new Uint8Array(n)),t}function d(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&z(t.data)&&(n=t.data,r=0|y(n.length)),e=m(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function m(t,n){e.TYPED_ARRAY_SUPPORT?(t=e._augment(new Uint8Array(n)),t.__proto__=e.prototype):(t.length=n,t._isBuffer=!0);var r=0!==n&&n<=e.poolSize>>>1;return r&&(t.parent=J),t}function y(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function v(t,n){if(!(this instanceof v))return new v(t,n);var r=new e(t,n);return delete r.parent,r}function g(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0}}function A(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return M(this,t,n);case"binary":return C(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function E(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function T(e,t,n,r){return $(W(t,e.length-n),e,n,r)}function S(e,t,n,r){return $(q(t),e,n,r)}function b(e,t,n,r){return S(e,t,n,r)}function _(e,t,n,r){return $(H(t),e,n,r)}function N(e,t,n,r){return $(Y(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?G.fromByteArray(e):G.fromByteArray(e.slice(t,n))}function R(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n>=i+s){var u,l,p,c;switch(s){case 1:128>a&&(o=a);break;case 2:u=e[i+1],128===(192&u)&&(c=(31&a)<<6|63&u,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],128===(192&u)&&128===(192&l)&&(c=(15&a)<<12|(63&u)<<6|63&l,c>2047&&(55296>c||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],p=e[i+3],128===(192&u)&&128===(192&l)&&128===(192&p)&&(c=(15&a)<<18|(63&u)<<12|(63&l)<<6|63&p,c>65535&&1114112>c&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return I(r)}function I(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function L(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",a=t;n>a;a++)i+=j(e[a]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,n,r,i,a,o){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(n>a||o>n)throw new RangeError("value is out of bounds");if(r+i>t.length)throw new RangeError("index out of range")}function x(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);a>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function U(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);a>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function k(e,t,n,r,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function F(e,t,n,r,i){return i||k(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||k(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function K(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function j(e){return 16>e?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;r>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function H(e){return G.toByteArray(K(e))}function $(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}var G=n(191),X=n(179),z=n(178);t.Buffer=e,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var J={};e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,n){if(!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,a=0,o=Math.min(r,i);o>a&&t[a]===n[a];)++a;return a!==o&&(r=t[a],i=n[a]),i>r?-1:r>i?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!z(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var r;if(void 0===n)for(n=0,r=0;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,n){function r(e,t,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,n);if(e.isBuffer(t))return r(this,t,n);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return S(this,e,t,n);case"binary":return b(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;e.prototype.slice=function(t,n){var r=this.length;t=~~t,n=void 0===n?r:~~n,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),t>n&&(n=t);var i;if(e.TYPED_ARRAY_SUPPORT)i=e._augment(this.subarray(t,n));else{var a=n-t;i=new e(a,void 0);for(var o=0;a>o;o++)i[o]=this[o+t]}return i.length&&(i.parent=this.parent||this),i},e.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=this[e],i=1,a=0;++a0&&(i*=256);)r+=this[e+--t]*i;return r},e.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},e.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),X.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),X.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),X.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),X.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||D(this,e,t,n,Math.pow(2,8*n),0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},e.prototype.writeUInt8=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},e.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):x(this,t,n,!0),n+2},e.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):x(this,t,n,!1),n+2},e.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):U(this,t,n,!0),n+4},e.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):U(this,t,n,!1),n+4},e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0>e?1:0;for(this[t]=255&e;++a>0)-s&255;return t+n},e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0>e?1:0;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},e.prototype.writeInt8=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[n]=255&t,n+1},e.prototype.writeInt16LE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):x(this,t,n,!0),n+2},e.prototype.writeInt16BE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):x(this,t,n,!1),n+2},e.prototype.writeInt32LE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):U(this,t,n,!0),n+4},e.prototype.writeInt32BE=function(t,n,r){return t=+t,n=0|n,r||D(this,t,n,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):U(this,t,n,!1),n+4},e.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},e.prototype.copy=function(t,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-nr&&i>n)for(a=o-1;a>=0;a--)t[a+n]=this[a+r];else if(1e3>o||!e.TYPED_ARRAY_SUPPORT)for(a=0;o>a;a++)t[a+n]=this[a+r];else t._set(this.subarray(r,r+o),n);return o},e.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=W(e.toString()),a=i.length;for(r=t;n>r;r++)this[r]=i[r%a]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var t=new Uint8Array(this.length),n=0,r=t.length;r>n;n+=1)t[n]=this[n];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(t){return t.constructor=e,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(97).Buffer,function(){return this}())},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;u>l;++l){var p,c,f,d,h=e[l].replace(o,"%20"),m=h.indexOf(n);m>=0?(p=h.substr(0,m),c=h.substr(m+1)):(p=h,c=""),f=decodeURIComponent(p),d=decodeURIComponent(c),r(a,f)?Array.isArray(a[f])?a[f].push(d):a[f]=[a[f],d]:a[f]=d}return a}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var a=encodeURIComponent(r(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return a+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[i]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""}},function(e,t,n){"use strict";function r(){return new _(_.OK,"","",null)}function i(e,t,n,r,i){void 0===n&&(n={}),void 0===r&&(r=_.ERROR),void 0===i&&(i=!1);var a=N(e,n);return new _(r,e.code,a,t,i)}function a(){return ne}function o(e,t){return new ee(e,t)}function s(e,t){return new te(e,t)}function u(e,n){var r=new Q(e);return n.forEach(function(e){return r.addSuper(e)}),r.isSubTypeOf(t.NIL)&&(r.nullable=!0),r}function l(e){return u(e,[t.OBJECT])}function p(e,t,n){if(t.isScalar()&&n.isScalar()){if(-1!=t.allSubTypes().indexOf(n))return t;if(-1!=n.allSubTypes().indexOf(t))return n}var r=t.oneMeta(C.Discriminator),i=n.oneMeta(C.Discriminator);if(r&&i&&r.property===i.property){var a=t.descValue(),o=n.descValue();if(a!==o){var s=e[r.property];if(s===a)return t;if(s===o)return n}}return null}function c(e){return parseFloat(e)!=parseInt(e)||isNaN(e)?!1:!0}function f(e){for(var t=[];null!=e;){if(null!=e.name()){t.push(e.name());break}if(!(e instanceof Q))break;var n=e.contextMeta();if(null==n)break;t.push(n.path()),e=n._owner}return t.reverse()}function d(e,n,a){var o=n.metaOfType(C.Discriminator);if(0==o.length)return null;var s=o[0].value(),u=T.find([n].concat(n.allSuperTypes()),function(e){return e.getExtra(t.GLOBAL)});if(!u)return null;var l=u.name(),p=n.metaOfType(C.DiscriminatorValue);if(0!=p.length&&(l=p[0].value()),l){if(e.hasOwnProperty(s)){var c=e[s];if(c!=l){var f=i(_.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:u.name(),value:c,propName:s},_.WARNING);return h(f,{name:s,child:a}),f}return r()}var d=i(_.CODE_MISSING_DISCRIMINATOR,this,{rootType:u.name(),propName:s});return h(d,a),d}}function h(e,t){if(e.getValidationPath()){for(var n=m(t),r=n;r.child;)r=r.child;r.child=e.getValidationPath(),e.setValidationPath(n)}else e.setValidationPath(t);e.getSubStatuses().forEach(function(e){h(e,t)})}function m(e){if(e){for(var t=e,n=null,r=null;t;)if(n){var i={name:t.name};r.child=i,t=t.child,r=i}else n={name:t.name},r=n,t=t.child,r=n;return n}return null}function y(e){for(var t=b.getAnnotationValidationPlugins(),n=[],r=0,i=t;r0){var e=[];return this.subStatus.forEach(function(t){return e=e.concat(t.getErrors())}),e}return[this]}return[]},e.prototype.getSubStatuses=function(){return this.subStatus},e.prototype.getSeverity=function(){return this.severity},e.prototype.getMessage=function(){return this.message},e.prototype.setMessage=function(e){this.message=e},e.prototype.getSource=function(){return this.source},e.prototype.getCode=function(){return this.code},e.prototype.setCode=function(e){this.code=e},e.prototype.isWarning=function(){return this.severity==e.WARNING},e.prototype.isError=function(){return this.severity==e.ERROR},e.prototype.isOk=function(){return this.severity===e.OK},e.prototype.isInfo=function(){return this.severity===e.INFO},e.prototype.setSource=function(e){this.source=e},e.prototype.toString=function(){return this.isOk()?"OK":this.message},e.prototype.getExtra=function(e){return this.takeNodeFromSource&&e==b.SOURCE_EXTRA&&this.source instanceof w?this.source.node():null},e.prototype.putExtra=function(e,t){},e.prototype.setInternalRange=function(e){this.internalRange=e},e.prototype.getInternalRange=function(){return this.internalRange},e.prototype.getInternalPath=function(){return this.internalPath},e.prototype.setInternalPath=function(e){this.internalPath=e},e.prototype.getFilePath=function(){return this.filePath},e.prototype.setFilePath=function(e){this.filePath=e},e.CODE_CONFLICTING_TYPE_KIND=4,e.CODE_INCORRECT_DISCRIMINATOR=t.messageRegistry.INCORRECT_DISCRIMINATOR,e.CODE_MISSING_DISCRIMINATOR=t.messageRegistry.MISSING_DISCRIMINATOR,e.ERROR=3,e.INFO=1,e.OK=0,e.WARNING=2,e}();t.Status=_,t.ok=r,t.SCHEMA_AND_TYPE=b.SCHEMA_AND_TYPE_EXTRA,t.GLOBAL=b.GLOBAL_EXTRA,t.TOPLEVEL=b.TOP_LEVEL_EXTRA,t.SOURCE_EXTRA=b.SOURCE_EXTRA;var N=function(e,t){for(var n="",r=e.message,i=0,a=r.indexOf("{{");a>=0;a=r.indexOf("{{",i)){if(n+=r.substring(i,a),i=r.indexOf("}}",a),0>i){i=a;break}a+="{{".length;var o=r.substring(a,i);i+="}}".length;var s=t[o];if(void 0===s)throw new Error("Message parameter '"+o+"' has no value specified.");n+=s}return n+=r.substring(i,r.length)};t.error=i;var w=function(){function e(e){this._inheritable=e,this._annotations=[]}return e.prototype.node=function(){return this._node},e.prototype.setNode=function(e){this._node=e},e.prototype.owner=function(){return this._owner},e.prototype.isInheritable=function(){return this._inheritable},e.prototype.validateSelf=function(e){for(var t=r(),n=0,i=this._annotations;n0&&(o.child=r[r.length-1]),r.push(o)}i=i.pop()}h(this,r.pop());var s=M.anotherRestrictionComponent();n=s?" between types '"+f(this.source)+"' and '"+f(s)+"'":" in type '"+f(this.source)+"'"}this.message="Restrictions conflict"+n+": "+e},n.prototype.getConflictDescription=function(){var e="";return e+="Restrictions coflict:\n",e+=this._stack.getRestriction()+" conflicts with "+this._conflicting+"\n",e+="at\n",e+=this._stack.pop()},n.prototype.getConflicting=function(){return this._conflicting},n.prototype.getStack=function(){return this._stack},n.prototype.toRestriction=function(){return new ae(this._stack,this.message,this._conflicting)},n}(_);t.RestrictionsConflict=j;var W=0;t.VALIDATED_TYPE=null;var q=function(){function e(e){this._name=e,this.metaInfo=[],this._subTypes=[],this.innerid=W++,this.extras={},this._locked=!1}return e.prototype.getExtra=function(e){return this.extras[e]},e.prototype.putExtra=function(e,t){this.extras[e]=t},e.prototype.id=function(){return this.innerid},e.prototype.knownProperties=function(){return this.metaOfType(B.MatchesProperty)},e.prototype.lock=function(){this._locked=!0},e.prototype.isLocked=function(){return this._locked},e.prototype.allFacets=function(){return this.meta()},e.prototype.declaredFacets=function(){return this.declaredMeta()},e.prototype.isSubTypeOf=function(e){return e===t.ANY||this===e||this.superTypes().some(function(t){return t.isSubTypeOf(e)})},e.prototype.isSuperTypeOf=function(e){return this===e||-1!=this.allSubTypes().indexOf(e)},e.prototype.addMeta=function(e){this.metaInfo.push(e),e._owner=this},e.prototype.name=function(){return this._name},e.prototype.label=function(){return this._name},e.prototype.subTypes=function(){return this._subTypes},e.prototype.superTypes=function(){return[]},e.prototype.addSupertypeAnnotation=function(e,t){if(e&&0!=e.length){this.supertypeAnnotations||(this.supertypeAnnotations=[]);var n=this.supertypeAnnotations[t];n||(n={},this.supertypeAnnotations[t]=n);for(var r=0,i=e;r0&&f.forEach(function(e){var a=i(t.messageRegistry.CYCLIC_DEPENDENCY,n,{typeName:e});h(a,{name:e}),r.addSubStatus(a)})}if(this.supertypeAnnotations)for(var d=0;d1&&l.forEach(function(e){e.isExternal()?p=!0:c=!0}),p&&c&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,this)),this instanceof ee){var f=this;f.options().forEach(function(r){r.isExternal()&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,n))})}if(this.isExternal()&&this.getExtra(b.HAS_FACETS)){var d=i(t.messageRegistry.EXTERNAL_FACET,this,{name:this.getExtra(b.HAS_FACETS)});h(d,{name:this.getExtra(b.HAS_FACETS)}),e.addSubStatus(d)}},e.prototype.familyWithArray=function(){var e=this.allSuperTypes(),t=this.oneMeta(U.ComponentShouldBeOfType);if(t){var n=t.value();e=e.concat(n.familyWithArray())}return e},e.prototype.validateMeta=function(e){var t=new _(_.OK,"","",this);return this.declaredMeta().forEach(function(n){n.validateSelf(e).getErrors().forEach(function(e){return t.addSubStatus(e)})}),this.validateFacets(t),t},e.prototype.validateFacets=function(e){var n=this,r={},a={},o={};this.meta().forEach(function(e){if(e instanceof O.FacetDeclaration){var t=e;r[t.actualName()]=t,t.isOptional()||t.owner()!==n&&(o[t.actualName()]=t),t.owner()!=n&&(a[t.actualName()]=t)}}),this.declaredMeta().forEach(function(r){if(r instanceof O.FacetDeclaration){var o=r;if(o.owner()==n){var s=o.actualName();a.hasOwnProperty(s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_FACET,n,{name:s}));var u=L.getInstance().facetPrototypeWithName(s);(u&&u.isApplicable(n)||"type"==s||"properties"==o.facetName()||"schema"==s||"facets"==s||"uses"==s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_BUILTIN_FACET,n,{name:s})),"("==s.charAt(0)&&e.addSubStatus(i(t.messageRegistry.FACET_START_BRACKET,n,{name:s}))}}});var s={};this.meta().forEach(function(e){e instanceof x.PropertyIs&&(s[e.propId()]=!0)});for(var u=0,l=this.meta();u0&&e.addSubStatus(i(t.messageRegistry.MISSING_REQUIRED_FACETS,this,{facetsList:Object.keys(o).map(function(e){return"'"+e+"'"}).join(",")}))},e.prototype.allSuperTypes=function(){var e=[];return this.fillSuperTypes(e),e},e.prototype.fillSuperTypes=function(e){this.superTypes().forEach(function(t){T.contains(e,t)||(e.push(t),t.fillSuperTypes(e))})},e.prototype.allSubTypes=function(){var e=[];return this.fillSubTypes(e),e},e.prototype.fillSubTypes=function(e){this.subTypes().forEach(function(t){T.contains(e,t)||(e.push(t),t.fillSubTypes(e))})},e.prototype.inherit=function(e){var t=new Q(e);return t.addSuper(this),t},e.prototype.isAnonymous=function(){return!this._name||0===this._name.length},e.prototype.isEmpty=function(){return this.metaInfo.length>2?!1:0==this.metaInfo.filter(function(e){return e instanceof F.NotScalar?!1:e instanceof C.DiscriminatorValue?e.isStrict():!0}).length},e.prototype.isArray=function(){return this===t.ARRAY||-1!=this.allSuperTypes().indexOf(t.ARRAY)},e.prototype.propertySet=function(){var e=[];return this.meta().forEach(function(t){if(t instanceof x.PropertyIs){var n=t;e.push(n.propertyName())}}),T.uniq(e)},e.prototype.checkConfluent=function(){if(this.computeConfluent)return r();this.computeConfluent=!0;var e=M.anotherRestrictionComponentsCount();try{var t=M.optimize(this.restrictions()),n=T.find(t,function(e){return e instanceof re});if(n){var i=null,a=null;if(n instanceof ae){var o=n;i=o.getStack(),a=o.another()}var s=new j(a,i,this);return s}return r()}finally{this.computeConfluent=!1,M.releaseAnotherRestrictionComponent(e)}},e.prototype.isObject=function(){return this==t.OBJECT||T.some(this.allSuperTypes(),function(e){return e.isObject()})},e.prototype.isExternal=function(){return this==t.EXTERNAL||-1!=this.allSuperTypes().indexOf(t.EXTERNAL)},e.prototype.isBoolean=function(){return this==t.BOOLEAN||-1!=this.allSuperTypes().indexOf(t.BOOLEAN)},e.prototype.isString=function(){return this==t.STRING||-1!=this.allSuperTypes().indexOf(t.STRING)},e.prototype.isNumber=function(){return this==t.NUMBER||-1!=this.allSuperTypes().indexOf(t.NUMBER)},e.prototype.isFile=function(){return this==t.FILE||-1!=this.allSuperTypes().indexOf(t.FILE)},e.prototype.isScalar=function(){return this==t.SCALAR||-1!=this.allSuperTypes().indexOf(t.SCALAR)},e.prototype.isDateTime=function(){return this==t.DATETIME||-1!=this.allSuperTypes().indexOf(t.DATETIME)},e.prototype.isDateOnly=function(){return this==t.DATE_ONLY||-1!=this.allSuperTypes().indexOf(t.DATE_ONLY)},e.prototype.isTimeOnly=function(){return this==t.TIME_ONLY||-1!=this.allSuperTypes().indexOf(t.TIME_ONLY)},e.prototype.isInteger=function(){return this==t.INTEGER||-1!=this.allSuperTypes().indexOf(t.INTEGER)},e.prototype.isDateTimeOnly=function(){return this==t.DATETIME_ONLY||-1!=this.allSuperTypes().indexOf(t.DATETIME_ONLY)},e.prototype.isUnknown=function(){return this==t.UNKNOWN||-1!=this.allSuperTypes().indexOf(t.UNKNOWN)},e.prototype.isRecurrent=function(){return this==t.RECURRENT||-1!=this.allSuperTypes().indexOf(t.RECURRENT)},e.prototype.isBuiltin=function(){return-1!=this.metaInfo.indexOf(z)},e.prototype.exampleObject=function(){return k.example(this)},e.prototype.isPolymorphic=function(){return this.meta().some(function(e){return e instanceof H})},e.prototype.restrictions=function(e){if(void 0===e&&(e=!1),this.isUnion()){var t=[];return this.superTypes().forEach(function(e){t=t.concat(e.restrictions())}),t=t.concat(this.meta().filter(function(e){return e instanceof I}))}var n=[],r=null;return this.meta().forEach(function(t){if(t instanceof I){if(t instanceof oe&&e){if(r)return;r=t}n.push(t)}}),n},e.prototype.customFacets=function(){return this.declaredMeta().filter(function(e){return e instanceof C.CustomFacet})},e.prototype.allCustomFacets=function(){return this.meta().filter(function(e){return e instanceof C.CustomFacet})},e.prototype.isUnion=function(){var e=!1;return this.isBuiltin()?!1:(this.allSuperTypes().forEach(function(t){return e=e||t instanceof ee}),e)},e.prototype.isIntersection=function(){var e=!1;return this.isBuiltin()?!1:(this.allSuperTypes().forEach(function(t){return e=e||t instanceof te}),e)},e.prototype.meta=function(){return[].concat(this.metaInfo)},e.prototype.validateDirect=function(e,n,r,a){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===a&&(a=null);var s=t.VALIDATED_TYPE;try{var u=t.autoCloseFlag;n&&(t.autoCloseFlag=!0),t.VALIDATED_TYPE=this;var l=new _(_.OK,"","",this);if(!(r||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.OBJECT_EXPECTED,this);if(this.restrictions(!0).forEach(function(t){return l.addSubStatus(t.check(e,a))}),(n||t.autoCloseFlag)&&this.isObject()&&!this.oneMeta(P.KnownPropertyRestriction)){var p=new P.KnownPropertyRestriction(!1);p.patchOwner(this),p.check(e).getErrors().forEach(function(e){var t=new _(_.WARNING,e.getCode(),e.getMessage(),o);h(t,e.getValidationPath()),l.addSubStatus(t)})}}finally{t.autoCloseFlag=u,t.VALIDATED_TYPE=s}return l},e.prototype.validate=function(e,n,a){void 0===n&&(n=!1),void 0===a&&(a=!0);var o=t.autoCloseFlag;if(!(a||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.NULL_NOT_ALLOWED,this);n&&(t.autoCloseFlag=!0);try{for(var s,u=[],l=this.subTypes().concat(this),p=0,c=l;p1;){var i=!1;e:for(var a=0;a0?t[0].value().label()+"[]":e.prototype.label.call(this)},t.prototype.contextMeta=function(){return this._contextMeta},t.prototype.setContextMeta=function(e){this._contextMeta=e},t.prototype.patch=function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])},t}(q);t.InheritedType=Q;var Z=function(e){function t(t,n){e.call(this,t),this._options=n}return E(t,e),t.prototype.allOptions=function(){var e=this,t=[];return this._options.forEach(function(n){n.kind()==e.kind()?t=t.concat(n.allOptions()):t.push(n)}),T.unique(t)},t.prototype.options=function(){return this._options},t}(q);t.DerivedType=Z;var ee=function(e){function n(t,n){var r=this;e.call(this,t,n),this.options().forEach(function(e){e.nullable&&(r.nullable=!0)})}return E(n,e),n.prototype.kind=function(){return"union"},n.prototype.isSubTypeOf=function(e){var t=!0;return this.allOptions().forEach(function(n){n.isSubTypeOf(e)||(t=!1)}),t},n.prototype.validate=function(e){return this.validateDirect(e)},n.prototype.typeFamily=function(){var e=[];return this.allOptions().forEach(function(t){e=e.concat(t.typeFamily())}),e},n.prototype.knownProperties=function(){var e=this.metaOfType(B.MatchesProperty);return this.options().forEach(function(t){e=e.concat(t.knownProperties())}),e},n.prototype.validateDirect=function(e,t){void 0===t&&(t=!1);var n=new _(_.OK,"","",this);return this.restrictions().forEach(function(t){return n.addSubStatus(t.check(e,null))}),n},n.prototype.isUnion=function(){return!0},n.prototype.isObject=function(){return T.all(this.allOptions(),function(e){return e.isObject()})},n.prototype.restrictions=function(){return[new ce(this.allOptions().map(function(e){return new fe(e.restrictions())}),t.messageRegistry.UNION_TYPE_FAILURE,t.messageRegistry.UNION_TYPE_FAILURE_DETAILS)]},n.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("|")},n}(Z);t.UnionType=ee;var te=function(e){function t(){e.apply(this,arguments)}return E(t,e),t.prototype.kind=function(){return"intersection"},t.prototype.restrictions=function(){var e=[];return this.allOptions().forEach(function(t){return e=e.concat(t.restrictions())}),[new fe(e)]},t.prototype.label=function(){return this.options().map(function(e){return e.label()}).join("&")},t.prototype.isIntersection=function(){return!0},t}(Z);t.IntersectionType=te;var ne=new K;t.builtInRegistry=a,t.union=o,t.intersect=s,t.derive=u,t.deriveObjectType=l;var re=function(e){function n(){e.apply(this,arguments)}return E(n,e),n.prototype.check=function(e){return null===e||void 0===e?r():i(t.messageRegistry.NOTHING,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"nothing"},n.prototype.value=function(){return"!!!"},n}(I);t.NothingRestriction=re;var ie=function(){function e(e,t,n){this._previous=e,this._restriction=t,this.id=n}return e.prototype.getRestriction=function(){return this._restriction},e.prototype.pop=function(){return this._previous},e.prototype.push=function(t){return new e(this,t,t.toString())},e}();t.RestrictionStackEntry=ie;var ae=function(e){function t(t,n,r){e.call(this),this._entry=t,this._message=n,this._another=r}return E(t,e),t.prototype.getMessage=function(){return this._message},t.prototype.getStack=function(){return this._entry},t.prototype.another=function(){return this._another},t}(re);t.NothingRestrictionWithLocation=ae;var oe=function(e){function t(){e.apply(this,arguments)}return E(t,e),t}(I);t.GenericTypeOf=oe;var se=function(e){function n(t){e.call(this),this.val=t}return E(n,e),n.prototype.check=function(e){var n=typeof e;return null===e||void 0===e?r():(Array.isArray(e)&&(n="array"),n===this.val?r():i(t.messageRegistry.TYPE_EXPECTED,this,{typeName:this.val}))},n.prototype.value=function(){return this.val},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"typeOf"},n.prototype.composeWith=function(e){if(e instanceof n){var t=e;return t.val==this.val?this:this.nothing(e)}return null},n.prototype.toString=function(){return"should be of type "+this.val},n}(oe);t.TypeOfRestriction=se;var ue=function(e){function n(){e.call(this)}return E(n,e),n.prototype.check=function(e){return"number"==typeof e&&c(e)?r():i(t.messageRegistry.INTEGER_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return"should be integer"},n}(oe);t.IntegerRestriction=ue;var le=function(e){function n(){e.call(this)}return E(n,e),n.prototype.check=function(e){return null===e||void 0==e||"null"===e?r():i(t.messageRegistry.NULL_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return"should be null"},n}(oe);t.NullRestriction=le;var pe=function(e){function n(){e.call(this)}return E(n,e),n.prototype.check=function(e){return e?"number"==typeof e||"boolean"==typeof e||"string"==typeof e?r():i(t.messageRegistry.SCALAR_EXPECTED,this):r()},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return"should be scalar"},n.prototype.value=function(){return!0},n}(oe);t.ScalarRestriction=pe;var ce=function(e){function n(t,n,r){e.call(this),this.val=t,this._extraMessage=n,this._extraOptionMessage=r}return E(n,e),n.prototype.check=function(e,t){for(var n=this,a=new _(_.OK,"","",this),o=[],s=0;s0){for(var l=0,p=o;l=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){var e=this;return this._annotations||(this._annotations=this._type.meta().filter(function(e){return e.kind()==b.MetaInformationKind.Annotation}).map(function(t){return new Ee(t,e.reg)})),this._annotations},e.prototype.value=function(){return ge.storeAsJSON(this._type)},e.prototype.name=function(){return this._type.name()},e.prototype.entry=function(){return this._type},e}();t.AnnotatedType=Ae;var Ee=function(){function e(e,t){this.actual=e}return e.prototype.name=function(){return this.actual.facetName()},e.prototype.value=function(){return this.actual.value()},e.prototype.definition=function(){var e=ne.get(this.actual.facetName());return e},e.prototype.annotation=function(){return this.actual},e}();t.AnnotationInstance=Ee,t.applyAnnotationValidationPlugins=y,t.applyTypeValidationPlugins=v,t.toValidationPath=A},function(e,t,n){(function(e){"use strict";function n(){var t=e.ramlValidation;if(t){var n=t.typeValidators;if(Array.isArray(n))return n}return[]}function r(){var t=e.ramlValidation;if(t){var n=t.typesystemAnnotationValidators;if(Array.isArray(n))return n}return[]}t.REPEAT="repeat",t.PARSE_ERROR="parseError",t.TOP_LEVEL_EXTRA="topLevel",t.DEFINED_IN_TYPES_EXTRA="definedInTypes",t.USER_DEFINED_EXTRA="USER_DEFINED",t.SOURCE_EXTRA="SOURCE",t.SCHEMA_AND_TYPE_EXTRA="SCHEMA",t.GLOBAL_EXTRA="GLOBAL",t.HAS_FACETS="HAS_FACETS",t.HAS_ITEMS="HAS_ITEMS",function(e){e[e.Description=0]="Description",e[e.NotScalar=1]="NotScalar",e[e.DisplayName=2]="DisplayName",e[e.Usage=3]="Usage",e[e.Annotation=4]="Annotation",e[e.FacetDeclaration=5]="FacetDeclaration",e[e.CustomFacet=6]="CustomFacet",e[e.Example=7]="Example",e[e.Required=8]="Required",e[e.HasPropertiesFacet=9]="HasPropertiesFacet",e[e.AllowedTargets=10]="AllowedTargets",e[e.Examples=11]="Examples",e[e.XMLInfo=12]="XMLInfo",e[e.Default=13]="Default",e[e.Constraint=14]="Constraint",e[e.Modifier=15]="Modifier",e[e.Discriminator=16]="Discriminator",e[e.DiscriminatorValue=17]="DiscriminatorValue"}(t.MetaInformationKind||(t.MetaInformationKind={}));t.MetaInformationKind;t.getTypeValidationPlugins=n,t.getAnnotationValidationPlugins=r}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n,r){return void 0===n&&(n=E.builtInRegistry()),v(e,new O(null,t,!1,r),n)}function i(e,t,n){return void 0===t&&(t=E.builtInRegistry()),u(new O(null,e,!1,n),t)}function a(e){return"?"==e.charAt(e.length-1)}function o(e,t){void 0===t&&(t=E.builtInRegistry());var n=e.provider&&e.provider();return u(new O(null,e,!1,n),t)}function s(e){return new k(e)}function u(e,t){var n=new x;if(e.anchor){if(e.anchor().__$$)return e.anchor().__$$;e.anchor().__$$=n}var r=e.childWithKey("types");r&&r.kind()===P.ARRAY&&(r=s(r));var i=e.childWithKey("schemas");i&&i.kind()===P.ARRAY&&(i=s(i));var a=new U(r,i,t,n);r&&r.kind()!==P.SCALAR&&r.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=E.derive(e.key(),[E.REFERENCE]);n.add(t),a.addType(t)}),i&&i.kind()!==P.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=E.derive(e.key(),[E.REFERENCE]);n.add(t),a.addType(t)});var o=e.childWithKey("uses");o&&o.kind()===P.ARRAY&&(o=s(o)),o&&o.kind()===P.MAP&&o.children().forEach(function(e){n.addLibrary(e.key(),u(e,t))}),r&&r.kind()!==P.SCALAR&&r.children().filter(function(e){return e.key()&&!0}).forEach(function(e){a.get(e.key())}),i&&i.kind()!==P.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){a.get(e.key())}),a.types().forEach(function(e){return n.add(e)});var r=e.childWithKey("annotationTypes");return r&&r.kind()===P.ARRAY&&(r=s(r)),null!=r&&r.kind()===P.MAP&&r.children().forEach(function(e){n.addAnnotationType(v(e.key(),e,a,!1,!0,!1))}),n}function l(e,t){var n=new D,r=!1,i=e.childWithKey("required");if(i){var o=i.value();"boolean"==typeof o&&(r=!0),o===!1&&(n.optional=!0,n.id=e.key())}var s=e.key();return!r&&a(e.key())&&(s=s.substr(0,s.length-1),n.optional=!0),0==s.length||"/.*/"===s?n.additonal=!0:"/"==s.charAt(0)&&"/"==s.charAt(s.length-1)&&(s=s.substring(1,s.length-1),n.regExp=!0),n.type=v(null,e,t,!1,!1,!1),n.id=s,n}function p(e){var t=new F;t.name=e.name(),t.superTypes=e.superTypes().map(function(e){return d(e)}),t.annotations=[],t.customFacets=[],t.facetDeclarations=[],t.basicFacets=[],t.properties=[];var n={};return e.declaredMeta().forEach(function(e){if(e instanceof R.Annotation)t.annotations.push(e);else if(e instanceof R.CustomFacet)t.customFacets.push(e);else if(e instanceof R.NotScalar)t.notAScalar=!0;else if(e instanceof I.FacetDeclaration)t.facetDeclarations.push(e);else if(e instanceof b.HasProperty)if(n.hasOwnProperty(e.value()))n[e.value()].optional=!1;else{var r=new D;r.optional=!1,r.id=e.value(),r.type=E.ANY,n[e.value()]=r}else if(e instanceof b.AdditionalPropertyIs){ -var r=new D;r.optional=!1,r.id="/.*/",r.additonal=!0,r.type=e.value(),n["/.*/"]=r}else if(e instanceof b.MapPropertyIs){var r=new D;r.optional=!1,r.id=e.regexpValue(),r.regExp=!0,r.type=e.value(),n[e.regexpValue()]=r}else if(e instanceof b.PropertyIs)if(n.hasOwnProperty(e.propertyName()))n[e.propertyName()].type=e.value();else{var r=new D;r.optional=!0,r.id=e.propertyName(),r.type=e.value(),n[e.propertyName()]=r}else e instanceof b.KnownPropertyRestriction?t.additionalProperties=e.value():e instanceof R.DiscriminatorValue?e.isStrict()&&t.basicFacets.push(e):e instanceof R.HasPropertiesFacet||t.basicFacets.push(e)}),Object.keys(n).forEach(function(e){return t.properties.push(n[e])}),t}function c(e){return e instanceof _.AbstractType?p(e).toJSON():f(e)}function f(e){var t={},n={};e.types().forEach(function(e){n[e.name()]=c(e)}),Object.keys(n).length>0&&(t.types=n);var n={};return e.annotationTypes().forEach(function(e){n[e.name()]=c(e)}),Object.keys(n).length>0&&(t.annotationTypes=n),t}function d(e){if(e.isAnonymous()){if(e.isArray()){var t=e.oneMeta(b.ComponentShouldBeOfType);if(t){var n=t.value();return n.isAnonymous()&&n.isUnion()?"("+d(n)+")[]":d(n)+"[]"}}return e.isUnion()?e.options().map(function(e){return d(e)}).join(" | "):e.superTypes().map(function(e){return d(e)}).join(" , ")}return e.name()}function h(e,t){if(t===E.ANY||e===t||e.superTypes().some(function(e){return h(e,t)}))return!0;if(e.isUnion()&&e.options){var n=e.options();if(n.some(function(e){return h(e,t)}))return!0}if(t.isUnion()&&t.options){var n=t.options();if(n.some(function(t){return e==t}))return!0}return!1}function m(e,t){var n=e.requiredType(),r=e.requiredTypes();return r&&r.length>0?r.some(function(e){return h(t,e)}):h(t,n)}function y(e,t){for(var n=t.children(),r=0,i=n;r0&&O.filter(function(e){return e.length>0}).length>0)for(var F=0,B=O;F0&&(1==this.superTypes.length?e.type=this.superTypes[0]:e.type=this.superTypes),this.customFacets&&this.customFacets.forEach(function(t){return e[t.facetName()]=t.value()}),this.annotations&&this.annotations.forEach(function(t){return e["("+t.facetName()+")"]=t.value()}),this.facetDeclarations&&this.facetDeclarations.length>0){var t={};this.facetDeclarations.forEach(function(e){var n=e.facetName();e.isOptional()&&(n+="?");var r=null;r=e.type().isAnonymous()?e.type().isEmpty()?d(e.type()):p(e.type()).toJSON():d(e.type()),t[n]=r}),e.facets=t}if(this.properties&&this.properties.length>0){var n={};this.properties.forEach(function(e){var t=e.id;e.optional&&(t+="?"),e.additonal&&(t="/.*/"),e.regExp&&(t="/"+t+"/");var r=null;r=e.type.isAnonymous()?e.type.isEmpty()?d(e.type):p(e.type).toJSON():d(e.type),n[t]=r}),e.properties=n}return this.basicFacets&&this.basicFacets.forEach(function(t){e[t.facetName()]=t.value()}),1==Object.keys(e).length&&!this.notAScalar&&e.type?e.type:(void 0!==this.additionalProperties&&(e.additionalProperties=this.additionalProperties),e)},e}();t.TypeProto=F,t.toProto=p,t.storeAsJSON=c,t.parse=v},function(e,t,n){"use strict";function r(){return m?m:m=new h}var i=n(100),a=n(105),o=n(100),s=n(104),u=n(105),l=n(105),p=n(105),c=n(105),f=n(104),d=function(){function e(e,t){this._construct=e,this._constructWithValue=t}return e.prototype.isSimple=function(){return null!=this._constructWithValue},e.prototype.newInstance=function(){return this._construct()},e.prototype.createWithValue=function(e){return this._constructWithValue(e)},e.prototype.isApplicable=function(e){var t=this.newInstance(),n=t.requiredType(),r=t.requiredTypes();return r&&r.length>0?r.some(function(t){return e.isSubTypeOf(t)}):e.isSubTypeOf(n)},e.prototype.isInheritable=function(){return this.newInstance().isInheritable()},e.prototype.isConstraint=function(){return this.newInstance()instanceof i.Constraint},e.prototype.isMeta=function(){return!this.isConstraint()},e.prototype.name=function(){return this.newInstance().facetName()},e}();t.FacetPrototype=d;var h=function(){function e(){var e=this;this.constraints=[new d(function(){return new s.MinProperties(1)},function(e){return new s.MinProperties(e)}),new d(function(){return new s.MaxProperties(1)},function(e){return new s.MaxProperties(e)}),new d(function(){return new s.MinItems(1)},function(e){return new s.MinItems(e)}),new d(function(){return new s.MaxItems(1)},function(e){return new s.MaxItems(e)}),new d(function(){return new s.MinLength(1)},function(e){return new s.MinLength(e)}),new d(function(){return new s.MaxLength(1)},function(e){return new s.MaxLength(e)}),new d(function(){return new s.Minimum(1)},function(e){return new s.Minimum(e)}),new d(function(){return new f.MultipleOf(1)},function(e){return new f.MultipleOf(e)}),new d(function(){return new s.Maximum(1)},function(e){return new s.Maximum(e)}),new d(function(){return new s.Enum([""])},function(e){return new s.Enum(e)}),new d(function(){return new s.Pattern(".")},function(e){return new s.Pattern(e)}),new d(function(){return new s.Format("")},function(e){return new s.Format(e)}),new d(function(){return new s.PropertyIs("x",i.ANY)},null),new d(function(){return new s.AdditionalPropertyIs(i.ANY)},null),new d(function(){return new s.MapPropertyIs(".",i.ANY)},null),new d(function(){return new s.HasProperty("x")},null),new d(function(){return new s.UniqueItems(!0)},function(e){return new s.UniqueItems(e)}),new d(function(){return new s.ComponentShouldBeOfType(i.ANY)},null),new d(function(){return new s.KnownPropertyRestriction(!1)},function(e){return new s.KnownPropertyRestriction(e)}),new d(function(){return new s.FileTypes([""])},function(e){return new s.FileTypes(e)})],this.meta=[new d(function(){return new a.Discriminator("kind")},function(e){return new a.Discriminator(e)}),new d(function(){return new a.DiscriminatorValue("x")},function(e){return new a.DiscriminatorValue(e)}),new d(function(){return new u.Default("")},function(e){return new u.Default(e)}),new d(function(){return new c.Usage("")},function(e){return new c.Usage(e)}),new d(function(){return new u.Example("")},function(e){return new u.Example(e)}),new d(function(){return new p.Required(!0)},function(e){return new p.Required(e)}),new d(function(){return new a.Examples({})},function(e){return new a.Examples(e)}),new d(function(){return new u.Description("")},function(e){return new u.Description(e)}),new d(function(){return new u.DisplayName("")},function(e){return new u.DisplayName(e)}),new d(function(){return new o.Abstract},function(e){return new o.Abstract}),new d(function(){return new o.Polymorphic},function(e){return new o.Polymorphic}),new d(function(){return new l.XMLInfo({})},function(e){return new l.XMLInfo(e)})],this.known={},this.allPrototypes().forEach(function(t){return e.known[t.name()]=t})}return e.prototype.allPrototypes=function(){return this.meta.concat(this.constraints)},e.prototype.buildFacet=function(e,t){return this.known.hasOwnProperty(e)&&this.known[e].isSimple()?this.known[e].createWithValue(t):null},e.prototype.facetPrototypeWithName=function(e){return this.known.hasOwnProperty(e)?this.known[e]:null},e.prototype.applyableTo=function(e){return this.allPrototypes().filter(function(t){return t.isApplicable(e)})},e.prototype.allMeta=function(){return this.allPrototypes().filter(function(e){return e.isMeta()})},e}();t.Registry=h;var m;t.getInstance=r},function(e,t,n){"use strict";function r(){return S.length>0?S[S.length-1]:null}function i(e){for(var t;e;)t=e.owner(),e=t instanceof c.InheritedType?t.contextMeta():null;S.push(t)}function a(e){for(void 0===e&&(e=0);S.length>e;)S.pop()}function o(){return S.length}function s(e){return parseFloat(e)!=parseInt(e)||isNaN(e)?!1:!0}function u(e){e=e.map(function(e){return e.preoptimize()});var t=[];e.forEach(function(e){if(e instanceof m.AndRestriction){var n=e;n.options().forEach(function(e){t.push(e)})}else t.push(e)});for(var n=!0;n;){n=!1;for(var r=0;r0)&&i.length>0){var a=new c.Status(c.Status.OK,"","",this);return i.forEach(function(e){var n=c.error(f.UNKNOWN_PROPERTY,t,{propName:e});c.setValidationPath(n,{name:e}),a.addSubStatus(n)}),a}}return c.ok()},t.prototype.composeWith=function(e){if(!this._value)return null;if(e instanceof t){var n=e;if(h.isEqual(this.owner().propertySet(),n.owner().propertySet()))return n}if(e instanceof E){var r=e,i=r.value(),a=this.owner().propertySet();if(-1==a.indexOf(i))return this.nothing(r)}},t}(c.Constraint);t.KnownPropertyRestriction=A;var E=function(e){function t(t){e.call(this),this.name=t}return p(t,e),t.prototype.check=function(e){return e&&"object"==typeof e&&!Array.isArray(e)?e.hasOwnProperty(this.name)?c.ok():c.error(f.REQUIRED_PROPERTY_MISSING,this,{propName:this.name}):c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.facetName=function(){return"hasProperty"},t.prototype.value=function(){return this.name},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name)return this}return null},t}(c.Constraint);t.HasProperty=E;var T=function(e){function t(t,n,r){void 0===r&&(r=!1),e.call(this,n),this.name=t,this.type=n,this.optional=r}return p(t,e),t.prototype.matches=function(e){return e===this.name},t.prototype.path=function(){return this.name},t.prototype.check=function(e,t){if(e&&"object"==typeof e&&e.hasOwnProperty(this.name)){var n=this.validateProp(e,this.name,this.type,t);return!n.isOk()&&this.optional&&null==e[this.name]?c.ok():n}return c.ok()},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return this.name},t.prototype.propertyName=function(){return this.name},t.prototype.facetName=function(){return"propertyIs"},t.prototype.value=function(){return this.type},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name){if(-1!=this.type.typeFamily().indexOf(n.type))return n;if(-1!=n.type.typeFamily().indexOf(this.type))return this;i(e);var r=this.intersect(this.type,n.type);try{var a=r.checkConfluent();if(!a.isOk()){var o=a;return o.toRestriction()}return new t(this.name,r)}finally{this.release(r)}}}return null},t}(v);t.PropertyIs=T;var S=[];t.anotherRestrictionComponent=r,t.releaseAnotherRestrictionComponent=a,t.anotherRestrictionComponentsCount=o;var b=function(e){function t(t,n){e.call(this,n),this.regexp=t,this.type=n}return p(t,e),t.prototype.path=function(){return"/"+this.regexp+"/"},t.prototype.matches=function(e){return e.match(this.regexp)?!0:!1},t.prototype.requiredType=function(){return c.OBJECT},t.prototype.propId=function(){return"["+this.regexp+"]"},t.prototype.facetName=function(){return"mapPropertyIs"},t.prototype.value=function(){return this.type},t.prototype.regexpValue=function(){return this.regexp},t.prototype.validateSelf=function(t){var n=this.checkValue();return n?c.error(f.INVALID_REGEXP,this,{msg:n}):e.prototype.validateSelf.call(this,t)},t.prototype.checkValue=function(){try{new RegExp(this.regexp)}catch(e){return e.message}return null},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.regexp===this.regexp){if(-1!=this.type.typeFamily().indexOf(n.type))return n;if(-1!=n.type.typeFamily().indexOf(this.type))return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){var a=i;return a.toRestriction()}return new t(this.regexp,r)}finally{this.release(r)}}}return null},t.prototype.check=function(e,t){if(e&&"object"==typeof e){var n={};null!=this._owner&&this._owner.meta().filter(function(e){return e instanceof T}).forEach(function(e){n[e.propertyName()]=!0});for(var r=new c.Status(c.Status.OK,"","",this),i=0,a=Object.getOwnPropertyNames(e);i0){var a=(this.owner(),h.find(this.requiredTypes(),function(e){return n.checkOwner(e)}));a&&(i=!0)}else i=!0;var o;if(i)o=this.checkValue();else{var s=this.requiredType().name();this.requiredTypes()&&this.requiredTypes().length>0&&(s="["+this.requiredTypes().map(function(e){return e.name()}).join()+"]");var o=c.error(f.FACET_USAGE_RESTRICTION,this,{facetName:this.facetName(),typeNames:s})}if(o&&!o.isOk())return c.setValidationPath(o,{name:this.facetName()}),o;var u=[r,o].filter(function(e){return e&&!e.isOk()});if(0==u.length)return c.ok();if(1==u.length)return u[0];for(var l=c.ok(),p=0,d=u;pt)return this.createError();return c.ok()},t.prototype.createError=function(){return new y.Status(y.Status.ERROR,f.MINMAX_RESTRICTION_VIOLATION.code,this.toString(),this)},t.prototype.minValue=function(){return this._isInt?0:Number.NEGATIVE_INFINITY},t.prototype.requiredType=function(){return this._requiredType},t.prototype.checkValue=function(){return"number"!=typeof this._value?c.error(f.FACET_REQUIRE_NUMBER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.isIntConstraint()&&!s(this.value())?c.error(f.FACET_REQUIRE_INTEGER,this,{facetName:this.facetName()},c.Status.ERROR,!0):this.value()n.value()?n:this;if(n.facetName()===this._opposite)if(this.isMax()){if(n.value()>this.value())return this.nothing(e)}else if(n.value()0?new t(r):this.nothing(e,"no common file types")}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){if(!Array.isArray(this._value))return c.error(f.FILE_TYPES_SHOULD_BE_AN_ARRAY,this);for(var e=0,t=this._value;e0){var t=this.owner(),n=h.find(this.requiredTypes(),function(e){return t.isSubTypeOf(e)});if(!n){var r="["+this.requiredTypes().map(function(e){return"'"+e.name()+"'"}).join(", ")+"]";return c.error(f.ENUM_OWNER_TYPES,this,{typeNames:r},c.Status.ERROR,!0)}}if(!Array.isArray(this._value))return c.error(f.ENUM_ARRAY,this,{},c.Status.ERROR,!0);var i=c.ok();this.checkStatus=!0;try{this._value.forEach(function(t,n){var r=e.owner().validate(t);r.isOk()||(c.setValidationPath(r,{name:n}),i.addSubStatus(r))})}finally{this.checkStatus=!1}return i},t.prototype.toString=function(){var e=Array.isArray(this._value)?this._value.map(function(e){return"'"+e+"'"}).join(", "):"'"+this._value+"'";return"value should be one of: "+e},t}(N);t.Enum=V,t.optimize=u},function(e,t,n){"use strict";function r(e,t){return f.serializeToXML(e,t)}function i(e,t){if("string"==typeof e&&(t.isObject()||t.isArray()||t.isExternal()||t.isUnion())){var n=e,r=n.trim().charAt(0);if(!t.isExternal()&&("{"==r||"["==r||"null"==n.trim()))try{return JSON.parse(n)}catch(i){if(t.isObject()||t.isArray()){var a=s.error(u.CAN_NOT_PARSE_JSON,this,{msg:i.message});return a}}if("<"==r)try{var o=f.readObject(n,t),l=f.getXmlErrors(o);if(l){var p=s.error(u.INVALID_XML,null);return l.forEach(function(e){return p.addSubStatus(e)}),p}return o}catch(i){}}return t.getExtra(d.REPEAT)&&(e=[e]),e}function a(e,t,n){t?s.setValidationPath(e,{name:"examples",child:{name:n}}):s.setValidationPath(e,{name:"examples",child:{name:n,child:{name:"value"}}})}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(100),u=s.messageRegistry,l=n(100),p=n(104),c=n(182),f=n(144),d=n(101),h=function(e){function t(t,n,r){void 0===r&&(r=!1),e.call(this,r),this._name=t,this._value=n}return o(t,e),t.prototype.value=function(){return this._value},t.prototype.requiredType=function(){return s.ANY},t.prototype.facetName=function(){return this._name},t.prototype.kind=function(){return null},t}(s.TypeInformation);t.MetaInfo=h;var m=function(e){function t(t){e.call(this,"description",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.Description},t}(h);t.Description=m;var y=function(e){function t(){e.call(this,"notScalar",!0)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.NotScalar},t}(h);t.NotScalar=y;var v=function(e){function t(t){e.call(this,"displayName",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.DisplayName},t}(h);t.DisplayName=v;var g=function(e){function t(t){e.call(this,"usage",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.Usage},t}(h);t.Usage=g;var A=function(e){function t(t,n){e.call(this,t,n)}return o(t,e),t.prototype.validateSelf=function(t,n){void 0===n&&(n=!1);var r=t.get(this.facetName());if(!r)return s.error(u.UNKNOWN_ANNOTATION,this,{facetName:this.facetName()});var i=s.ok(),a=this.value();a||r.isString()&&(a="");var o=r.metaOfType(w),l=n?"Example":"TypeDeclaration";if(o.length>0){var p=[],c=o.filter(function(e){var t=e.value();return Array.isArray(t)?(p=p.concat(t),t.indexOf(l)>=0):(p.push(t),t==l)});if(0==c.length){var f=p.map(function(e){return"'"+e+"'"}).join(", "),d=s.error(u.INVALID_ANNOTATION_LOCATION,this,{aName:e.prototype.facetName.call(this),aValues:f});i.addSubStatus(d)}}var h=r.validateDirect(a,!0,!1);if(!h.isOk()){var m=s.error(u.INVALID_ANNOTATION_VALUE,this,{msg:h.getMessage()});m.addSubStatus(h),i.addSubStatus(m)}return s.setValidationPath(i,{name:"("+this.facetName()+")"}),i},t.prototype.kind=function(){return d.MetaInformationKind.Annotation},t.prototype.ownerFacet=function(){return this._ownerFacet},t.prototype.setOwnerFacet=function(e){this._ownerFacet=e},t}(h);t.Annotation=A;var E=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this,t,n,!0),this.name=t,this._type=n,this.optional=r,this.builtIn=i}return o(t,e),t.prototype.actualName=function(){return"?"==this.name.charAt(this.name.length-1)?this.name.substr(0,this.name.length-1):this.name},t.prototype.isOptional=function(){return this.optional},t.prototype.type=function(){return this._type},t.prototype.kind=function(){return d.MetaInformationKind.FacetDeclaration},t.prototype.isBuiltIn=function(){return this.builtIn},t}(h);t.FacetDeclaration=E;var T=function(e){function t(t,n){e.call(this,t,n,!0)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.CustomFacet},t}(h);t.CustomFacet=T;var S=[{propName:"strict",propType:"boolean",messageEntry:u.STRICT_BOOLEAN},{propName:"displayName",propType:"string",messageEntry:u.DISPLAY_NAME_STRING},{propName:"description",propType:"string",messageEntry:u.DESCRIPTION_STRING}],b=function(e){function t(t){e.call(this,"example",t)}return o(t,e),t.prototype.validateSelf=function(e){var t=s.ok();t.addSubStatus(this.validateValue(e));var n=this.validateAnnotations(e);return s.setValidationPath(n,{name:this.facetName()}),t.addSubStatus(n),t},t.prototype.validateValue=function(e){var t=this.value(),n=!1,r=s.ok();if("object"==typeof t&&t&&t.value){for(var a=0,o=S;a2&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)}),i=0,a=r;i0&&h.forEach(function(e){return p[e.value()]=!0})}var m=e[o];if(!p[m]){var y=s.error(l.Status.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:r.name(),value:m,propName:o},l.Status.WARNING);return s.setValidationPath(y,{name:o,child:n}),y}return s.ok()}var v=s.error(l.Status.CODE_MISSING_DISCRIMINATOR,this,{rootType:r.name(),propName:o});return s.setValidationPath(v,n),v}return s.ok()},t.prototype.facetName=function(){return"discriminatorValue"},t.prototype.validateSelf=function(t){var n=e.prototype.validateSelf.call(this,t);if(this.strict){var r=this.owner().oneMeta(C);if(this.owner().isSubTypeOf(s.OBJECT))if(this.owner().getExtra(s.GLOBAL)===!1)n.addSubStatus(s.error(u.DISCRIMINATOR_FOR_INLINE,this));else if(r){var i=c.find(this.owner().meta(),function(e){return e instanceof p.PropertyIs&&e.propertyName()==r.value()});if(i){var a=i.value().validate(this.value());a.isOk()||n.addSubStatus(s.error(u.INVALID_DISCRIMINATOR_VALUE,this,{msg:a.getMessage()}))}}else n.addSubStatus(s.error(u.DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR,this));else n.addSubStatus(s.error(u.DISCRIMINATOR_FOR_OBJECT,this))}return n.getValidationPath()||s.setValidationPath(n,{name:this.facetName()}),n},t.prototype.requiredType=function(){return s.OBJECT},t.prototype.value=function(){return this._value},t.prototype.kind=function(){return d.MetaInformationKind.DiscriminatorValue},t.prototype.isStrict=function(){return this.strict},t}(s.Constraint);t.DiscriminatorValue=L},function(e,t,n){"use strict";function r(e){o=e}function i(e,t,n){void 0===n&&(n=null);var r=null;if(e.getExtra(h))return e.getExtra(h);if(!e){var m=t("any");m||(r=new u.StructuredType(e.name()))}if(e.isBuiltin()){var y="any"!=e.name()&&"array"!=e.name()?t(e.name()):null;r=y?y:e.isScalar()?new u.ValueType(e.name(),null):new u.StructuredType(e.name())}else if(e.isObject())r=new u.StructuredType(e.name(),null);else if(e.isArray()){var v=new u.Array(e.name(),null);r=v,e.putExtra(h,r);var g=e.oneMeta(p.ComponentShouldBeOfType),A=g?g.value():s.ANY;v.setComponent(i(A,t))}else if(e instanceof s.UnionType){var E=new u.Union(e.name(),null);0==e.superTypes().length&&E._superTypes.push(i(s.UNION,t,n)),e.putExtra(h,E),e.options().forEach(function(n){if(null==E.left)E.left=i(n,t);else if(null==E.right)E.right=i(n,t);else{var r=new u.Union(e.name(),null);r.left=E.right,r.right=i(n,t),E.right=r}}),r=E}else if(e.isScalar())r=new u.ValueType(e.name(),null);else if(e instanceof s.ExternalType){var T=e,S=new u.ExternalType(T.name());S.schemaString=T.schema(),r=S}if(r||(r=new u.StructuredType(e.name())),e.superTypes().forEach(function(e){var n=i(e,t);e.isBuiltin()?r._superTypes.push(n):r.addSuperType(n)}),e.isEmpty()){if(e.isArray()&&1==e.superTypes().length&&e.superTypes()[0].isAnonymous()){var b=r.superTypes()[0];b.setName(e.name()),b._subTypes=b._subTypes.filter(function(e){return e!=r}),r=b}if(e.isUnion()&&1==e.superTypes().length&&e.superTypes()[0].isAnonymous()){var b=r.superTypes()[0];b.setName(e.name()),b._subTypes=b._subTypes.filter(function(e){return e!=r}),r=b}}e.putExtra(h,r);var _=l.toProto(e);_.properties.forEach(function(e){var n=e.regExp?"/"+e.id+"/":e.id,a=o?o(n):new u.Property(n);a.withDomain(r),a.withRange(i(e.type,t)),e.optional||a.withRequired(!0),e.regExp&&a.withKeyRegexp(n)}),_.facetDeclarations.filter(function(e){return!e.isBuiltIn()}).forEach(function(e){var n=o?o(e.facetName()):new u.Property(e.facetName());n.withRange(i(e.type(),t)),r.addFacet(n)}),e.customFacets().forEach(function(e){r.fixFacet(e.facetName(),e.value())});for(var N={example:!0,examples:!0},w=e.meta().filter(function(t){if(!(t instanceof f.Discriminator||t instanceof f.DiscriminatorValue)){if(!(t instanceof p.FacetRestriction||t instanceof f.MetaInfo||t instanceof p.KnownPropertyRestriction))return!1;if(t instanceof f.FacetDeclaration||t instanceof f.CustomFacet)return!1}var n=t.requiredType(),r=n.isUnion()?n.allOptions():[n];if(!d.some(r,function(t){return e.isSubTypeOf(t)}))return!1;var i=t.facetName();return N[i]?!1:"discriminatorValue"==i?t.isStrict():"allowedTargets"==i?!0:null!=c.getInstance().facetPrototypeWithName(i)}),R=0,I=w;R0&&this.superTypes().forEach(function(r){r instanceof t&&r.allFacets(e).forEach(function(e){return n[e.nameId()]=e})}),this._facets.forEach(function(e){return n[e.nameId()]=e}),this._allFacets=Object.keys(n).map(function(e){return n[e]}),this._allFacets},t.prototype.facets=function(){return[].concat(this._facets)},t.prototype.facet=function(e){return s.find(this.allFacets(),function(t){return t.nameId()==e})},t.prototype.typeId=function(){return this.nameId()},t.prototype.allProperties=function(e){if(void 0===e&&(e={}),this._props)return this._props;if(e[this.typeId()])return[];e[this.typeId()]=this;var n={};this.superTypes().length>0&&this.superTypes().forEach(function(r){r instanceof t?r.allProperties(e).forEach(function(e){return n[e.nameId()]=e}):r.allProperties().forEach(function(e){return n[e.nameId()]=e})});for(var r in this.fixedFacets())delete n[r];return this.properties().forEach(function(e){return n[e.nameId()]=e}),this._props=Object.keys(n).map(function(e){return n[e]}),this._props},t.prototype.property=function(e){return s.find(this.allProperties(),function(t){return t.nameId()==e})},t.prototype.hasValueTypeInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasValueTypeInHierarchy()}finally{t.uc=!1}})},t.prototype.isAnnotationType=function(){return!1},t.prototype.hasStructure=function(){return!1},t.prototype.key=function(){return this._key?this._key:this._universe&&(this._key=this.universe().matched()[this.nameId()],!this._key)?null:this._key},t.prototype.hasArrayInHierarchy=function(){var e=null!=s.find(this.allSuperTypes(),function(e){return e instanceof T});return e},t.prototype.arrayInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof T&&(t=e)}),t},t.prototype.unionInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof E&&(t=e)}),t},t.prototype.hasExternalInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e instanceof S}finally{t.uc=!1}})},t.prototype.hasUnionInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasUnionInHierarchy()}finally{t.uc=!1}})},t.prototype.fixFacet=function(e,t,n){void 0===n&&(n=!1),n?this._fixedBuildInFacets[e]=t:this._fixedFacets[e]=t},t.prototype.getFixedFacets=function(){return this.fixedFacets()},t.prototype.fixedFacets=function(){return this.collectFixedFacets(!1)},t.prototype.fixedBuiltInFacets=function(){return this.collectFixedFacets(!0)},t.prototype.collectFixedFacets=function(e){for(var t=e?this._fixedBuildInFacets:this._fixedFacets,n={},r=0,i=Object.keys(t);r0&&!n.hideProperties&&(a+=e+i+"Properties:\n",u.forEach(function(n){var r="",o=n.range();o instanceof p&&(r+=o.nameId()),o instanceof t&&(r+="[",r+=o.getTypeClassName(),r+="]"),a+=e+i+i+n.nameId()+" : "+r+"\n"}));var l=this.superTypes(),c=l;return l&&!n.printStandardSuperclasses&&(c=s.filter(l,function(e){var n=e instanceof p?e.nameId():"",i=e instanceof t?e.getTypeClassName():"";return!r.isStandardSuperclass(n,i)})),c&&c.length>0&&(a+=e+i+"Super types:\n",c.forEach(function(t){a+=t.printDetails(e+i+i,{hideProperties:n.hideSuperTypeProperties,hideSuperTypeProperties:n.hideSuperTypeProperties,printStandardSuperclasses:n.printStandardSuperclasses})})),a},t.prototype.getTypeClassName=function(){return this.constructor.toString().match(/\w+/g)[1]},t.prototype.isStandardSuperclass=function(e,t){return"TypeDeclaration"===e&&"NodeClass"===t?!0:"ObjectTypeDeclaration"===e&&"NodeClass"===t?!0:"RAMLLanguageElement"===e&&"NodeClass"===t?!0:!1},t.prototype.examples=function(e){return m.exampleFromNominal(this,e)},t.prototype.isGenuineUserDefinedType=function(){if(this.buildIn)return!1;if(this.properties()&&this.properties().length>0)return!0;var e=this.fixedFacets();if(e&&Object.keys(e).length>0)return!0;var t=this.fixedBuiltInFacets();return t&&Object.keys(t).length>0?!0:this.isTopLevel()&&this.nameId()&&this.nameId().length>0},t.prototype.genuineUserDefinedTypeInHierarchy=function(){if(this.isGenuineUserDefinedType())return this;var e=null,t=this.allSuperTypes();return t.forEach(function(t){!e&&t.isGenuineUserDefinedType()&&(e=t)}),e},t.prototype.hasGenuineUserDefinedTypeInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.isGenuineUserDefinedType()}finally{t.uc=!1}})},t.prototype.customProperties=function(){return[].concat(this._customProperties)},t.prototype.allCustomProperties=function(){var e=[];return this.superTypes().forEach(function(t){return e=e.concat(t.allCustomProperties())}),e=e.concat(this.customProperties())},t.prototype.registerCustomProperty=function(e){if(e.domain()!=this)throw new Error("Should be already owned by this");if(-1!=this._customProperties.indexOf(e))throw new Error("Already included");this._customProperties.push(e)},t.prototype.setCustom=function(e){this._isCustom=e},t.prototype.isCustom=function(){return this._isCustom},t.prototype.isUnion=function(){return!1},t.prototype.union=function(){return null},t.prototype.isExternal=function(){return!1},t.prototype.external=function(){return null},t.prototype.isArray=function(){return!1},t.prototype.isObject=function(){if("object"==this.nameId())return!0;for(var e=0,t=this.allSuperTypes();e0&&"{"==e.trim().charAt(0),r=C(t,e),i=T?_.getValue(r):!1;if(i)return i;try{var a=new R(e,t);return T&&_.setValue(r,a),a}catch(o){if(T&&y.ValidationError.isInstance(o)&&n)return _.setValue(r,o),o;try{var a=new M(e,t);return _.setValue(r,a),a}catch(o){if(T){var s=new y.ValidationError(v.messageRegistry.CAN_NOT_PARSE_SCHEMA);return _.setValue(r,s),s}}}}function o(e,t,n){null==n&&(n=s(e)),n.length>0&&(n+=":");for(var r=e.getElementsByTagName(n+t),i=[],a=0;as&&(s=e.length);var u=e.substring(r).trim(),l=u.indexOf("<");0>l?l=0:l++;var p=u.indexOf("\n");0>p&&(p=u.length);var c=u.lastIndexOf("at",p);0>c?c=p:c+="at".length;var f=u.lastIndexOf(">",c);0>f&&(f=c);var d=u.substring(l,f),h=u.substring(c,p).trim(),m=h.indexOf(":");try{var g=parseInt(h.substring(0,m))-1,A=parseInt(h.substring(m+1,h.length))-1,E=n+" '"+d+"'",T=new y.ValidationError(i,{msg:E});return T.internalRange={start:{line:g,column:A,position:null},end:{line:g,column:A+d.length,position:null}},T}catch(S){}}return new y.ValidationError(v.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e})}function l(e,t,n){if(!n||"string"!=typeof n)return null;t=t||g(e,{verbose:!0}),"#"==n.charAt(0)&&(n=n.substring(1)),"/"==n.charAt(0)&&(n=n.substring(1));var r=t;if(n.length>0)for(var i=n.split("/"),a=0,o=i;aS&&this.last;){var r=this.last.key;delete this.errors[r],this.size-=r.length,this.last=this.last.next}},e}(),_=new b;e.cleanCache=function(){_=new b};var N=function(){function e(){}return e.prototype.contextPath=function(){return""},e.prototype.normalizePath=function(e){return""},e.prototype.content=function(e){return""},e.prototype.hasAsyncRequests=function(){return!1},e.prototype.resolvePath=function(e,t){return""},e.prototype.isAbsolutePath=function(e){return!1},e.prototype.contentAsync=function(e){var t=this;return{then:function(n){return n(t.content(e))},resolve:function(){return null}}},e.prototype.promiseResolve=function(e){return{then:function(t){return t(e)},resolve:function(){return null}}},e}(),w=function(e,t,n){return"__EXAMPLE_"+e+t+n},R=function(){function e(e,t){if(this.schema=e,this.provider=t,this.EXAMPLE_ERROR_ENTRY=v.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,this.SCHEMA_ERROR_ENTRY=v.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,t?this.provider=t:this.provider=new N,!e||0==e.trim().length||"{"!=e.trim().charAt(0))throw new y.ValidationError(v.messageRegistry.INVALID_JSON_SCHEMA);c(e,!1);var r=JSON.parse(e);if(r){try{var i=n(186);this.setupId(r,this.provider.contextPath());var a=""+r.$schema;-1==a.indexOf("http://json-schema.org/draft-04/")?r=i.v4(r):this.fixRequired(r)}catch(o){throw new y.ValidationError(v.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:o.message})}delete r.$schema,this.jsonSchema=r}}return e.prototype.fixRequired=function(e){},e.prototype.getType=function(){return"source.json"},e.prototype.validateObject=function(e){this.validate(JSON.stringify(e))},e.prototype.getMissingReferences=function(e,t){var n=this;void 0===t&&(t=!1);var r=[],i=h.getValidator();e.forEach(function(e){return i.setRemoteReference(e.reference,e.content||{})});var a=null;if(this.jsonSchema.id&&"string"==typeof this.jsonSchema.id){a=this.jsonSchema.id;var o=a.indexOf("#");-1!=o&&(a=a.substr(0,o))}try{i.validateSchema(this.jsonSchema)}catch(s){return[]}var r=i.getMissingRemoteReferences(),u=[];return r&&(u=f.filter(r,function(e){return!i.isResourceLoaded(e)&&e!=a})),t?u.map(function(e){return n.provider.normalizePath(e)}):u},e.prototype.getSchemaPath=function(e,t){if(void 0===t&&(t=!1),!e)return"";if(!e.id)return"";var n=e.id.trim();if(n.lastIndexOf("#")!==n.length-1)return n;var r=n.substr(0,n.length-1);return t?this.provider.normalizePath(r):r},e.prototype.patchSchema=function(e){var t=this;if(!e)return e;if(!e.id)return e;var n=e.id.trim();n.lastIndexOf("#")!==n.length-1&&(n+="#",e.id=n);var r=n.substr(0,n.length-1);if(!this.provider.isAbsolutePath(r))return e;r=this.provider.normalizePath(r);var i=[];this.collectRefContainers(e,i),i.forEach(function(e){var n=e.$ref;if("string"==typeof n&&0!==n.indexOf("#")){-1===n.indexOf("#")&&(n+="#");var i=t.provider.resolvePath(r,n);e.$ref=i}})},e.prototype.removeFragmentPartOfIDs=function(e){var t=this;if(e){if(Array.isArray(e))return void e.forEach(function(e){return t.removeFragmentPartOfIDs(e)});if("object"==typeof e){var n=e.id;if(n&&"string"==typeof e.id){var r=n.indexOf("#");r>=0&&(n=n.substring(0,r).trim(),n?e.id=n:delete e.id)}Object.keys(e).forEach(function(n){return t.removeFragmentPartOfIDs(e[n])})}}},e.prototype.collectRefContainers=function(e,t){var n=this;Object.keys(e).forEach(function(r){return"$ref"===r?void t.push(e):void(e[r]&&"object"==typeof e[r]&&n.collectRefContainers(e[r],t))})},e.prototype.validate=function(e,t){var r=this;void 0===t&&(t=[]);var i=w(e,this.schema,this.provider.contextPath()),a=_.getValue(i);if(a){if(a instanceof Error)throw a}else{if(0==t.length&&(c(e,!0),this.jsonSchema.id)){var o=this.jsonSchema.id;if("#"==o.charAt(o.length-1)){var s=o.substring(0,o.length-1);t.push({reference:s,content:this.jsonSchema})}}var u=JSON.parse(e),l=h.getValidator();t.forEach(function(e){return l.setRemoteReference(e.reference,e.content)}),l.validate(u,this.jsonSchema);var p=l.getMissingRemoteReferences().filter(function(e){return!f.find(t,function(t){return e===t.reference})});if(!p||0===p.length)return void this.acceptErrors(i,l.getLastErrors(),e,!0);var d=[];p.forEach(function(e){var t,i={reference:e};try{var a=n(186),o=r.provider.content(e);c(o,!0);var s=JSON.parse(o);r.setupId(s,r.provider.normalizePath(e)),t=a.v4(s),delete t.$schema,i.content=t}catch(u){if(y.ValidationError.isInstance(u))throw u.filePath=e,u;i.error=u}finally{d.push(i)}}),this.provider.hasAsyncRequests()||(d.forEach(function(e){t.push(e)}),this.validate(e,t))}},e.checkIfNonObjectAssignmentFailure=function(e){var t="__$validated",n="called on non-object";if(!e)return null;if(-1!=e.indexOf(t)){var r="Cannot assign to read only property '__$validated' of ",i="Cannot create property '__$validated' on string '";return 0==e.indexOf(r)&&e.length>r.length?e.substr(r.length,e.length-r.length):0==e.indexOf(i)&&e.length>i.length+1&&"'"==e.charAt(e.length-1)?e.substr(i.length,e.length-i.length-1):""}return-1!=e.indexOf(n)?"":null},e.prototype.validateSelf=function(t){var r=this;void 0===t&&(t=[]);var i=w("__SCHEMA_VALIDATION__",this.schema,this.provider.contextPath()),a=_.getValue(i);if(a){if(a instanceof Error)throw a}else{var o=h.getValidator();if(0==t.length&&this.jsonSchema.id){var s=this.jsonSchema.id;if("#"==s.charAt(s.length-1)){var u=s.substring(0,s.length-1);t.push({reference:u,content:this.jsonSchema})}}t.forEach(function(e){return o.setRemoteReference(e.reference,e.content)});try{o.validateSchema(this.jsonSchema)}catch(a){var l=e.checkIfNonObjectAssignmentFailure(a.message);if(null!==l){var p=l,d="Assignment to non-object.";p&&(d="Unexpected value '"+p+"'"),this.acceptErrors(i,[{message:d,params:[]}],null,!0,!0)}throw a}var m=o.getMissingRemoteReferences().filter(function(e){return!f.find(t,function(t){return e===t.reference})});if(!m||0===m.length)return void this.acceptErrors(i,o.getLastErrors(),null,!0,!0);var v=[];m.forEach(function(e){var t,i={reference:e};try{var a=n(186),o=r.provider.content(e);c(o,!0);var s=JSON.parse(o);r.setupId(s,r.provider.normalizePath(e)),t=a.v4(s),delete t.$schema,i.content=t}catch(u){if(y.ValidationError.isInstance(u))throw u.filePath=e,u;i.error=u}finally{v.push(i)}}),this.provider.hasAsyncRequests()||(v.forEach(function(e){t.push(e)}),this.validateSelf(t))}},e.prototype.setupId=function(e,t){if(t&&e){if(this.removeFragmentPartOfIDs(e),e.id)return e.id=e.id.trim(),void(e.id.indexOf("#")<0&&(e.id=e.id+"#"));e.id=t.replace(/\\/g,"/")+"#",this.patchSchema(e)}},e.prototype.acceptErrors=function(t,n,r,i,a){var o=this;void 0===i&&(i=!1),void 0===a&&(a=!1);var s=null!=r,u=null!=r?r:this.schema;if(n&&n.length>0){var p=g(u,{verbose:!0}),c=n.map(function(t){var n,i=s&&e.EXAMPLE_ERROR_CODES[t.code];n=i?o.EXAMPLE_ERROR_ENTRY:o.SCHEMA_ERROR_ENTRY;var c=new y.ValidationError(n,{msg:t.message});return(i||null==r)&&(c.internalRange=l(u,p,t.path)),c.isWarning=a,c.error=t,c.internalPath=t.path,c}),f=c[0];if(f.additionalErrors=c.slice(1),_.setValue(t,f),i)throw f}else _.setValue(t,1)},e.prototype.contentAsync=function(e){var t,r=this,i=n(186),a=this.provider.contentAsync(e);if(!a)return this.provider.promiseResolve({reference:e,content:null,error:new y.ValidationError(v.messageRegistry.REFERENCE_NOT_FOUND,{ref:e})});var o=a.then(function(n){var a={reference:e};try{var o=JSON.parse(n);r.setupId(o,r.provider.normalizePath(e)),t=i.v4(o),delete t.$schema,a.content=t}catch(s){a.error=s}return a});return o},e.SCHEMA_ERROR_CODES={KEYWORD_TYPE_EXPECTED:!0,KEYWORD_MUST_BE:!0,KEYWORD_DEPENDENCY:!0,KEYWORD_PATTERN:!0,KEYWORD_UNDEFINED_STRICT:!0,KEYWORD_VALUE_TYPE:!0,CUSTOM_MODE_FORCE_PROPERTIES:!0,UNKNOWN_FORMAT:!0,PARENT_SCHEMA_VALIDATION_FAILED:!0,REF_UNRESOLVED:!0,KEYWORD_UNEXPECTED:!0,SCHEMA_NOT_AN_OBJECT:!0,SCHEMA_NOT_REACHABLE:!0,UNRESOLVABLE_REFERENCE:!0},e.EXAMPLE_ERROR_CODES={MULTIPLE_OF:!0,MAXIMUM:!0,MAXIMUM_EXCLUSIVE:!0,MAX_LENGTH:!0,MIN_LENGTH:!0,PATTERN:!0,ARRAY_ADDITIONAL_ITEMS:!0,ARRAY_LENGTH_LONG:!0,ARRAY_LENGTH_SHORT:!0,ARRAY_UNIQUE:!0,OBJECT_PROPERTIES_MAXIMUM:!0,OBJECT_PROPERTIES_MINIMUM:!0,OBJECT_MISSING_REQUIRED_PROPERTY:!0,OBJECT_ADDITIONAL_PROPERTIES:!0,OBJECT_DEPENDENCY_KEY:!0,ENUM_MISMATCH:!0,ANY_OF_MISSING:!0,ONE_OF_MISSING:!0,ONE_OF_MULTIPLE:!0,NOT_PASSED:!0,INVALID_FORMAT:!0,UNKNOWN_FORMAT:!0,INVALID_TYPE:!0},e}();t.JSONSchemaObject=R;var I=10,M=function(){function e(e,t){if(this.schema=e,this.provider=t,this.extraElementData=null,this.references={},this.contentToResult={},t||(this.provider=new N),"<"!=e.charAt(0))throw new y.ValidationError(v.messageRegistry.INVALID_XML_SCHEMA);this.schemaString=this.handleReferenceElement(e)}return e.prototype.getType=function(){return"text.xml"},e.prototype.validateObject=function(e){if(this.extraElementData){var t=Object.keys(e)[0],n=new y.ValidationError(v.messageRegistry.EXTERNAL_TYPE_ERROR,{typeName:this.extraElementData.requestedName,objectName:t});if(!this.extraElementData.type&&!this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.originalName&&t!==this.extraElementData.originalName)return void this.acceptErrors("key",[n],!0);if(this.extraElementData.type){var r=e[t];delete e[t],e[this.extraElementData.name]=r}}this.validate(d.jsonToXml(e))},e.prototype.collectReferences=function(e,t,n){var r,i=this;r=new m(E).parseFromString(e);var a=o(r,"schema",this.namspacePrefix)[0],s=o(a,"import",this.namspacePrefix),u=o(a,"include",this.namspacePrefix),l=s.concat(u);return l.forEach(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a];if(!o){var s,u=Object.keys(n).length,l=i.provider.content(a);try{s=i.collectReferences(l,a,n)}catch(p){s=l}o=d.createXmlSchemaReference(a,u,s),n[a]=o}e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd")}}),r.toString()},e.prototype.getMissingReferences=function(){var e,t=this;e=new m(E).parseFromString(this.schemaString);var n=o(e,"schema",this.namspacePrefix)[0],r=o(n,"import",this.namspacePrefix),i=o(n,"include",this.namspacePrefix),a=r.concat(i),s=[];return a.forEach(function(e){var n=e.getAttribute("schemaLocation");if(n){var r=t.provider.resolvePath(t.provider.contextPath(),n);s.push(r)}}),s},e.prototype.collectReferencesAsync=function(e,t,n){var r,i=this;r=new m(E).parseFromString(e);var a=o(r,"schema",this.namspacePrefix)[0],s=o(a,"import",this.namspacePrefix),u=o(a,"include",this.namspacePrefix),l=s.concat(u);return Promise.all(l.map(function(e){var r=e.getAttribute("schemaLocation");if(r){var a=i.provider.resolvePath(t,r),o=n[a];return o?(e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}):i.provider.contentAsync(a).then(function(t){return i.collectReferencesAsync(t,a,n).then(function(e){return e},function(e){return t}).then(function(t){var r=Object.keys(n).length;return o=d.createXmlSchemaReference(a,r,t),n[a]=o,e.setAttribute("schemaLocation","file_"+o.virtualIndex+".xsd"),{}})})}return{}})).then(function(e){return Promise.resolve(r.toString())})},e.prototype.loadSchemaReferencesAsync=function(){return this.collectReferencesAsync(this.schemaString,this.provider.contextPath(),{})},e.prototype.validate=function(e){try{var t=this.contentToResult[e];if(t===!1)return;if(t)throw t;var n={},r=this.collectReferences(this.schemaString,this.provider.contextPath(),n),i=d.getValidator(r);if(this.provider.hasAsyncRequests())return;var a=i.validate(e,Object.keys(n).map(function(e){return n[e]}));this.acceptErrors("key",a,!0),this.contentToResult[e]=!1,Object.keys(this.contentToResult).length>I&&(this.contentToResult={})}catch(o){throw this.contentToResult[e]=o,o}},e.prototype.handleReferenceElement=function(e){var t=new m(E).parseFromString(e);this.namspacePrefix=s(t);var n=o(t,"schema",this.namspacePrefix)[0],r=o(n,"element",this.namspacePrefix),i=f.find(r,function(e){return"true"===e.getAttribute("extraelement")});if(!i)return e;var a={};return a.name=i.getAttribute("name"),a.type=i.getAttribute("type"),a.originalName=i.getAttribute("originalname"),a.requestedName=i.getAttribute("requestedname"),a.type||n.removeChild(i),i.removeAttribute("originalname"),i.removeAttribute("requestedname"),i.removeAttribute("extraelement"),this.extraElementData=a,t.toString()},e.prototype.acceptErrors=function(e,t,n){if(void 0===n&&(n=!1),t&&t.length>0){var r=t.map(function(e){return e.message}).join(", "),i=new y.ValidationError(v.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,{msg:r});if(i.errors=t,_.setValue(e,i),n)throw i}else;},e}();t.XMLSchemaObject=M,t.getJSONSchema=r;var C=function(e,t){var n="";e&&(n=e.contextPath());var r="__SCHEMA_"+t+n;return r};t.getXMLSchema=i,t.createSchema=a;var L="Cannot tokenize symbol",P="Unexpected token";t.messageToValidationError=u,t.getJSONRange=l,t.tryParseJSON=c}).call(t,function(){return this}())},function(e,t,n){function r(e){if(k&&w){var t,n=k(e);for(t=0;tI)throw new RangeError("Array too large for polyfill");var n;for(n=0;n>n}function o(e,t){var n=32-t;return e<>>n}function s(e){return[255&e]}function u(e){return a(e[0],8)}function l(e){return[255&e]}function p(e){return o(e[0],8)}function c(e){return e=U(Number(e)),[0>e?0:e>255?255:255&e]}function f(e){return[e>>8&255,255&e]}function d(e){return a(e[0]<<8|e[1],16)}function h(e){return[e>>8&255,255&e]}function m(e){return o(e[0]<<8|e[1],16)}function y(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function v(e){return a(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function g(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function A(e){return o(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function E(e,t,n){function r(e){var t=P(e),n=e-t;return.5>n?t:n>.5?t+1:t%2?t+1:t}var i,a,o,s,u,l,p,c=(1<e?1:0):0===e?(a=0,o=0,i=1/e===-(1/0)?1:0):(i=0>e,e=L(e),e>=x(2,1-c)?(a=D(P(O(e)/C),1023),o=r(e/x(2,a)*x(2,n)),o/x(2,n)>=2&&(a+=1,o=1),a>c?(a=(1<>=1;return c.reverse(),o=c.join(""),s=(1<0?u*x(2,l-s)*(1+p/x(2,n)):0!==p?u*x(2,-(s-1))*(p/x(2,n)):0>u?-0:0}function S(e){return T(e,11,52)}function b(e){return E(e,11,52)}function _(e){return T(e,8,23)}function N(e){return E(e,8,23)}var w,R=void 0,I=1e5,M=function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;return{Class:function(t){return e.call(t).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,n){return t.call(e,n)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}}(),C=Math.LN2,L=Math.abs,P=Math.floor,O=Math.log,D=Math.min,x=Math.pow,U=Math.round;w=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,n){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return M.HasProperty(n,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,n.get),M.HasProperty(n,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,n.set),M.HasProperty(n,"value")&&(e[t]=n.value),e};var k=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t,n=[];for(t in e)M.HasOwnProperty(e,t)&&n.push(t);return n};!function(){function e(e,t,o){var s;return s=function(e,t,a){var o,u,l,p;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===s)for(o=arguments[0],this.length=o.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new n(this.byteLength),this.byteOffset=0,l=0;lthis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=M.ToUint32(a),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(u=arguments[0],this.length=M.ToUint32(u.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new n(this.byteLength),this.byteOffset=0,l=0;la)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new n(this.byteLength),this.byteOffset=0}this.constructor=s,r(this),i(this)},s.prototype=new a,s.prototype.BYTES_PER_ELEMENT=e,s.prototype._pack=t,s.prototype._unpack=o,s.BYTES_PER_ELEMENT=e,s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(e=M.ToUint32(e),e>=this.length)return R;var t,n,r=[];for(t=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;t=this.length)return R;var n,r,i=this._pack(t);for(n=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length)throw new RangeError("Offset plus length of array is out of range"); -if(l=this.byteOffset+i*this.BYTES_PER_ELEMENT,p=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(c=[],o=0,s=n.byteOffset;p>o;o+=1,s+=1)c[o]=n.buffer._bytes[s];for(o=0,u=l;p>o;o+=1,u+=1)this.buffer._bytes[u]=c[o]}else for(o=0,s=n.byteOffset,u=l;p>o;o+=1,s+=1,u+=1)this.buffer._bytes[u]=n.buffer._bytes[s]}else{if("object"!=typeof arguments[0]||"undefined"==typeof arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(r=arguments[0],a=M.ToUint32(r.length),i=M.ToUint32(arguments[1]),i+a>this.length)throw new RangeError("Offset plus length of array is out of range");for(o=0;a>o;o+=1)s=r[o],this._setter(i+o,Number(s))}},s.prototype.subarray=function(e,t){function n(e,t,n){return t>e?t:e>n?n:e}e=M.ToInt32(e),t=M.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),0>e&&(e=this.length+e),0>t&&(t=this.length+t),e=n(e,0,this.length),t=n(t,0,this.length);var r=t-e;return 0>r&&(r=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)},s}var n=function(e){if(e=M.ToInt32(e),0>e)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e,this._bytes=[],this._bytes.length=e;var t;for(t=0;tthis.byteLength)throw new RangeError("Array index out of range");r+=this.byteOffset;var o,s=new t.Uint8Array(this.buffer,r,n.BYTES_PER_ELEMENT),u=[];for(o=0;othis.byteLength)throw new RangeError("Array index out of range");var s,u,l=new n([i]),p=new t.Uint8Array(l.buffer),c=[];for(s=0;sthis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=M.ToUint32(i),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");r(this)};o.prototype.getUint8=n(t.Uint8Array),o.prototype.getInt8=n(t.Int8Array),o.prototype.getUint16=n(t.Uint16Array),o.prototype.getInt16=n(t.Int16Array),o.prototype.getUint32=n(t.Uint32Array),o.prototype.getInt32=n(t.Int32Array),o.prototype.getFloat32=n(t.Float32Array),o.prototype.getFloat64=n(t.Float64Array),o.prototype.setUint8=i(t.Uint8Array),o.prototype.setInt8=i(t.Int8Array),o.prototype.setUint16=i(t.Uint16Array),o.prototype.setInt16=i(t.Int16Array),o.prototype.setUint32=i(t.Uint32Array),o.prototype.setInt32=i(t.Int32Array),o.prototype.setFloat32=i(t.Float32Array),o.prototype.setFloat64=i(t.Float64Array),t.DataView=t.DataView||o}()},function(e,t,n){t.parse=n(150),t.stringify=n(151)},function(e,t,n){"use strict";e.exports=n(152)},function(e,t,n){var r=function(){try{return n(181)}catch(e){}}();t=e.exports=n(153),t.Stream=r||t,t.Readable=t,t.Writable=n(154),t.Duplex=n(155),t.Transform=n(156),t.PassThrough=n(157)},function(e,t,n){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";function r(e){return"undefined"==typeof e||null===e}function i(e){return"object"==typeof e&&null!==e}function a(e){return Array.isArray(e)?e:r(e)?[]:[e]}function o(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;r>n;n+=1)i=a[n],e[i]=t[i];return e}function s(e,t){var n,r="";for(n=0;t>n;n+=1)r+=e;return r}function u(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.isNothing=r,t.isObject=i,t.toArray=a,t.extend=o,t.repeat=s,t.isNegativeZero=u},function(e,t,n){"use strict";var r=function(){function e(e,t){void 0===t&&(t=null),this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1)}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t;return t="JS-YAML: "+(this.reason||"(unknown reason)"),!e&&this.mark&&(t+=" "+this.mark.toString()),t},e}();e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=t?t.endPosition:e.endPosition+1,r={key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:l.MAPPING,parent:null,errors:[]};return r}function i(e,t,n,r){return{errors:[],referencesAnchor:e,value:r,startPosition:t,endPosition:n,kind:l.ANCHOR_REF,parent:null}}function a(e){return void 0===e&&(e=""),{errors:[],startPosition:-1,endPosition:-1,value:e,kind:l.SCALAR,parent:null,doubleQuoted:!1,rawValue:e}}function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:l.SEQ,parent:null}}function s(){return o()}function u(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e?e:[],kind:l.MAP,parent:null}}!function(e){e[e.SCALAR=0]="SCALAR",e[e.MAPPING=1]="MAPPING",e[e.MAP=2]="MAP",e[e.SEQ=3]="SEQ",e[e.ANCHOR_REF=4]="ANCHOR_REF",e[e.INCLUDE_REF=5]="INCLUDE_REF"}(t.Kind||(t.Kind={}));var l=t.Kind;t.newMapping=r,t.newAnchorRef=i,t.newScalar=a,t.newItems=o,t.newSeq=s,t.newMap=u},function(e,t,n){"use strict";var r=n(116),i=function(){function e(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}return e.prototype.getSnippet=function(e,t){void 0===e&&(e=0),void 0===t&&(t=75);var n,i,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(a="",o=this.position;ot/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(i,o),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},e.prototype.toString=function(e){void 0===e&&(e=!0);var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e}();e.exports=i},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(192),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n0&&"RamlWrapper"!=o&&(i=o+"."+i),n.typeArguments&&0!=n.typeArguments.length&&(i+="<"+n.typeArguments.map(function(e){return r(e)}).join(", ")+">"),t?n.nameSpace&&t[n.nameSpace]?[i]:[]:[i]}if(e.typeKind==a.TypeKind.UNION){var s=e,u=[];return s.options.forEach(function(e){return u=u.concat(r(e,t))}),u}return[]}function i(e){return o.getHelperMethods(e)}var a=n(96),o=n(174),s={RamlWrapper:!0},u=function(){function e(e,t,n,r,i){this.originalName=e,this.wrapperMethodName=t,this.returnType=n,this.args=r,this.meta=i}return e.prototype.targetWrappers=function(){var e=!0,t=[];return this.args.forEach(function(n){var i=r(n.type,s);if(0!=i.length)return e&&0==t.length?void(t=t.concat(i)):(t=[],void(e=!1))}),t},e.prototype.callArgs=function(){return this.args.map(function(e){return 0==r(e.type,s).length?e:{name:"this",type:null,optional:!1,defaultValue:void 0}})},e}();t.HelperMethod=u,t.flatten=r,t.getHelperMethods=i},function(e,t,n){"use strict";function r(e){return A.createSourceFile("sample.ts",e,A.ScriptTarget.ES3,!0)}function i(e,n,s){var u=r(e),l={classes:[],aliases:[],enumDeclarations:[],imports:{},name:s};n[s]=l;var p=null;return t.tsm.Matching.visit(u,function(r){if(r.kind==A.SyntaxKind.ModuleDeclaration){var u=r;p=u.name.text}if(r.kind==A.SyntaxKind.ImportEqualsDeclaration){var c=r,f=c.name.text;if("RamlWrapper"==f)return;var d=c.moduleReference,h=d.expression,m=h.text,v=E.resolve(E.dirname(s)+"/",m)+".ts";if(!E.existsSync(v))throw new Error("Path "+m+" resolve to "+v+"do not exists");if(!n[v]){var g=E.readFileSync(v);i(g,n,v)}l.imports[f]=n[v]}if(r.kind==A.SyntaxKind.TypeAliasDeclaration){var T=r;if(T.name){var _=T.name.text,N=y(T.type,s);l.aliases.push({name:_,type:N})}}if(r.kind==A.SyntaxKind.EnumDeclaration){var w=r,R=[];w.members&&w.members.forEach(function(e){R.push(e.name.text)}),w.name&&l.enumDeclarations.push({name:w.name.text,members:R})}var I=r.kind==A.SyntaxKind.InterfaceDeclaration,M=r.kind==A.SyntaxKind.ClassDeclaration;if(I||M){var C=r;if(C){var L={},P=S.classDecl(C.name.text,I);return P.moduleName=p,l.classes.push(P),C.members.forEach(function(t){if(t.kind==A.SyntaxKind.MethodDeclaration){var n=t,r=o(n,e,s);P.methods.push(r)}var i=b.doMatch(t);if(i){var u=a(i,s);if("$"==u.name)P.annotations=u.annotations;else if("$"!=u.name.charAt(0)||"$ref"==u.name)L[u.name]=u,P.fields.push(u);else{var l=u.name.substr(1),p=L[l];if(p)p.annotations=u.annotations;else if("$$"!=u.name){var c=P.annotationOverridings[l];c||(c=[]),P.annotationOverridings[l]=c.concat(u.annotations)}}}}),C.typeParameters&&C.typeParameters.forEach(function(e){P.typeParameters.push(e.name.text),null==e.constraint?P.typeParameterConstraint.push(null):P.typeParameterConstraint.push(e.constraint.typeName.text)}),C.heritageClauses&&C.heritageClauses.forEach(function(e){e.types.forEach(function(t){if(e.token==A.SyntaxKind.ExtendsKeyword)P["extends"].push(y(t,s));else{if(e.token!=A.SyntaxKind.ImplementsKeyword)throw new Error("Unknown token class heritage");P["implements"].push(y(t,s))}})}),t.tsm.Matching.SKIP}}}),l}function a(e,t){return{name:e.name.text,type:y(e.type,t),annotations:"$"==e.name.text.charAt(0)?l(e.initializer):[],valueConstraint:"$"!=e.name.text.charAt(0)?u(e.initializer):null,optional:null!=e.questionToken}}function o(e,t,n){var r=e.name.text,i=t.substring(e.pos,e.end),a=[];e.parameters.forEach(function(e){a.push(s(e,t,n))});var o={returnType:y(e.type,n),name:r,start:e.pos,end:e.end,text:i,arguments:a};return o}function s(e,t,n){var r=t.substring(e.pos,e.end);return{name:e.name.text,start:e.pos,end:e.end,text:r,type:y(e.type,n)}}function u(e){return null==e?null:e.kind==A.SyntaxKind.CallExpression?{isCallConstraint:!0,value:p(e)}:{isCallConstraint:!1,value:c(e)}}function l(e){if(null==e)return[];if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var t=e,n=[];return t.elements.forEach(function(e){n.push(p(e))}),n}throw new Error("Only Array Literals supported now")}function p(e){if(e.kind==A.SyntaxKind.CallExpression){var t=e,n=f(t.expression),r={name:n,arguments:[]};return t.arguments.forEach(function(e){r.arguments.push(c(e))}),r}throw new Error("Only call expressions may be annotations")}function c(e){if(e.kind==A.SyntaxKind.StringLiteral){var t=e;return t.text}if(e.kind==A.SyntaxKind.NoSubstitutionTemplateLiteral){var n=e;return n.text}if(e.kind==A.SyntaxKind.ArrayLiteralExpression){var r=e,i=[];return r.elements.forEach(function(e){i.push(c(e))}),i}if(e.kind==A.SyntaxKind.TrueKeyword)return!0;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var a=e;return c(a.expression)+"."+c(a.name)}if(e.kind==A.SyntaxKind.Identifier){var o=e;return o.text}if(e.kind==A.SyntaxKind.FalseKeyword)return!1;if(e.kind==A.SyntaxKind.NumericLiteral){var s=e;return Number(s.text)}if(e.kind==A.SyntaxKind.BinaryExpression){var u=e;if(u.operatorToken.kind=A.SyntaxKind.PlusToken)return c(u.left)+c(u.right)}throw new Error("Unknown value in annotation")}function f(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;if(e.kind==A.SyntaxKind.PropertyAccessExpression){var t=e;return f(t.expression)+"."+f(t.name)}throw new Error("Only simple identifiers are supported now")}function d(e,t){var n=e.indexOf("."),r=-1!=n?e.substring(0,n):"",i=-1!=n?e.substring(n+1):e;return{typeName:e,nameSpace:r,basicName:i,typeKind:T.TypeKind.BASIC,typeArguments:[],modulePath:t}}function h(e){return{base:e,typeKind:T.TypeKind.ARRAY}}function m(e){return{options:e,typeKind:T.TypeKind.UNION}}function y(e,t){if(null==e)return null;if(e.kind==A.SyntaxKind.StringKeyword)return d("string",null);if(e.kind==A.SyntaxKind.NumberKeyword)return d("number",null);if(e.kind==A.SyntaxKind.BooleanKeyword)return d("boolean",null);if(e.kind==A.SyntaxKind.AnyKeyword)return d("any",null);if(e.kind==A.SyntaxKind.VoidKeyword)return d("void",null);if(e.kind==A.SyntaxKind.TypeReference){var n=e,r=d(g(n.typeName),t);return n.typeArguments&&n.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}if(e.kind==A.SyntaxKind.ArrayType){var i=e;return h(y(i.elementType,t))}if(e.kind==A.SyntaxKind.UnionType){var a=e;return m(a.types.map(function(e){return y(e,t)}))}if(e.kind==A.SyntaxKind.ExpressionWithTypeArguments){var o=e,r=d(v(o.expression),t);return o.typeArguments&&o.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}throw new Error("Case not supported: "+e.kind)}function v(e){return e.name?e.name.text:e.text}function g(e){if(e.kind==A.SyntaxKind.Identifier)return e.text;var t=e;return g(t.left)+"."+g(t.right)}var A=n(160);t.tsm=n(173),t.helperMethodExtractor=n(174);var E=n(175),T=n(96),S=n(96),b=t.tsm.Matching.field();t.parseStruct=i,t.parseArg=c,t.buildType=y},function(e,t,n){"use strict";function r(e){var t=e.oneMeta(l.Example);if(t)return t.example();if(e.getExtra(f))return null;e.putExtra(f,!0);try{var n=e.oneMeta(l.Examples);if(n){var i=n.examples();if(i&&i.length>0)return i[0]}var a=e.oneMeta(l.Default);if(a)return a.value();if(e.isObject()){var o={};return e.meta().forEach(function(e){if(e instanceof c.PropertyIs){var t=e,n=r(t.value());o[t.propertyName()]=n}}),e.superTypes().forEach(function(e){if(e.oneMeta(l.Example)||e.oneMeta(l.Examples)){var t=r(e);t&&"object"==typeof t&&Object.keys(t).forEach(function(e){o[e]=t[e]})}}),o}if(e.isArray()){var s=e.oneMeta(p.ComponentShouldBeOfType),u=[];return s&&u.push(r(s.value())),u}return e.isUnion()?r(e.typeFamily()[0]):e.isNumber()?1:e.isBoolean()?!0:"some value"}finally{e.putExtra(f,!1)}}function i(e,t){var n=e[t];return null!=n&&"object"==typeof n?n.value:n}function a(e){var t=[];if(!e||"object"!=typeof e)return t;for(var n=0,r=Object.keys(e).filter(function(e){return e.length>0&&"("==e.charAt(0)&&")"==e.charAt(e.length-1)});n0)return r;if(t&&e.isUserDefined()&&!e.isGenuineUserDefinedType()&&e.genuineUserDefinedTypeInHierarchy()){var i=e.genuineUserDefinedTypeInHierarchy(),a=i.getAdapter(u.InheritedType);if(a){var s=o(a);if(s&&s.length>0)return s}}}if(n){var l=new d(null,void 0,void 0,void 0,!1,void 0,void 0,!0);return l.setOwnerType(n),[l]}return[]}var u=n(100),l=n(105),p=n(104),c=n(104),f="exampleCalculation";t.example=r;var d=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={}}return e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){var e=this.firstCharacter();return"{"==e||"["==e},e.prototype.isXMLString=function(){var e=this.firstCharacter();return"<"==e},e.prototype.firstCharacter=function(){if(null==this._value)return null;if("string"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return"string"==typeof this._value?!(this.isJSONString()||this.isXMLString()):!0},e.prototype.asString=function(){return"string"==typeof this._value?""+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){return this._annotations},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),h=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var o;if(null!=t){var s=t.value;if(s){var u=i(t,"displayName"),l=i(t,"description"),p=i(t,"strict"),c={};a(t).forEach(function(e){c[e.facetName()]=e}),o=new d(s,n,u,l,p,c,r);for(var f=0,h=a(t.displayName);fi||i>99)&&!s.isValid(e,t)?!1:!0}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(206),u=n(100),l=u.messageRegistry,p=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){return"string"==typeof e&&r(e)?u.ok():u.error(l.INVALID_DATEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return"should be date-only"},t}(u.GenericTypeOf);t.DateOnlyR=p;var c=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n)return u.error(l.INVALID_TIMEONLY,this);var r=n[1];return i(r)?u.ok():u.error(l.INVALID_TIMEONLY,this)}return u.error(l.INVALID_TIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return"should be time-only"},t}(u.GenericTypeOf);t.TimeOnlyR=c;var f=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){if("string"==typeof e){var t=/^(\d{4}-\d{2}-\d{2})T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/,n=e.match(t);if(!n||n.length<3)return u.error(l.INVALID_DATETIMEONLY,this);var a=n[1],o=n[2];return r(a)&&i(o)?u.ok():u.error(l.INVALID_DATETIMEONLY,this)}return u.error(l.INVALID_DATETIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return"should be datetime-only"},t}(u.GenericTypeOf);t.DateTimeOnlyR=f;var d=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+\d{2}[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{4}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,h=/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\,[ ]+\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,m=/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\,[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\d{1,2}[ ]+\d{2}:\d{2}:\d{2}[ ]+GMT/,y=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.\d+)?((?:[\+\-]\d{2}:\d{2})|Z)$/,v=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){var t=u.VALIDATED_TYPE,n=!1;if(t.allFacets().forEach(function(e){"format"==e.facetName()&&"rfc2616"===e.value()&&(n=!0)}),"string"==typeof e){if(!n){var a=e.match(y);if(!a||a.length<3)return u.error(l.INVALID_RFC3339,this);var o=a[1],s=a[2];return r(o)&&i(s)?u.ok():u.error(l.INVALID_RFC3339,this)}return e.match(d)||e.match(h)||e.match(m)?u.ok():u.error(l.INVALID_RFC2616,this)}return u.error(l.INVALID_DATTIME,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return"should be datetime-only"},t}(u.GenericTypeOf);t.DateTimeR=v},function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!0);for(var i="<"+e,a=0;n>a;a++)i=" "+i;return t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(e){"string"==typeof t[e]&&(i=i+" "+e+'="'+t[e]+'"')}),i=i+">"+(r?"\n":"")}function i(e,t){void 0===t&&(t=0);for(var n="r&&r>-1;r++)n=" "+n;var n=(t>-1?"\n":"")+n+">\n";return n}function a(e,t){t=d(t);var n=M(t),a=S(t),s=r(n,o(e,a)),u={};if(u[n]=e,t.isArray()){t.meta().filter(function(e){return e instanceof x.ComponentShouldBeOfType})[0];s+=p(u,t,1,!0)}else s+=l(e,a,1);var s=s+i(n);return s}function o(e,t){var n={},r=D.filter(t,function(e){return C(e.value()).attribute});return r.forEach(function(t){var r=t.propId(),i=I(t);e[r]&&(n[i]=e[r].toString())}),n}function s(e,t,n){var a=Object.keys(e)[0],p=e[a],c=null;if(t.isScalar()){var f=S(t);c=r(a,o(p,f),n,!t.isScalar())+p.toString()}else{if(t.isUnion())return s(e,u(p,t),n);var f=S(t);c=r(a,o(p,f),n,!t.isScalar())+l(p,f,n+1)}return c+=i(a,t.isScalar()?-1:n)}function u(e,t){var n=t.typeFamily(),r=[],i=null;return n.forEach(function(t){var n=a(e,t);if(n){var i=c(n,t);if(i){var o=f(i);r.push({type:t,errors:o&&o.length||0})}}}),i=r.length>0?r[0]:{type:n[0]},r.forEach(function(e){e.errors0&&t[0].value()}function I(e){var t=C(e.value()),n=e.propId(),r=t.name||n;return t.namespace&&(r=t.namespace+":"+r),(t.prefix||"")+r}function M(e){var t=C(e),n=e.name();""===n&&e.isUnion()&&(n="object");var r=t.name||n;return(t.prefix||"")+r}function C(e){var t=e.meta().filter(function(e){return e instanceof U.XMLInfo}).map(function(e){return e})[0],n={attribute:!1,wrapped:!1,name:!1,namespace:!1,prefix:!1};if(!t)return n;var r=t.value();return r?(Object.keys(n).forEach(function(e){n[e]=r[e]||n[e]}),n):n}function L(e,t,n){if(void 0===n&&(n=[]),"object"==typeof t){var r=L(e,t._);return delete t._,T(t,n,[],[],!0),r}if(!t&&""!==t.trim())return null;if(e.isNumber()){var i=parseFloat(t);if(!isNaN(i))return i}if(e.isBoolean()){if("true"===t)return!0;if("false"===t)return!1}return"string"==typeof t?t:null}function P(e){return e?"object"==typeof e&&"number"==typeof e.length:!1}var O=n(210),D=n(182),x=n(104),U=n(105),k=n(100),F="@unexpected_root_attributes_and_elements",B=["application/x-www-form-urlencoded","application/json","application/xml","multipart/form-data"];t.serializeToXML=a,t.readObject=c,t.getXmlErrors=f},function(e,t,n){"use strict";function r(e,t,n,r){void 0===r&&(r=null);try{var i=e.trim();if(i.length>0){var o="{"==i.charAt(0);if(o||"<"==i.charAt(0)&&i.length>1&&"<"!=i.charAt(1)){var s=n,u=void 0;do u=s,s=u.childWithKey("type");while(s);var l=u&&u.contentProvider&&u.contentProvider();return new c.ExternalType("",i,o,l,r)}var f=p.parse(e),d=a(f,t);return d}return c.derive(e,[c.STRING])}catch(h){return c.derive(e,[c.UNKNOWN])}}function i(e,t){for(;e>0;){var n=c.derive("",[c.ARRAY]);n.addMeta(new f.ComponentShouldBeOfType(t)),t=n,e--}return t}function a(e,t){if("union"==e.type){var n=e;return c.union("",[a(n.first,t),a(n.rest,t)])}if("parens"==e.type){var r=e,o=a(r.expr,t);return i(r.arr,o)}var s=e;if("?"==s.value.charAt(s.value.length-1)){var u=t.get(s.value.substr(0,s.value.length-1));u||(u=c.derive(s.value,[c.UNKNOWN])),u=c.union(s.value,[u,c.NIL]);var l=s.arr;return i(l,u)}var u=t.get(s.value);u||(u=c.derive(s.value,[c.UNKNOWN]));var l=s.arr;return i(l,u)}function o(e){if(e.isSubTypeOf(c.ARRAY)){var t=e.oneMeta(f.ComponentShouldBeOfType);return t?t.value().isUnion()?"("+o(t.value())+")[]":o(t.value())+"[]":"array"}if(e instanceof c.UnionType){var n=e;return n.options().map(function(e){return o(e)}).join(" | ")}return e.isAnonymous()&&e.isEmpty()?e.superTypes().map(function(e){return o(e)}).join(" , "):e.name()}function s(e,t){if(t(e),"union"==e.type){var n=e;s(n.first,t),s(n.rest,t)}else if("parens"==e.type){var r=e;s(r.expr,t)}}function u(e){var t,n=0;if("name"==e.type){var r=e;t=r.value,n=r.arr}else if("union"==e.type){var i=e;t=u(i.first)+" | "+u(i.rest)}else if("parens"==e.type){var a=e;t="("+u(a.expr)+")",n=a.arr}for(;--n>=0;)t+="[]";return t}function l(e){return p.parse(e)}var p=n(180),c=n(100),f=n(104);t.parseToType=r,t.storeToString=o,t.visit=s,t.serializeToString=u,t.parse=l},function(e,t,n){"use strict";function r(e,t){return o.find(e,t)}function i(e,t){return o.filter(e,t)}function a(e){return o.unique(e)}var o=n(182);t.find=r,t.filter=i,t.unique=a},function(e,t,n){"use strict";function r(e,t,n){return{originalPath:e,virtualIndex:t,patchedContent:n}}function i(e){if(!e)return"";var t=Object.keys(e)[0],n=e[t];if("#text"==t)return n;if(!n&&""!==n)return"";var r="<"+t,a=n.$||{};return Object.keys(a).forEach(function(e){r=r+" "+e+'="'+a[e]+'"'}),r+=">","string"==typeof n?r+=n:Object.keys(n).forEach(function(e){if("$"!==e)if("object"!=typeof n[e]||n[e].length)if("string"!=typeof n[e]&&n[e]){if("array"==typeof n[e]||n[e].length)for(var t=n[e],a=0;a"}function a(e){return new l(e)}function o(e){var t=e&&Object.keys(e)[0];if(t){var n=e[t];s(n)}return i(e)}function s(e){if(e&&"string"!=typeof e){var t=[];Object.keys(e).forEach(function(n){if("$"!=n)if(0===n.indexOf("@")){var r={key:n,value:e[n]};t.push(r)}else if(u(e[n])){var i=e[n];i.forEach(function(e){return s(e)})}else"string"!=typeof e[n]&&s(e[n])}),e.$||(e.$={});var n=e.$;t.forEach(function(t){delete e[t.key];var r=t.key.substring(1);n[r]=t.value})}}function u(e){return e?"object"==typeof e&&"number"==typeof e.length:!1}var l;try{l=n(177).XMLValidator}catch(p){}if(!l){var c=function(){function e(e){}return e.prototype.validate=function(e,t){return[]},e}();l=c}t.createXmlSchemaReference=r,t.getValidator=a,t.jsonToXml=o},function(e,t,n){"use strict";function r(){return new i}var i;try{i=n(176).JSONValidator}catch(a){}if(!i){var o=function(){function e(){}return e.prototype.setRemoteReference=function(e,t){},e.prototype.validateSchema=function(e){},e.prototype.getMissingRemoteReferences=function(){return[]},e.prototype.isResourceLoaded=function(e){return!0},e.prototype.validate=function(e,t){},e.prototype.getLastErrors=function(){return[]},e}();i=o}t.getValidator=r},function(e,t,n){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r,i,a,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},u=function(e){throw{name:"SyntaxError",message:e,at:r,text:a}},l=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=a.charAt(r),r+=1,i},p=function(){var e,t="";for("-"===i&&(t="-",l("-"));i>="0"&&"9">=i;)t+=i,l();if("."===i)for(t+=".";l()&&i>="0"&&"9">=i;)t+=i;if("e"===i||"E"===i)for(t+=i,l(),("-"===i||"+"===i)&&(t+=i,l());i>="0"&&"9">=i;)t+=i,l();return e=+t,isFinite(e)?e:void u("Bad number")},c=function(){var e,t,n,r="";if('"'===i)for(;l();){if('"'===i)return l(),r;if("\\"===i)if(l(),"u"===i){for(n=0,t=0;4>t&&(e=parseInt(l(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof s[i])break;r+=s[i]}else r+=i}u("Bad string")},f=function(){for(;i&&" ">=i;)l()},d=function(){switch(i){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}u("Unexpected '"+i+"'")},h=function(){var e=[];if("["===i){if(l("["),f(),"]"===i)return l("]"),e;for(;i;){if(e.push(o()),f(),"]"===i)return l("]"),e;l(","),f()}}u("Bad array")},m=function(){var e,t={};if("{"===i){if(l("{"),f(),"}"===i)return l("}"),t;for(;i;){if(e=c(),f(),l(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=o(),f(),"}"===i)return l("}"),t;l(","),f()}}u("Bad object")};o=function(){switch(f(),i){case"{":return m();case"[":return h();case'"':return c();case"-":return p();default:return i>="0"&&"9">=i?p():d()}},e.exports=function(e,t){var n;return a=e,r=0,i=" ",n=o(),f(),i&&u("Syntax error"),"function"==typeof t?function s(e,n){var r,i,a=e[n];if(a&&"object"==typeof a)for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=s(a,r),void 0!==i?a[r]=i:delete a[r]);return t.call(e,n,a)}({"":n},""):n}},function(e,t,n){function r(e){return u.lastIndex=0,u.test(e)?'"'+e.replace(u,function(e){var t=l[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function i(e,t){var n,u,l,p,c,f=a,d=t[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof s&&(d=s.call(t,e,d)),typeof d){case"string":return r(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(a+=o,c=[],"[object Array]"===Object.prototype.toString.apply(d)){for(p=d.length,n=0;p>n;n+=1)c[n]=i(n,d)||"null";return l=0===c.length?"[]":a?"[\n"+a+c.join(",\n"+a)+"\n"+f+"]":"["+c.join(",")+"]",a=f,l}if(s&&"object"==typeof s)for(p=s.length,n=0;p>n;n+=1)u=s[n],"string"==typeof u&&(l=i(u,d),l&&c.push(r(u)+(a?": ":":")+l));else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(l=i(u,d),l&&c.push(r(u)+(a?": ":":")+l));return l=0===c.length?"{}":a?"{\n"+a+c.join(",\n"+a)+"\n"+f+"}":"{"+c.join(",")+"}",a=f,l}}var a,o,s,u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};e.exports=function(e,t,n){var r;if(a="",o="","number"==typeof n)for(r=0;n>r;r+=1)o+=" ";else"string"==typeof n&&(o=n);if(s=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return i("",{"":e})}},function(e,t,n){"use strict";e.exports=n(193),n(194),n(195),n(196),n(197),n(198)},function(e,t,n){(function(t){"use strict";function r(e,t){D=D||n(155),e=e||{},this.objectMode=!!e.objectMode,t instanceof D&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(O||(O=n(212).StringDecoder),this.decoder=new O(e.encoding),this.encoding=e.encoding)}function i(e){return D=D||n(155),this instanceof i?(this._readableState=new r(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void I.call(this)):new i(e)}function a(e,t,n,r,i){var a=l(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&c(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e,t){var n=null;return R.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,c(e)}}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?N(f,e):f(e))}function f(e){P("emit readable"),e.emit("readable"),A(e)}function d(e,t){t.readingMore||(t.readingMore=!0,N(h,e,t))}function h(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)n=a?r.join(""):1===r.length?r[0]:R.concat(r,i),r.length=0;else if(el&&e>u;l++){var s=r[0],c=Math.min(e-u,s.length);a?n+=s.slice(0,c):s.copy(n,u,0,c),c0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,N(S,t,e))}function S(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function b(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function _(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}e.exports=i;var N=n(209),w=n(213),R=n(97).Buffer;i.ReadableState=r;var I,M=(n(211),function(e,t){return e.listeners(t).length});!function(){try{I=n(181)}catch(e){}finally{I||(I=n(211).EventEmitter)}}();var R=n(97).Buffer,C=n(220);C.inherits=n(115);var L=n(185),P=void 0;P=L&&L.debuglog?L.debuglog("stream"):function(){};var O;C.inherits(i,I);var D,D;i.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new R(e,t),t="")),a(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return a(this,t,e,"",!0)},i.prototype.isPaused=function(){return this._readableState.flowing===!1},i.prototype.setEncoding=function(e){return O||(O=n(212).StringDecoder),this._readableState.decoder=new O(e),this._readableState.encoding=e,this};var x=8388608;i.prototype.read=function(e){P("read",e);var t=this._readableState,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return P("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):c(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&T(this),null;var r=t.needReadable;P("need readable",r),(0===t.length||t.length-e0?E(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&T(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,n){function r(e){P("onunpipe"),e===c&&a()}function i(){P("onend"),e.end()}function a(){P("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",y),e.removeListener("error",s),e.removeListener("unpipe",r),c.removeListener("end",i),c.removeListener("end",a),c.removeListener("data",o),v=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function o(t){P("ondata");var n=e.write(t);!1===n&&(1!==f.pipesCount||f.pipes[0]!==e||1!==c.listenerCount("data")||v||(P("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++),c.pause())}function s(t){P("onerror",t),p(),e.removeListener("error",s),0===M(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),p()}function l(){P("onfinish"),e.removeListener("close",u),p()}function p(){P("unpipe"),c.unpipe(e)}var c=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,P("pipe count=%d opts=%j",f.pipesCount,n);var d=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,h=d?i:a;f.endEmitted?N(h):c.once("end",h),e.on("unpipe",r);var y=m(c);e.on("drain",y);var v=!1;return c.on("data",o),e._events&&e._events.error?w(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",u),e.once("finish",l),e.emit("pipe",c),f.flowing||(P("pipe resume"),c.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var a=_(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=I.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&c(this,r):N(y,this))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!0,v(this,e)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(P("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(P("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var a=r.push(i);a||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var a=["error","close","destroy","pause","resume"];return b(a,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){P("wrapped _read",t),n&&(n=!1,e.resume())},r},i._fromList=E}).call(t,n(64))},function(e,t,n){(function(t){"use strict";function r(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function a(e,t){M=M||n(155),e=e||{},this.objectMode=!!e.objectMode,t instanceof M&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this),this.corkedRequestsFree.next=new S(this)}function o(e){return M=M||n(155),this instanceof o||this instanceof M?(this._writableState=new a(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),void R.call(this)):new o(e)}function s(e,t){var n=new Error("write after end");e.emit("error",n),b(t,n)}function u(e,t,n,r){var i=!0;if(!N.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!t.objectMode){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),b(r,a),i=!1}return i}function l(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new N(t,n)),t}function p(e,t,n,r,a){n=l(t,n,r),N.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length-1?setImmediate:b,N=n(97).Buffer;o.WritableState=a;var w=n(220);w.inherits=n(115);var R,I={deprecate:n(214)};!function(){try{R=n(181)}catch(e){}finally{R||(R=n(211).EventEmitter)}}();var N=n(97).Buffer;w.inherits(o,R);var M;a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var M;o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(e,t,n){var i=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),N.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):u(this,i,e,n)&&(i.pendingcb++,a=p(this,i,e,t,n)),a},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},o.prototype._write=function(e,t,n){n(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||T(this,r,n)}}).call(t,n(64))},function(e,t,n){"use strict";function r(e){return this instanceof r?(l.call(this,e),p.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(209),u=n(220);u.inherits=n(115);var l=n(153),p=n(154);u.inherits(r,l);for(var c=o(p.prototype),f=0;ft;t+=1)arguments[t].forEach(e);return r}var a=n(116),o=n(117),s=n(199),u=function(){function e(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=r(this,"implicit",[]),this.compiledExplicit=r(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}return e.DEFAULT=null,e.create=function(){var t,n;switch(arguments.length){case 1:t=e.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new o("Wrong number of arguments for Schema.create function")}if(t=a.toArray(t),n=a.toArray(n),!t.every(function(t){return t instanceof e}))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(e){return e instanceof s}))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new e({include:t,explicit:n})},e}();e.exports=u},function(e,t,n){"use strict";var r=n(158);e.exports=new r({include:[n(201)]})},function(e,t,n){e.exports=__WEBPACK_EXTERNAL_MODULE_160__},function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t;return t=s.exec(e),null===t?!1:!0}function i(e){var t,n,r,i,a,o,u,l,p,c,f=0,d=null;if(t=s.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(l=+t[10],p=+(t[11]||0),d=6e4*(60*l+p),"-"===t[9]&&(d=-d)),c=new Date(Date.UTC(n,r,i,a,o,u,f)),d&&c.setTime(c.getTime()-d),c}function a(e){return e.toISOString()}var o=n(199),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:a})},function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=n(199);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=l;for(n=0;i>n;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=l,o=0,u=[];for(t=0;i>t;t++)t%4===0&&t&&(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===n?(u.push(o>>10&255),u.push(o>>2&255)):12===n&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,n,r="",i=0,a=e.length,o=l;for(t=0;a>t;t++)t%3===0&&t&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s=n(97).Buffer,u=n(199),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,u=[],l=e;for(t=0,n=l.length;n>t;t+=1){if(r=l[t],a=!1,"[object Object]"!==s.call(r))return!1;for(i in r)if(o.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(e){return null!==e?e:[]}var a=n(199),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,s=e;for(a=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(r=s[t],"[object Object]"!==o.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;a[t]=[i[0],r[i[0]]]}return!0}function i(e){if(null===e)return[];var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;n>t;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var a=n(199),o=Object.prototype.toString;e.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var a=n(199),o=Object.prototype.hasOwnProperty;e.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})},function(e,t,n){"use strict";var r=n(203),i=n(204),a=n(205);e.exports={formats:a,parse:i,stringify:r}},function(e,t,n){"use strict";function r(){return!0}function i(){return void 0}function a(){return""}function o(e){return"undefined"==typeof e}var s=n(199);e.exports=new s("tag:yaml.org,2002:js/undefined",{ -kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){"use strict";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{new RegExp(t,r);return!0}catch(i){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(199);e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){e.exports=/[^\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g},function(e,t,n){e.exports=/([\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])([\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g},function(e,t,n){e.exports=/([\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([^\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g},function(e,t,n){"use strict";var r,i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(160);!function(e){function t(n,r){var i=r(n);if(i)return i==e.SKIP?null:i;var o=a.forEachChild(n,function(e){var n=t(e,r);return n?n:void 0});return o}function n(e,t){void 0===t&&(t=function(e){return!0});for(var n=e.split("."),i=null,a=0;a0&&null==n.path[n.path.length-1].arguments?(n.path[n.path.length-1].arguments=t.arguments,n.path[n.path.length-1]._callExpression=t,n):null}else if(e.kind==a.SyntaxKind.PropertyAccessExpression){var r=e,i=this.doMatch(r.expression);if(i)return r.name.kind==a.SyntaxKind.Identifier?(i.path.push(new S(r.name.text,r.name)),i):null}else if(e.kind==a.SyntaxKind.Identifier){var o=e;if(this.rootMatcher.doMatch(o))return new b(o.text,o)}return null},e.prototype.nodeType=function(){return null},e}();e.CallBaseMatcher=N,e.ident=r,e.anyNode=o,e.call=s,e.exprStmt=u,e.assign=l,e.varDecl=p,e.field=c,e.classDeclaration=f}(r=t.Matching||(t.Matching={}))},function(e,t,n){"use strict";function r(e){var t=[],n=l.readFileSync(u.resolve(e)).toString(),r=o.createSourceFile("sample.ts",n,o.ScriptTarget.ES3,!0);return s.Matching.visit(r,function(r){var s=r;if(s.kind==o.SyntaxKind.FunctionDeclaration){var u=i(s,n);if(!u)return;var l=s.name.text,f=l;u.name?f=u.name:u.name=l;var f=u.name?u.name:l,d=s.parameters?s.parameters.map(function(t){return a(t,e)}):[],h=(u.override?u.override:!1,p.buildType(s.type,e));t.push(new c.HelperMethod(l,f,h,d,u))}}),t}function i(e,t){var n=o.getLeadingCommentRanges(t,e.pos);if(!n)return null;var r=n.map(function(e){return t.substring(e.pos,e.end)}).join("\n"),i=r.indexOf("__$helperMethod__");if(0>i)return null;i+="__$helperMethod__".length;var a=r.indexOf("__$meta__");if(0>a)return{comment:f(r.substring(i))};var s=f(r.substring(i,a)),u=r.indexOf("{",a);if(0>u)return{comment:s};try{var l=JSON.parse(f(r.substring(u)));return l.comment=s.trim().length>0?s:null,l.override=l.override||!1,l.primary=l.primary||!1,l.deprecated=l.deprecated||!1,l}catch(p){console.log(p)}return{}}function a(e,t){var n,r=e.name.text,i=p.buildType(e.type,t),a=null!=e.questionToken;return null!=e.initializer&&(n=p.parseArg(e.initializer),a=!0),{name:r,type:i,defaultValue:n,optional:a}}var o=n(160),s=n(173),u=n(15),l=n(202),p=n(141),c=n(140);t.getHelperMethods=r;var f=function(e){return e.replace(/^\s*\/\*+/g,"").replace(/\*+\/\s*$/g,"").split("\n").map(function(e){return e.replace(/^\s*\/\//g,"").replace(/^\s*\* {0,1}/g,"")}).join("\n").trim()}},function(e,t,n){"use strict";function r(e,t){return s.resolve(e,t)}function i(e){return u.readFileSync(e).toString()}function a(e){return s.dirname(e)}function o(e){return u.existsSync(e)}var s=n(15),u=n(202);t.resolve=r,t.readFileSync=i,t.dirname=a,t.existsSync=o},function(e,t,n){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_176__){var r=new Error('Cannot find module "RAML.JsonValidation"');throw r.code="MODULE_NOT_FOUND",r}e.exports=__WEBPACK_EXTERNAL_MODULE_176__},function(e,t,n){if("undefined"==typeof __WEBPACK_EXTERNAL_MODULE_177__){var r=new Error('Cannot find module "RAML.XmlValidation"');throw r.code="MODULE_NOT_FOUND",r}e.exports=__WEBPACK_EXTERNAL_MODULE_177__},function(e,t,n){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,n){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,p=-7,c=n?i-1:0,f=n?-1:1,d=e[t+c];for(c+=f,a=d&(1<<-p)-1,d>>=-p,p+=s;p>0;a=256*a+e[t+c],c+=f,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=256*o+e[t+c],c+=f,p-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,r),a-=l}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,p=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,h=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+c>=1?f/u:f*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=p?(s=0,o=p):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(o=o<0;e[n+d]=255&o,d+=h,o/=256,l-=8);e[n+d-h]|=128*m}},function(e,t,n){"use strict";var r=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function t(e,n,r,i){this.message=e,this.expected=n,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function n(e){function n(t){var n,r,i=$[t];if(i)return i;for(n=t-1;!$[n];)n--;for(i=$[n],i={line:i.line,column:i.column,seenCR:i.seenCR};t>n;)r=e.charAt(n),"\n"===r?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):"\r"===r||"\u2028"===r||"\u2029"===r?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),n++;return $[t]=i,i}function r(e,t){var r=n(e),i=n(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:i.line,column:i.column}}}function i(e){G>Y||(Y>G&&(G=Y,X=[]),X.push(e))}function a(e,n,r,i){function a(e){var t=1;for(e.sort(function(e,t){return e.descriptiont.description?1:0});t1?o.slice(0,-1).join(", ")+" or "+o[e.length-1]:o[0],i=t?'"'+n(t)+'"':"end of input","Expected "+r+" but "+i+" found."}return null!==n&&a(n),new t(null!==e?e:o(n,r),n,r,i)}function o(){var t,n,r,a,u,p,c,f;return t=Y,n=l(),n!==d?(r=s(),r!==d?(a=Y,u=l(),u!==d?(124===e.charCodeAt(Y)?(p=y,Y++):(p=d,0===z&&i(v)),p!==d?(c=l(),c!==d?(f=o(),f!==d?(u=[u,p,c,f],a=u):(Y=a,a=d)):(Y=a,a=d)):(Y=a,a=d)):(Y=a,a=d),a===d&&(a=null),a!==d?(H=t,n=g(r,a),t=n):(Y=t,t=d)):(Y=t,t=d)):(Y=t,t=d),t}function s(){var t,n,r,a,s,p,c,f,h,m;if(t=Y,40===e.charCodeAt(Y)?(n=A,Y++):(n=d,0===z&&i(E)),n!==d)if(r=l(),r!==d)if(a=o(),a!==d)if(s=l(),s!==d)if(41===e.charCodeAt(Y)?(p=T,Y++):(p=d,0===z&&i(S)),p!==d){for(c=[],f=Y,h=l(),h!==d?(e.substr(Y,2)===b?(m=b,Y+=2):(m=d,0===z&&i(_)),m!==d?(h=[h,m],f=h):(Y=f,f=d)):(Y=f,f=d);f!==d;)c.push(f),f=Y,h=l(),h!==d?(e.substr(Y,2)===b?(m=b,Y+=2):(m=d,0===z&&i(_)),m!==d?(h=[h,m],f=h):(Y=f,f=d)):(Y=f,f=d);c!==d?(H=t,n=N(a,c),t=n):(Y=t,t=d)}else Y=t,t=d;else Y=t,t=d;else Y=t,t=d;else Y=t,t=d;else Y=t,t=d;return t===d&&(t=u()),t}function u(){var t,n,r,a,o,s;if(z++,t=Y,n=[],r=p(),r!==d)for(;r!==d;)n.push(r),r=p();else n=d;if(n!==d){for(r=[],a=Y,o=l(),o!==d?(e.substr(Y,2)===b?(s=b,Y+=2):(s=d,0===z&&i(_)),s!==d?(o=[o,s],a=o):(Y=a,a=d)):(Y=a,a=d);a!==d;)r.push(a),a=Y,o=l(),o!==d?(e.substr(Y,2)===b?(s=b,Y+=2):(s=d,0===z&&i(_)),s!==d?(o=[o,s],a=o):(Y=a,a=d)):(Y=a,a=d);r!==d?(H=t,n=R(n,r),t=n):(Y=t,t=d)}else Y=t,t=d;return z--,t===d&&(n=d,0===z&&i(w)),t}function l(){var t,n;for(z++,t=[],M.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=d,0===z&&i(C));n!==d;)t.push(n),M.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=d,0===z&&i(C));return z--,t===d&&(n=d,0===z&&i(I)),t}function p(){var t;return L.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=d,0===z&&i(P)),t===d&&(95===e.charCodeAt(Y)?(t=O,Y++):(t=d,0===z&&i(D)),t===d&&(45===e.charCodeAt(Y)?(t=x,Y++):(t=d,0===z&&i(U)),t===d&&(46===e.charCodeAt(Y)?(t=k,Y++):(t=d,0===z&&i(F)),t===d&&(B.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=d,0===z&&i(K)),t===d&&(V.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=d,0===z&&i(j)),t===d&&(63===e.charCodeAt(Y)?(t=W,Y++):(t=d,0===z&&i(q)))))))),t}var c,f=arguments.length>1?arguments[1]:{},d={},h={Term:o},m=o,y="|",v={type:"literal",value:"|",description:'"|"'},g=function(e,t){return t?{type:"union",first:e,rest:t[3]}:e},A="(",E={type:"literal",value:"(",description:'"("'},T=")",S={type:"literal",value:")",description:'")"'},b="[]",_={type:"literal",value:"[]",description:'"[]"'},N=function(e,t){return{type:"parens",expr:e,arr:t.length}},w={type:"other",description:"name"},R=function(e,t){return{type:"name",value:e.join(""),arr:t.length}},I={type:"other",description:"whitespace"},M=/^[ \t\n\r]/,C={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},L=/^[A-Z]/,P={type:"class",value:"[A-Z]",description:"[A-Z]"},O="_",D={type:"literal",value:"_",description:'"_"'},x="-",U={type:"literal",value:"-",description:'"-"'},k=".",F={type:"literal",value:".",description:'"."'},B=/^[a-z:#\/]/,K={type:"class",value:"[a-z]",description:"[a-z]"},V=/^[0-9]/,j={type:"class",value:"[0-9]",description:"[0-9]"},W="?",q={type:"literal",value:"?",description:'"?"'},Y=0,H=0,$=[{line:1,column:1,seenCR:!1}],G=0,X=[],z=0;if("startRule"in f){if(!(f.startRule in h))throw new Error("Can't start parsing from rule \""+f.startRule+'".');m=h[f.startRule]}if(c=m(),c!==d&&Y===e.length)return c;throw c!==d&&Y=0&&o>a;a+=e){var s=i?i[a]:a;r=n(r,t[s],s,t)}return r}return function(n,r,i,a){r=b(r,a,4);var o=!C(n)&&S.keys(n),s=(o||n).length,u=e>0?0:s-1;return arguments.length<3&&(i=n[o?o[u]:u],u+=e),t(n,r,i,o,u,s)}}function a(e){return function(t,n,r){n=_(n,r);for(var i=M(t),a=e>0?0:i-1;a>=0&&i>a;a+=e)if(n(t[a],a,t))return a;return-1}}function o(e,t,n){return function(r,i,a){var o=0,s=M(r);if("number"==typeof a)e>0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(h.call(r,o,s),S.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&s>a;a+=e)if(r[a]===i)return a;return-1}}function s(e,t){var n=x.length,r=e.constructor,i=S.isFunction(r)&&r.prototype||c,a="constructor";for(S.has(e,a)&&!S.contains(t,a)&&t.push(a);n--;)a=x[n],a in e&&e[a]!==i[a]&&!S.contains(t,a)&&t.push(a)}var u=this,l=u._,p=Array.prototype,c=Object.prototype,f=Function.prototype,d=p.push,h=p.slice,m=c.toString,y=c.hasOwnProperty,v=Array.isArray,g=Object.keys,A=f.bind,E=Object.create,T=function(){},S=function(e){return e instanceof S?e:this instanceof S?void(this._wrapped=e):new S(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=S),t._=S,S.VERSION="1.8.3";var b=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){ -return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return null==e?S.identity:S.isFunction(e)?b(e,t,n):S.isObject(e)?S.matcher(e):S.property(e)};S.iteratee=function(e,t){return _(e,t,1/0)};var N=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var a=arguments[i],o=e(a),s=o.length,u=0;s>u;u++){var l=o[u];t&&void 0!==n[l]||(n[l]=a[l])}return n}},w=function(e){if(!S.isObject(e))return{};if(E)return E(e);T.prototype=e;var t=new T;return T.prototype=null,t},R=function(e){return function(t){return null==t?void 0:t[e]}},I=Math.pow(2,53)-1,M=R("length"),C=function(e){var t=M(e);return"number"==typeof t&&t>=0&&I>=t};S.each=S.forEach=function(e,t,n){t=b(t,n);var r,i;if(C(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var a=S.keys(e);for(r=0,i=a.length;i>r;r++)t(e[a[r]],a[r],e)}return e},S.map=S.collect=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=Array(i),o=0;i>o;o++){var s=r?r[o]:o;a[o]=t(e[s],s,e)}return a},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(e,t,n){var r;return r=C(e)?S.findIndex(e,t,n):S.findKey(e,t,n),void 0!==r&&-1!==r?e[r]:void 0},S.filter=S.select=function(e,t,n){var r=[];return t=_(t,n),S.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},S.reject=function(e,t,n){return S.filter(e,S.negate(_(t)),n)},S.every=S.all=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(!t(e[o],o,e))return!1}return!0},S.some=S.any=function(e,t,n){t=_(t,n);for(var r=!C(e)&&S.keys(e),i=(r||e).length,a=0;i>a;a++){var o=r?r[a]:a;if(t(e[o],o,e))return!0}return!1},S.contains=S.includes=S.include=function(e,t,n,r){return C(e)||(e=S.values(e)),("number"!=typeof n||r)&&(n=0),S.indexOf(e,t,n)>=0},S.invoke=function(e,t){var n=h.call(arguments,2),r=S.isFunction(t);return S.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},S.pluck=function(e,t){return S.map(e,S.property(t))},S.where=function(e,t){return S.filter(e,S.matcher(t))},S.findWhere=function(e,t){return S.find(e,S.matcher(t))},S.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],r>a&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},S.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t&&null!=e){e=C(e)?e:S.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],a>r&&(a=r)}else t=_(t,n),S.each(e,function(e,n,r){i=t(e,n,r),(o>i||i===1/0&&a===1/0)&&(a=e,o=i)});return a},S.shuffle=function(e){for(var t,n=C(e)?e:S.values(e),r=n.length,i=Array(r),a=0;r>a;a++)t=S.random(0,a),t!==a&&(i[a]=i[t]),i[t]=n[a];return i},S.sample=function(e,t,n){return null==t||n?(C(e)||(e=S.values(e)),e[S.random(e.length-1)]):S.shuffle(e).slice(0,Math.max(0,t))},S.sortBy=function(e,t,n){return t=_(t,n),S.pluck(S.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var L=function(e){return function(t,n,r){var i={};return n=_(n,r),S.each(t,function(r,a){var o=n(r,a,t);e(i,r,o)}),i}};S.groupBy=L(function(e,t,n){S.has(e,n)?e[n].push(t):e[n]=[t]}),S.indexBy=L(function(e,t,n){e[n]=t}),S.countBy=L(function(e,t,n){S.has(e,n)?e[n]++:e[n]=1}),S.toArray=function(e){return e?S.isArray(e)?h.call(e):C(e)?S.map(e,S.identity):S.values(e):[]},S.size=function(e){return null==e?0:C(e)?e.length:S.keys(e).length},S.partition=function(e,t,n){t=_(t,n);var r=[],i=[];return S.each(e,function(e,n,a){(t(e,n,a)?r:i).push(e)}),[r,i]},S.first=S.head=S.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:S.initial(e,e.length-t)},S.initial=function(e,t,n){return h.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},S.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:S.rest(e,Math.max(0,e.length-t))},S.rest=S.tail=S.drop=function(e,t,n){return h.call(e,null==t||n?1:t)},S.compact=function(e){return S.filter(e,S.identity)};var P=function(e,t,n,r){for(var i=[],a=0,o=r||0,s=M(e);s>o;o++){var u=e[o];if(C(u)&&(S.isArray(u)||S.isArguments(u))){t||(u=P(u,t,n));var l=0,p=u.length;for(i.length+=p;p>l;)i[a++]=u[l++]}else n||(i[a++]=u)}return i};S.flatten=function(e,t){return P(e,t,!1)},S.without=function(e){return S.difference(e,h.call(arguments,1))},S.uniq=S.unique=function(e,t,n,r){S.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=_(n,r));for(var i=[],a=[],o=0,s=M(e);s>o;o++){var u=e[o],l=n?n(u,o,e):u;t?(o&&a===l||i.push(u),a=l):n?S.contains(a,l)||(a.push(l),i.push(u)):S.contains(i,u)||i.push(u)}return i},S.union=function(){return S.uniq(P(arguments,!0,!0))},S.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=M(e);i>r;r++){var a=e[r];if(!S.contains(t,a)){for(var o=1;n>o&&S.contains(arguments[o],a);o++);o===n&&t.push(a)}}return t},S.difference=function(e){var t=P(arguments,!0,!0,1);return S.filter(e,function(e){return!S.contains(t,e)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(e){for(var t=e&&S.max(e,M).length||0,n=Array(t),r=0;t>r;r++)n[r]=S.pluck(e,r);return n},S.object=function(e,t){for(var n={},r=0,i=M(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},S.findIndex=a(1),S.findLastIndex=a(-1),S.sortedIndex=function(e,t,n,r){n=_(n,r,1);for(var i=n(t),a=0,o=M(e);o>a;){var s=Math.floor((a+o)/2);n(e[s])a;a++,e+=n)i[a]=e;return i};var O=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var a=w(e.prototype),o=e.apply(a,i);return S.isObject(o)?o:a};S.bind=function(e,t){if(A&&e.bind===A)return A.apply(e,h.call(arguments,1));if(!S.isFunction(e))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return O(e,r,t,this,n.concat(h.call(arguments)))};return r},S.partial=function(e){var t=h.call(arguments,1),n=function(){for(var r=0,i=t.length,a=Array(i),o=0;i>o;o++)a[o]=t[o]===S?arguments[r++]:t[o];for(;r=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=S.bind(e[n],e);return e},S.memoize=function(e,t){var n=function(r){var i=n.cache,a=""+(t?t.apply(this,arguments):r);return S.has(i,a)||(i[a]=e.apply(this,arguments)),i[a]};return n.cache={},n},S.delay=function(e,t){var n=h.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},S.defer=S.partial(S.delay,S,1),S.throttle=function(e,t,n){var r,i,a,o=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:S.now(),o=null,a=e.apply(r,i),o||(r=i=null)};return function(){var l=S.now();s||n.leading!==!1||(s=l);var p=t-(l-s);return r=this,i=arguments,0>=p||p>t?(o&&(clearTimeout(o),o=null),s=l,a=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(u,p)),a}},S.debounce=function(e,t,n){var r,i,a,o,s,u=function(){var l=S.now()-o;t>l&&l>=0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(a,i),r||(a=i=null)))};return function(){a=this,i=arguments,o=S.now();var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(a,i),a=i=null),s}},S.wrap=function(e,t){return S.partial(t,e)},S.negate=function(e){return function(){return!e.apply(this,arguments)}},S.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},S.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},S.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},S.once=S.partial(S.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),x=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(e){if(!S.isObject(e))return[];if(g)return g(e);var t=[];for(var n in e)S.has(e,n)&&t.push(n);return D&&s(e,t),t},S.allKeys=function(e){if(!S.isObject(e))return[];var t=[];for(var n in e)t.push(n);return D&&s(e,t),t},S.values=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},S.mapObject=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=i.length,o={},s=0;a>s;s++)r=i[s],o[r]=t(e[r],r,e);return o},S.pairs=function(e){for(var t=S.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},S.invert=function(e){for(var t={},n=S.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},S.functions=S.methods=function(e){var t=[];for(var n in e)S.isFunction(e[n])&&t.push(n);return t.sort()},S.extend=N(S.allKeys),S.extendOwn=S.assign=N(S.keys),S.findKey=function(e,t,n){t=_(t,n);for(var r,i=S.keys(e),a=0,o=i.length;o>a;a++)if(r=i[a],t(e[r],r,e))return r},S.pick=function(e,t,n){var r,i,a={},o=e;if(null==o)return a;S.isFunction(t)?(i=S.allKeys(o),r=b(t,n)):(i=P(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var s=0,u=i.length;u>s;s++){var l=i[s],p=o[l];r(p,l,o)&&(a[l]=p)}return a},S.omit=function(e,t,n){if(S.isFunction(t))t=S.negate(t);else{var r=S.map(P(arguments,!1,!1,1),String);t=function(e,t){return!S.contains(r,t)}}return S.pick(e,t,n)},S.defaults=N(S.allKeys,!0),S.create=function(e,t){var n=w(e);return t&&S.extendOwn(n,t),n},S.clone=function(e){return S.isObject(e)?S.isArray(e)?e.slice():S.extend({},e):e},S.tap=function(e,t){return t(e),e},S.isMatch=function(e,t){var n=S.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;r>a;a++){var o=n[a];if(t[o]!==i[o]||!(o in i))return!1}return!0};var U=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof S&&(e=e._wrapped),t instanceof S&&(t=t._wrapped);var i=m.call(e);if(i!==m.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var a="[object Array]"===i;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var o=e.constructor,s=t.constructor;if(o!==s&&!(S.isFunction(o)&&o instanceof o&&S.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),a){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!U(e[u],t[u],n,r))return!1}else{var l,p=S.keys(e);if(u=p.length,S.keys(t).length!==u)return!1;for(;u--;)if(l=p[u],!S.has(t,l)||!U(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0};S.isEqual=function(e,t){return U(e,t)},S.isEmpty=function(e){return null==e?!0:C(e)&&(S.isArray(e)||S.isString(e)||S.isArguments(e))?0===e.length:0===S.keys(e).length},S.isElement=function(e){return!(!e||1!==e.nodeType)},S.isArray=v||function(e){return"[object Array]"===m.call(e)},S.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){S["is"+e]=function(t){return m.call(t)==="[object "+e+"]"}}),S.isArguments(arguments)||(S.isArguments=function(e){return S.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(S.isFunction=function(e){return"function"==typeof e||!1}),S.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},S.isNaN=function(e){return S.isNumber(e)&&e!==+e},S.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===m.call(e)},S.isNull=function(e){return null===e},S.isUndefined=function(e){return void 0===e},S.has=function(e,t){return null!=e&&y.call(e,t)},S.noConflict=function(){return u._=l,this},S.identity=function(e){return e},S.constant=function(e){return function(){return e}},S.noop=function(){},S.property=R,S.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},S.matcher=S.matches=function(e){return e=S.extendOwn({},e),function(t){return S.isMatch(t,e)}},S.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},S.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},S.now=Date.now||function(){return(new Date).getTime()};var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},F=S.invert(k),B=function(e){var t=function(t){return e[t]},n="(?:"+S.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};S.escape=B(k),S.unescape=B(F),S.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),S.isFunction(r)?r.call(e):r};var K=0;S.uniqueId=function(e){var t=++K+"";return e?e+t:t},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+j[e]};S.template=function(e,t,n){!t&&n&&(t=n),t=S.defaults({},t,S.templateSettings);var r=RegExp([(t.escape||V).source,(t.interpolate||V).source,(t.evaluate||V).source].join("|")+"|$","g"),i=0,a="__p+='";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(W,q),i=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(a+="';\n"+o+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var o=new Function(t.variable||"obj","_",a)}catch(s){throw s.source=a,s}var u=function(e){return o.call(this,e,S)},l=t.variable||"obj";return u.source="function("+l+"){\n"+a+"}",u},S.chain=function(e){var t=S(e);return t._chain=!0,t};var Y=function(e,t){return e._chain?S(t).chain():t};S.mixin=function(e){S.each(S.functions(e),function(t){var n=S[t]=e[t];S.prototype[t]=function(){var e=[this._wrapped];return d.apply(e,arguments),Y(this,n.apply(S,e))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=p[e];S.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Y(this,n)}}),S.each(["concat","join","slice"],function(e){var t=p[e];S.prototype[e]=function(){return Y(this,t.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){e.exports={12:{code:"12",message:""},24:{code:"24",message:""},25:{code:"25",message:""},SCHEMA_AND_TYPE:{code:"SCHEMA_AND_TYPE",message:"'schema' and 'type' are mutually exclusive"},REQUIRED_OVERRIDE_OPTIONAL:{code:"REQUIRED_OVERRIDE_OPTIONAL",message:"Can not override required property '{{propertyName}}' to be optional"},CYCLIC_DEPENDENCY:{code:"CYCLIC_DEPENDENCY",message:"'{{typeName}}' has cyclic dependency"},REDEFINIG_BUILDTIN:{code:"REDEFINIG_BUILDTIN",message:"Redefining a built in type: {{typeName}}"},RECURRENT_DEFINITION:{code:"RECURRENT_DEFINITION",message:"Recurrent type definition"},INHERITING_UNKNOWN_TYPE:{code:"INHERITING_UNKNOWN_TYPE",message:"Inheriting from unknown type"},RECURRENT_UNION_OPTION:{code:"RECURRENT_UNION_OPTION",message:"Recurrent type as an option of union type"},UNKNOWN_UNION_OPTION:{code:"UNKNOWN_UNION_OPTION",message:"Unknown type as an option of union type"},RECURRENT_ARRAY_DEFINITION:{code:"RECURRENT_ARRAY_DEFINITION",message:"Recurrent array type definition"},UNKNOWN_ARRAY_COMPONENT:{code:"UNKNOWN_ARRAY_COMPONENT",message:"Referring to unknown type '{{componentTypeName}}' as an array component type"},EXTERNALS_MIX:{code:"EXTERNALS_MIX",message:"It is not allowed to mix RAML types with externals"},EXTERNAL_FACET:{code:"EXTERNAL_FACET",message:"External types can not declare facet '{{name}}'"},OVERRIDE_FACET:{code:"OVERRIDE_FACET",message:"Facet '{{name}}' can not be overriden"},OVERRIDE_BUILTIN_FACET:{code:"OVERRIDE_BUILTIN_FACET",message:"Built in facet '{{name}}' can not be overriden"},FACET_START_BRACKET:{code:"FACET_START_BRACKET",message:"Facet '{{name}}' can not start from '('"},FACET_PROHIBITED_FOR_EXTERNALS:{code:"FACET_PROHIBITED_FOR_EXTERNALS",message:"'{{facetName}}' facet is prohibited for external types"},UNKNOWN_FACET:{code:"UNKNOWN_FACET",message:"Specifying unknown facet: '{{facetName}}'"},MISSING_REQUIRED_FACETS:{code:"MISSING_REQUIRED_FACETS",message:"Missing required facets: {{facetsList}}"},OBJECT_EXPECTED:{code:"OBJECT_EXPECTED",message:"object is expected"},NULL_NOT_ALLOWED:{code:"NULL_NOT_ALLOWED",message:"Null or undefined value is not allowed"},DISCRIMINATOR_NEEDED:{code:"DISCRIMINATOR_NEEDED",message:"Can not discriminate types '{{name1}}' and '{{name2}}' without discriminator"},SAME_DISCRIMINATOR_VALUE:{code:"SAME_DISCRIMINATOR_VALUE",message:"Types '{{name1}}' and '{{name2}}' have same discriminator value"},NOTHING:{code:"NOTHING",message:"nothing"},TYPE_EXPECTED:{code:"TYPE_EXPECTED",message:"{{typeName}} is expected"},INTEGER_EXPECTED:{code:"INTEGER_EXPECTED",message:"integer is expected"},NULL_EXPECTED:{code:"NULL_EXPECTED",message:"null is expected"},SCALAR_EXPECTED:{code:"SCALAR_EXPECTED",message:"scalar is expected"},INCORRECT_DISCRIMINATOR:{code:"INCORRECT_DISCRIMINATOR",message:"None of the '{{rootType}}' type known subtypes declare '{{value}}' as value of discriminating property '{{propName}}'."},MISSING_DISCRIMINATOR:{code:"MISSING_DISCRIMINATOR",message:"Instance of '{{rootType}}' subtype misses value of the discriminating property '{{propName}}'."},INVALID_DATEONLY:{code:"INVALID_DATEONLY",message:"'date-only' instance should match 'yyyy-mm-dd' pattern"},INVALID_TIMEONLY:{code:"INVALID_TIMEONLY",message:"'time-only' instance should match 'hh:mm:ss[.ff...]' pattern"},INVALID_DATETIMEONLY:{code:"INVALID_DATETIMEONLY",message:"'datetime-only' instance should match 'yyyy-mm-ddThh:mm:ss[.ff...]' pattern"},INVALID_RFC3339:{code:"INVALID_RFC3339",message:"Valid rfc3339 formatted string is expected"},INVALID_RFC2616:{code:"INVALID_RFC2616",message:"Valid rfc2616 formatted string is expected"},INVALID_DATTIME:{code:"INVALID_DATTIME",message:"Valid datetime formatted string is expected"},UNKNOWN_ANNOTATION:{code:"UNKNOWN_ANNOTATION",message:"Using unknown annotation type: '{{facetName}}'"},INVALID_ANNOTATION_VALUE:{code:"INVALID_ANNOTATION_VALUE",message:"Invalid annotation value {{msg}}"},CAN_NOT_PARSE_JSON:{code:"CAN_NOT_PARSE_JSON",message:"Can not parse JSON example: {{msg}}"},INVALID_XML:{code:"INVALID_XML",message:"Invalid XML."},STRICT_BOOLEAN:{code:"STRICT_BOOLEAN",message:"'strict' should be boolean"},DISPLAY_NAME_STRING:{code:"DISPLAY_NAME_STRING",message:"'displayName' should be string"},DESCRIPTION_STRING:{code:"DESCRIPTION_STRING",message:"'description' should be string"},INVALID_EXMAPLE:{code:"INVALID_EXMAPLE",message:"Using invalid 'example': {{msg}}"},ADDITIONAL_PROPERTIES_BOOLEAN:{code:"REQUIRED_BOOLEAN",message:"Value of 'additionalProperties' facet should be boolean"},REQUIRED_BOOLEAN:{code:"REQUIRED_BOOLEAN",message:"Value of 'required' facet should be boolean"},UNIQUE_ITEMS_BOOLEAN:{code:"UNIQUE_ITEMS_BOOLEAN",message:"Value of 'uniqueItems' facet should be boolean"},EXMAPLES_MAP:{code:"EXMAPLES_MAP",message:"'examples' value should be a map"},INVALID_DEFAULT_VALUE:{code:"INVALID_DEFAULT_VALUE",message:"Using invalid 'defaultValue': {{msg}}"},DISCRIMINATOR_FOR_UNION:{code:"DISCRIMINATOR_FOR_UNION",message:"You can not specify 'discriminator' for union types"},DISCRIMINATOR_FOR_OBJECT:{code:"DISCRIMINATOR_FOR_OBJECT",message:"You only can use 'discriminator' with object types"},DISCRIMINATOR_FOR_INLINE:{code:"DISCRIMINATOR_FOR_INLINE",message:"You can not specify 'discriminator' for inline type declarations"},UNKNOWN_FOR_DISCRIMINATOR:{code:"UNKNOWN_FOR_DISCRIMINATOR",message:"Using unknown property '{{value}}' as discriminator"},SCALAR_FOR_DISCRIMINATOR:{code:"SCALAR_FOR_DISCRIMINATOR",message:"It is only allowed to use scalar properties as discriminators"},DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR:{code:"DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR",message:"You can not use 'discriminatorValue' without declaring 'discriminator'"},INVALID_DISCRIMINATOR_VALUE:{code:"INVALID_DISCRIMINATOR_VALUE",message:"Using invalid 'disciminatorValue': {{msg}}"},PROPERTIES_MAP:{code:"PROPERTIES_MAP",message:"'properties' should be a map"},FACETS_MAP:{code:"FACETS_MAP",message:"'facets' should be a map"},VALIDATING_AGAINS_UNKNOWN:{code:"VALIDATING_AGAINS_UNKNOWN",message:"Validating instance against unknown type: '{{typeName}}'"},EXTERNAL_IN_PROPERTY_DEFINITION:{code:"EXTERNAL_IN_PROPERTY_DEFINITION",message:"It is not allowed to use external types in property definitions"},UNKNOWN_IN_PROPERTY_DEFINITION:{code:"UNKNOWN_IN_PROPERTY_DEFINITION",message:"Property '{{propName}}' refers to unknown type '{{typeName}}'"},ERROR_IN_RANGE:{code:"ERROR_IN_RANGE",message:"Property '{{propName}}' range type has error: {{msg}}"},INCORRECT_SCHEMA:{code:"INCORRECT_SCHEMA",message:"Incorrect schema: {{msg}}"},UNABLE_TO_VALIDATE_XML:{code:"UNABLE_TO_VALIDATE_XML",message:"Unable to validate example against schema (xmllint)"},CIRCULAR_REFS_IN_JSON_SCHEMA:{code:"CIRCULAR_REFS_IN_JSON_SCHEMA",message:"JSON schema contains circular references"},EXAMPLE_SCHEMA_FAILURE:{code:"EXAMPLE_SCHEMA_FAILURE",message:"Example does not conform to schema: {{msg}}"},JOSN_EXAMPLE_VALIDATION_EXCEPTION:{code:"JOSN_EXAMPLE_VALIDATION_EXCEPTION",message:"Validating example against schema caused an exception: {{msg}}"},UNKNOWN_PROPERTY:{code:"UNKNOWN_PROPERTY",message:"Unknown property: '{{propName}}'"},REQUIRED_PROPERTY_MISSING:{code:"REQUIRED_PROPERTY_MISSING",message:"Required property '{{propName}}' is missing"},INVALID_REGEXP:{code:"INVALID_REGEXP",message:"{{msg}}"},FACET_USAGE_RESTRICTION:{code:"FACET_USAGE_RESTRICTION",message:"{{facetName}} facet can only be used with {{typeNames}} types"},FACET_REQUIRE_NUMBER:{code:"FACET_REQUIRE_NUMBER",message:"'{{facetName}}' value should be a number"},FACET_REQUIRE_INTEGER:{code:"FACET_REQUIRE_INTEGER",message:"'{{facetName}}' value should be an integer"},MIN_VALUE:{code:"MIN_VALUE",message:"'{{facetName}}' value should be at least {{minValue}}"},EVEN_RATIO:{code:"EVEN_RATIO",message:"result of division of {{val1}} on {{val2}} should be integer"},MUST_BE_UNIQUE:{code:"MUST_BE_UNIQUE",message:"items should be unique"},ARRAY_AGAINST_UNKNOWN:{code:"ARRAY_AGAINST_UNKNOWN",message:"Array instance is validated against unknown type: '{{typeName}}'"},INVALID_COMPONENT_TYPE:{code:"INVALID_COMPONENT_TYPE",message:"Component type has error: {{msg}}"},EXTERNAL_AS_COMPONENT:{code:"EXTERNAL_AS_COMPONENT",message:"It is not allowed to use external types in component type definitions"},UNKNOWN_AS_COMPONENT:{code:"UNKNOWN_AS_COMPONENT",message:"Component refers to unknown type {{typeName}}"},PATTERN_VIOLATION:{code:"PATTERN_VIOLATION",message:"String should match to '{{value}}'"},ALLOWED_FORMAT_VALUES:{code:"ALLOWED_FORMAT_VALUES",message:"Following format values are allowed: {{allowedValues}}"},ENUM_RESTRICTION:{code:"ENUM_RESTRICTION",message:"value should be one of: {{values}}"},ENUM_OWNER_TYPES:{code:"ENUM_OWNER_TYPES",message:"'enum' facet can only be used with: {{typeNames}}"},ENUM_ARRAY:{code:"ENUM_ARRAY",message:"'enum' facet value must be defined by array"},RESTRICTIONS_CONFLICT:{code:"RESTRICTIONS_CONFLICT",message:null},MINMAX_RESTRICTION_VIOLATION:{code:"MINMAX_RESTRICTION_VIOLATION",message:null},UNION_TYPE_FAILURE:{code:"UNION_TYPE_FAILURE",message:"Union type options do not pass validation"},UNION_TYPE_FAILURE_DETAILS:{code:"UNION_TYPE_FAILURE_DETAILS",message:"Union type option does not pass validation ({{msg}})"},INVALID_JSON_SCHEMA_DETAILS:{code:"INVALID_JSON_SCHEMA_DETAILS",message:"Invalid JSON schema: {{msg}}"},INVALID_JSON_SCHEMA:{code:"INVALID_JSON_SCHEMA",message:"Invalid JSON schema"},JSON_SCHEMA_VALIDATION_EXCEPTION:{code:"JSON_SCHEMA_VALIDATION_EXCEPTION",message:"Schema validation exception: {{msg}}"},REFERENCE_NOT_FOUND:{code:"REFERENCE_NOT_FOUND",message:"Reference not found: {{ref}}"},INVALID_XML_SCHEMA:{code:"INVALID_XML_SCHEMA",message:"Invalid XML schema content"},INVALID_ANNOTATION_LOCATION:{code:"INVALID_ANNOTATION_LOCATION",message:"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}"},CONTENT_DOES_NOT_MATCH_THE_SCHEMA:{code:"CONTENT_DOES_NOT_MATCH_THE_SCHEMA",message:"Content is not valid according to schema: {{msg}}"},EXTERNAL_TYPE_ERROR:{code:"EXTERNAL_TYPE_ERROR",message:"Referenced type '{{typeName}}' does not match '{{objectName}}' root node"},CAN_NOT_PARSE_SCHEMA:{code:"CAN_NOT_PARSE_SCHEMA",message:"Can not parse schema"},FILE_TYPES_SHOULD_BE_AN_ARRAY:{code:"FILE_TYPES_SHOULD_BE_AN_ARRAY",message:"'fileTypes' value should be an array of strings"},FACET_CAN_NOT_BE_FIXED_BY_THE_DECLARING_TYPE:{code:"FACET_CAN_NOT_BE_FIXED_BY_THE_DECLARING_TYPE",message:"A facet can not be fixed by the declaring type"},ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE:{code:"ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE",message:"The 'items' property value should be either a reference to an existing type or an inline type declaration"},VALUE_SHOULD_BE_POSITIVE:{code:"VALUE_SHOULD_BE_POSITIVE",message:"Value of the '{{facetName}}' facet should be positive"}}},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&o&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"] "+e+s(n))}||function(){}}if(!e){if(t instanceof a)return t;e=t}var i={},o=e instanceof Function;return n=n||{},r("warning"),r("error"),r("fatalError"),i}function a(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){return e?"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]":void 0}function u(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function l(e,t){e.currentElement?e.currentElement.appendChild(t):e.document.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new p,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(c.nbsp=" ",c.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,c):r.errorHandler.error("invalid document source"),o.document},a.prototype={startDocument:function(){this.document=(new c).createDocument(null,null,null),this.locator&&(this.document.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.document,a=i.createElementNS(e,n||t),s=r.length;l(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;s>u;u++){var e=r.getURI(u),p=r.getValue(u),n=r.getQName(u),c=i.createAttributeNS(e,n);c.getOffset&&o(c.getOffset(1),c),c.value=c.nodeValue=p,a.setAttributeNode(c)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.document.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),l(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=u.apply(this,arguments),this.currentElement&&e){if(this.cdata){var r=this.document.createCDATASection(e);this.currentElement.appendChild(r)}else{var r=this.document.createTextNode(e);this.currentElement.appendChild(r)}this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.document.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=u.apply(this,arguments);var r=this.document.createComment(e);this.locator&&o(this.locator,r),l(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.document.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),l(this,i)}},warning:function(e){console.warn("[xmldom warning] "+e,s(this.locator))},error:function(e){console.error("[xmldom error] "+e,s(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError] "+e,s(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){a.prototype[e]=function(){return null}});var p=n(207).XMLReader,c=t.DOMImplementation=n(208).DOMImplementation;t.XMLSerializer=n(208).XMLSerializer,t.DOMParser=r},function(e,t,n){},function(e,t,n){(function(){function t(e,t){Array.isArray(e)||(e=[e]);for(var n=!!t,r=[],i=0;i or an