From 88c330a5033fccef4c0baa17a64a8c962034ea45 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 9 Jul 2014 03:36:41 -0700 Subject: [PATCH 01/54] Add indication of response being a collection --- .gitignore | 1 + public/lib/swagger.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a72b52e..79ec346 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ lib-cov *.pid *.gz +.idea pids logs results diff --git a/public/lib/swagger.js b/public/lib/swagger.js index fc40c5d..90c3a4d 100644 --- a/public/lib/swagger.js +++ b/public/lib/swagger.js @@ -540,7 +540,7 @@ return dataType; } else { if (listType != null) { - return models[listType].getMockSignature(); + return 'Array of ' + models[listType].getMockSignature(); } else { return models[dataType].getMockSignature(); } From a9c1152c7497ba2244b8040935dd406236e44586 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Thu, 10 Jul 2014 05:07:43 -0700 Subject: [PATCH 02/54] Correct description of collections of object and nested --- public/lib/swagger.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/lib/swagger.js b/public/lib/swagger.js index 90c3a4d..daf31fd 100644 --- a/public/lib/swagger.js +++ b/public/lib/swagger.js @@ -395,7 +395,7 @@ this.refDataType = obj.items.$ref; } } - this.dataTypeWithRef = this.refDataType != null ? this.dataType + '[' + this.refDataType + ']' : this.dataType; + this.dataTypeWithRef = this.refDataType != null ? (this.dataType[0].toUpperCase() + this.dataType.substring(1, this.dataType.length) + ' of ' + this.refDataType) : this.dataType; if (obj.allowableValues != null) { this.valueType = obj.allowableValues.valueType; this.values = obj.allowableValues.values; @@ -537,7 +537,11 @@ listType = this.isListType(dataType); isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true; if (isPrimitive) { - return dataType; + if (listType != null) { + return 'Array of ' + listType; + } else { + return dataType; + } } else { if (listType != null) { return 'Array of ' + models[listType].getMockSignature(); From 5a07b80b6beae6c3bf4be4024a396ecc69ce025e Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Sat, 12 Jul 2014 23:04:13 -0700 Subject: [PATCH 03/54] Upgraded to latest Swagger-UI for 1.2 support --- LoopBackExplorer.iml | 10 + public/css/reset.css | 125 ++ public/css/screen.css | 2667 ++++++++++++++------------------- public/index.html | 169 +-- public/lib/shred.bundle.js | 2765 +++++++++++++++++++++++++++++++++++ public/lib/shred/content.js | 193 +++ public/lib/swagger-oauth.js | 218 +++ public/lib/swagger.js | 2225 +++++++++++++++++++--------- public/o2c.html | 15 + public/swagger-ui.js | 1268 +++++++++++----- public/swagger-ui.min.js | 2 +- 11 files changed, 6906 insertions(+), 2751 deletions(-) create mode 100644 LoopBackExplorer.iml create mode 100644 public/css/reset.css create mode 100644 public/lib/shred.bundle.js create mode 100644 public/lib/shred/content.js create mode 100644 public/lib/swagger-oauth.js create mode 100644 public/o2c.html diff --git a/LoopBackExplorer.iml b/LoopBackExplorer.iml new file mode 100644 index 0000000..284429d --- /dev/null +++ b/LoopBackExplorer.iml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/css/reset.css b/public/css/reset.css new file mode 100644 index 0000000..b2b0789 --- /dev/null +++ b/public/css/reset.css @@ -0,0 +1,125 @@ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/public/css/screen.css b/public/css/screen.css index ce7d8fb..3c1fc37 100644 --- a/public/css/screen.css +++ b/public/css/screen.css @@ -1,220 +1,167 @@ -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -caption, -th, -td { - text-align: left; - font-weight: normal; - vertical-align: middle; -} -q, -blockquote { - quotes: none; -} -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; - content: none; -} -a img { - border: none; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section, -summary { +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */ +.swagger-section pre code { display: block; + padding: 0.5em; + background: #F0F0F0; } -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 300; - src: local('Ubuntu Light'), local('Ubuntu-Light'), url(../fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 500; - src: local('Ubuntu Medium'), local('Ubuntu-Medium'), url(../fonts/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff'); -} -@font-face { - font-family: 'Ubuntu'; - font-style: normal; - font-weight: 700; - src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(../fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff) format('woff'); -} -h1 a, -h2 a, -h3 a, -h4 a, -h5 a, -h6 a { - text-decoration: none; -} -h1 a:hover, -h2 a:hover, -h3 a:hover, -h4 a:hover, -h5 a:hover, -h6 a:hover { - text-decoration: underline; -} -h1 span.divider, -h2 span.divider, -h3 span.divider, -h4 span.divider, -h5 span.divider, -h6 span.divider { - color: #aaaaaa; -} -h1 { +.swagger-section pre code, +.swagger-section pre .subst, +.swagger-section pre .tag .title, +.swagger-section pre .lisp .title, +.swagger-section pre .clojure .built_in, +.swagger-section pre .nginx .title { color: black; - font-size: 1.5em; - line-height: 1.3em; - padding: 10px 0 10px 0; - font-family: 'Ubuntu', sans-serif; +} +.swagger-section pre .string, +.swagger-section pre .title, +.swagger-section pre .constant, +.swagger-section pre .parent, +.swagger-section pre .tag .value, +.swagger-section pre .rules .value, +.swagger-section pre .rules .value .number, +.swagger-section pre .preprocessor, +.swagger-section pre .ruby .symbol, +.swagger-section pre .ruby .symbol .string, +.swagger-section pre .aggregate, +.swagger-section pre .template_tag, +.swagger-section pre .django .variable, +.swagger-section pre .smalltalk .class, +.swagger-section pre .addition, +.swagger-section pre .flow, +.swagger-section pre .stream, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .apache .cbracket, +.swagger-section pre .tex .command, +.swagger-section pre .tex .special, +.swagger-section pre .erlang_repl .function_or_atom, +.swagger-section pre .markdown .header { + color: #800; +} +.swagger-section pre .comment, +.swagger-section pre .annotation, +.swagger-section pre .template_comment, +.swagger-section pre .diff .header, +.swagger-section pre .chunk, +.swagger-section pre .markdown .blockquote { + color: #888; +} +.swagger-section pre .number, +.swagger-section pre .date, +.swagger-section pre .regexp, +.swagger-section pre .literal, +.swagger-section pre .smalltalk .symbol, +.swagger-section pre .smalltalk .char, +.swagger-section pre .go .constant, +.swagger-section pre .change, +.swagger-section pre .markdown .bullet, +.swagger-section pre .markdown .link_url { + color: #080; +} +.swagger-section pre .label, +.swagger-section pre .javadoc, +.swagger-section pre .ruby .string, +.swagger-section pre .decorator, +.swagger-section pre .filter .argument, +.swagger-section pre .localvars, +.swagger-section pre .array, +.swagger-section pre .attr_selector, +.swagger-section pre .important, +.swagger-section pre .pseudo, +.swagger-section pre .pi, +.swagger-section pre .doctype, +.swagger-section pre .deletion, +.swagger-section pre .envvar, +.swagger-section pre .shebang, +.swagger-section pre .apache .sqbracket, +.swagger-section pre .nginx .built_in, +.swagger-section pre .tex .formula, +.swagger-section pre .erlang_repl .reserved, +.swagger-section pre .prompt, +.swagger-section pre .markdown .link_label, +.swagger-section pre .vhdl .attribute, +.swagger-section pre .clojure .attribute, +.swagger-section pre .coffeescript .property { + color: #8888ff; +} +.swagger-section pre .keyword, +.swagger-section pre .id, +.swagger-section pre .phpdoc, +.swagger-section pre .title, +.swagger-section pre .built_in, +.swagger-section pre .aggregate, +.swagger-section pre .css .tag, +.swagger-section pre .javadoctag, +.swagger-section pre .phpdoc, +.swagger-section pre .yardoctag, +.swagger-section pre .smalltalk .class, +.swagger-section pre .winutils, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .go .typename, +.swagger-section pre .tex .command, +.swagger-section pre .markdown .strong, +.swagger-section pre .request, +.swagger-section pre .status { font-weight: bold; } -h2 { - color: black; - font-size: 1.3em; - padding: 10px 0 10px 0; -} -h2 a { - color: black; -} -h2 span.sub { - font-size: 0.7em; - color: #999999; +.swagger-section pre .markdown .emphasis { font-style: italic; } -h2 span.sub a { - color: #777777; +.swagger-section pre .nginx .built_in { + font-weight: normal; } -h3 { - color: black; - font-size: 1.1em; - padding: 10px 0 10px 0; +.swagger-section pre .coffeescript .javascript, +.swagger-section pre .javascript .xml, +.swagger-section pre .tex .formula, +.swagger-section pre .xml .javascript, +.swagger-section pre .xml .vbscript, +.swagger-section pre .xml .css, +.swagger-section pre .xml .cdata { + opacity: 0.5; } -.heading_with_menu { - float: none; - clear: both; - overflow: hidden; - display: block; +.swagger-section .message-fail { + color: #cc0000; } -.heading_with_menu h1, -.heading_with_menu h2, -.heading_with_menu h3, -.heading_with_menu h4, -.heading_with_menu h5, -.heading_with_menu h6 { +.swagger-section .message-none { + display: none; +} +.swagger-section .message-success { + color: #89BF04; +} +.swagger-section .swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + max-width: 960px; + margin-left: auto; + margin-right: auto; +} +.swagger-section .swagger-ui-wrap b, +.swagger-section .swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap q, +.swagger-section .swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-section .swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-section .swagger-ui-wrap q:before, +.swagger-section .swagger-ui-wrap q:after, +.swagger-section .swagger-ui-wrap blockquote:before, +.swagger-section .swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-section .swagger-ui-wrap .heading_with_menu h1, +.swagger-section .swagger-ui-wrap .heading_with_menu h2, +.swagger-section .swagger-ui-wrap .heading_with_menu h3, +.swagger-section .swagger-ui-wrap .heading_with_menu h4, +.swagger-section .swagger-ui-wrap .heading_with_menu h5, +.swagger-section .swagger-ui-wrap .heading_with_menu h6 { display: block; clear: none; float: left; @@ -224,7 +171,272 @@ h3 { box-sizing: border-box; width: 60%; } -.heading_with_menu ul { +.swagger-section .swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-section .swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-section .swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-section .swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-section .swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-section .swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-section .swagger-ui-wrap ol, +.swagger-section .swagger-ui-wrap ul { + list-style: none; +} +.swagger-section .swagger-ui-wrap h1 a, +.swagger-section .swagger-ui-wrap h2 a, +.swagger-section .swagger-ui-wrap h3 a, +.swagger-section .swagger-ui-wrap h4 a, +.swagger-section .swagger-ui-wrap h5 a, +.swagger-section .swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap h1 a:hover, +.swagger-section .swagger-ui-wrap h2 a:hover, +.swagger-section .swagger-ui-wrap h3 a:hover, +.swagger-section .swagger-ui-wrap h4 a:hover, +.swagger-section .swagger-ui-wrap h5 a:hover, +.swagger-section .swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap h1 span.divider, +.swagger-section .swagger-ui-wrap h2 span.divider, +.swagger-section .swagger-ui-wrap h3 span.divider, +.swagger-section .swagger-ui-wrap h4 span.divider, +.swagger-section .swagger-ui-wrap h5 span.divider, +.swagger-section .swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-section .swagger-ui-wrap a { + color: #547f00; +} +.swagger-section .swagger-ui-wrap a img { + border: none; +} +.swagger-section .swagger-ui-wrap article, +.swagger-section .swagger-ui-wrap aside, +.swagger-section .swagger-ui-wrap details, +.swagger-section .swagger-ui-wrap figcaption, +.swagger-section .swagger-ui-wrap figure, +.swagger-section .swagger-ui-wrap footer, +.swagger-section .swagger-ui-wrap header, +.swagger-section .swagger-ui-wrap hgroup, +.swagger-section .swagger-ui-wrap menu, +.swagger-section .swagger-ui-wrap nav, +.swagger-section .swagger-ui-wrap section, +.swagger-section .swagger-ui-wrap summary { + display: block; +} +.swagger-section .swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-section .swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-section .swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-section .swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-section .swagger-ui-wrap p.big, +.swagger-section .swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-section .swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_contact { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-section .swagger-ui-wrap .markdown ol li, +.swagger-section .swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-section .swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-section .swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-section .swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-section .swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-section .swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-section .swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-section .swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-section .swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-section .swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-section .swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-section .swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-section .swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap .markdown p code, +.swagger-section .swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-section .swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap .heading_with_menu ul { display: block; clear: none; float: right; @@ -234,339 +446,139 @@ h3 { box-sizing: border-box; margin-top: 10px; } -input.parameter { - width: 300px; - border: 1px solid #aaa; -} -.body-textarea { - width: 300px; - height: 100px; - border: 1px solid #aaa; -} -p { - line-height: 1.4em; - padding: 0 0 10px; - color: #333333; -} -ol { - margin: 0px 0 10px; - padding: 0 0 0 18px; - list-style-type: decimal; -} -ol li { - padding: 5px 0px; - font-size: 0.9em; - color: #333333; -} -.markdown h3 { - color: #547f00; -} -.markdown h4 { - color: #666666; -} -.markdown pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; - margin: 0 0 10px 0; -} -.markdown pre code { - line-height: 1.6em; -} -.markdown p code, -.markdown li code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #f0f0f0; +.swagger-section .swagger-ui-wrap h2 { color: black; - padding: 1px 3px; + font-size: 1.3em; + padding: 10px 0 10px 0; } -.markdown ol, -.markdown ul { - font-family: 'Ubuntu', sans-serif; - margin: 5px 0 10px; - padding: 0 0 0 18px; - list-style-type: disc; +.swagger-section .swagger-ui-wrap h2 a { + color: black; } -.markdown ol li, -.markdown ul li { - padding: 3px 0px; - line-height: 1.4em; - color: #333333; -} -div.gist { - margin: 20px 0 25px 0 !important; -} -p.big, -div.big p { - font-size: 1em; - margin-bottom: 10px; -} -span.weak { - color: #666666; -} -span.blank, -span.empty { - color: #888888; +.swagger-section .swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; font-style: italic; } -a { - color: #547f00; +.swagger-section .swagger-ui-wrap h2 span.sub a { + color: #777777; } -b, -strong { - font-family: 'Ubuntu', sans-serif; - font-weight: bold; -} -.code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; -} -pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; -} -pre code { - line-height: 1.6em; -} -.required { - font-weight: bold; -} -table.fullwidth { - width: 100%; -} -table thead tr th { - padding: 5px; - font-size: 0.9em; +.swagger-section .swagger-ui-wrap span.weak { color: #666666; - border-bottom: 1px solid #999999; } -table tbody tr.offset { - background-color: #f5f5f5; +.swagger-section .swagger-ui-wrap caption, +.swagger-section .swagger-ui-wrap th, +.swagger-section .swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; } -table tbody tr td { - padding: 6px; - font-size: 0.9em; - border-bottom: 1px solid #cccccc; - vertical-align: top; - line-height: 1.3em; +.swagger-section .swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; } -table tbody tr:last-child td { - border-bottom: none; -} -table tbody tr.offset { - background-color: #f0f0f0; -} -form.form_box { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; - padding: 10px; -} -form.form_box label { - color: #0f6ab4 !important; -} -form.form_box input[type=submit] { +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; display: block; - padding: 10px; + clear: both; } -form.form_box p { - font-size: 0.9em; - padding: 0 0 15px; - color: #7e7b6d; +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; } -form.form_box p a { - color: #646257; +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; } -form.form_box p strong { +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { color: black; } -form.form_box p.weak { - font-size: 0.8em; -} -form.formtastic fieldset.inputs ol li p.inline-hints { - margin-left: 0; - font-style: italic; - font-size: 0.9em; - margin: 0; -} -form.formtastic fieldset.inputs ol li label { +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { display: block; clear: both; width: auto; padding: 0 0 3px; color: #666666; } -form.formtastic fieldset.inputs ol li label abbr { +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { padding-left: 3px; color: #888888; } -form.formtastic fieldset.inputs ol li.required label { - color: black; +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; } -form.formtastic fieldset.inputs ol li.string input, -form.formtastic fieldset.inputs ol li.url input, -form.formtastic fieldset.inputs ol li.numeric input { - display: block; - padding: 4px; - width: auto; - clear: both; -} -form.formtastic fieldset.inputs ol li.string input.title, -form.formtastic fieldset.inputs ol li.url input.title, -form.formtastic fieldset.inputs ol li.numeric input.title { - font-size: 1.3em; -} -form.formtastic fieldset.inputs ol li.text textarea { - font-family: 'Ubuntu', sans-serif; - height: 250px; - padding: 4px; - display: block; - clear: both; -} -form.formtastic fieldset.inputs ol li.select select { - display: block; - clear: both; -} -form.formtastic fieldset.inputs ol li.boolean { - float: none; - clear: both; - overflow: hidden; - display: block; -} -form.formtastic fieldset.inputs ol li.boolean input { - display: block; - float: left; - clear: none; - margin: 0 5px 0 0; -} -form.formtastic fieldset.inputs ol li.boolean label { - display: block; - float: left; - clear: none; +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { margin: 0; padding: 0; } -form.formtastic fieldset.buttons { - margin: 0; - padding: 0; -} -form.fullwidth ol li.string input, -form.fullwidth ol li.url input, -form.fullwidth ol li.text textarea, -form.fullwidth ol li.numeric input { - width: 500px !important; -} -body { - padding-top: 60px; - font-family: 'Ubuntu', sans-serif; -} -body #content_message { - margin: 10px 15px; - font-style: italic; - color: #999999; -} -body #header { - background-color: #08592b; - position: fixed; - width: 100%; - top: 0; - padding: 14px; -} -body #header a#logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../images/logo_small.png) no-repeat left center; - padding: 20px 0 20px 60px; - color: white; -} -body #header form#api_selector { - display: block; - clear: none; - float: right; -} -body #header form#api_selector .input { - display: block; - clear: none; - float: left; - margin: 0 10px 0 0; -} -body #header form#api_selector .input input { - font-size: 0.9em; - padding: 3px; - margin: 0; -} -body #header form#api_selector .input input#input_baseUrl { - width: 400px; -} -body #header form#api_selector .input input#input_apiKey { - width: 200px; -} -body #header form#api_selector .input a#explore { - display: block; - text-decoration: none; - font-weight: bold; - padding: 6px 8px; - font-size: 0.9em; - color: white; - background-color: #7dbd33; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -o-border-radius: 4px; - -ms-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; -} -body #header form#api_selector .input a#explore:hover { - background-color: #808080; -} -body p#colophon { - margin: 0 15px 40px 15px; - padding: 10px 0; - font-size: 0.8em; - border-top: 1px solid #dddddd; - font-family: 'Ubuntu', sans-serif; - color: #999999; +.swagger-section .swagger-ui-wrap span.blank, +.swagger-section .swagger-ui-wrap span.empty { + color: #888888; font-style: italic; } -body p#colophon a { - text-decoration: none; +.swagger-section .swagger-ui-wrap .markdown h3 { color: #547f00; } -body ul#resources { - font-family: 'Ubuntu', sans-serif; +.swagger-section .swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-section .swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-section .swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-section .swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; font-size: 0.9em; } -body ul#resources li.resource { +.swagger-section .swagger-ui-wrap ul#resources li.resource { border-bottom: 1px solid #dddddd; } -body ul#resources li.resource:last-child { +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { border-bottom: none; } -body ul#resources li.resource div.heading { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { border: 1px solid transparent; float: none; clear: both; overflow: hidden; display: block; } -body ul#resources li.resource div.heading h2 { - color: #999999; - padding-left: 0; - display: block; - clear: none; - float: left; - font-family: 'Ubuntu', sans-serif; - font-weight: bold; -} -body ul#resources li.resource div.heading h2 a { - color: #999999; -} -body ul#resources li.resource div.heading h2 a:hover { - color: black; -} -body ul#resources li.resource div.heading ul.options { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { overflow: hidden; padding: 0; display: block; @@ -574,1118 +586,639 @@ body ul#resources li.resource div.heading ul.options { float: right; margin: 14px 10px 0 0; } -body ul#resources li.resource div.heading ul.options li { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { float: left; clear: none; margin: 0; padding: 2px 10px; border-right: 1px solid #dddddd; -} -body ul#resources li.resource div.heading ul.options li:first-child, -body ul#resources li.resource div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource div.heading ul.options li:last-child, -body ul#resources li.resource div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource div.heading ul.options li { color: #666666; font-size: 0.9em; } -body ul#resources li.resource div.heading ul.options li a { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { color: #aaaaaa; text-decoration: none; } -body ul#resources li.resource div.heading ul.options li a:hover { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { text-decoration: underline; color: black; } -body ul#resources li.resource:hover div.heading h2 a, -body ul#resources li.resource.active div.heading h2 a { - color: black; -} -body ul#resources li.resource:hover div.heading ul.options li a, -body ul#resources li.resource.active div.heading ul.options li a { - color: #555555; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #e6f3f6; - border: 1px solid #bfe1e8; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #0085a1; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a:hover { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { text-decoration: underline; } -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.first { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { padding-left: 0; } -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { padding-right: 0; border-right: none; } -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - border-right-color: #bfe1e8; - color: #0085a1; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { - color: #0085a1; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { - background-color: #e9f5f7; - border: 1px solid #bfe1e8; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { - color: #0085a1; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #66b6c7; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content .content-type div label { - clear: both; - display: block; - color: #0085a1; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #f4effa; - border: 1px solid #e3d8f3; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #9063cd; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.first { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { padding-left: 0; } -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - border-right-color: #e3d8f3; - color: #9063cd; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { - color: #9063cd; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { - background-color: #f6f2fb; - border: 1px solid #e3d8f3; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { - color: #9063cd; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #bca1e1; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content .content-type div label { - clear: both; - display: block; - color: #9063cd; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #ede7ee; - border: 1px solid #d1c2d6; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #470a59; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.first { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - border-right-color: #d1c2d6; - color: #470a59; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { - color: #470a59; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { - background-color: #efeaf1; - border: 1px solid #d1c2d6; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { - color: #470a59; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header input.submit { display: block; clear: none; float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #916c9b; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content .content-type div label { - clear: both; - display: block; - color: #470a59; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #e6f9fb; - border: 1px solid #bff0f5; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #00c1d5; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - border-right-color: #bff0f5; - color: #00c1d5; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { - color: #00c1d5; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { - background-color: #e9fafb; - border: 1px solid #bff0f5; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { - color: #00c1d5; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #66dae6; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content .content-type div label { - clear: both; - display: block; - color: #00c1d5; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #fff2ec; - border: 1px solid #ffdfd0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #ff7f41; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - border-right-color: #ffdfd0; - color: #ff7f41; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { - color: #ff7f41; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { - background-color: #fff4ef; - border: 1px solid #ffdfd0; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { - color: #ff7f41; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #ffb28d; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content .content-type div label { - clear: both; - display: block; - color: #ff7f41; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #fbede7; - border: 1px solid #f4d1c3; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #d4470f; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - border-right-color: #f4d1c3; - color: #d4470f; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { - color: #d4470f; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - background-color: #fbefeb; - border: 1px solid #f4d1c3; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { - color: #d4470f; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #e5916f; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content .content-type div label { - clear: both; - display: block; - color: #d4470f; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.model-signature { - font-family: 'Ubuntu', sans-serif; - font-size: 1em; - line-height: 1.5em; -} -.model-signature .description div { - font-size: 0.9em; - line-height: 1.5em; - margin-left: 1em; -} -.model-signature .description .strong { - font-weight: bold; - color: #000; - font-size: .9em; -} -.model-signature .description .stronger { - font-weight: bold; - color: #000; -} -.model-signature .signature-nav a { - text-decoration: none; - color: #AAA; -} -.model-signature pre { - font-size: .85em; - line-height: 1.2em; - overflow: auto; - max-height: 200px; - cursor: pointer; -} -.model-signature pre:hover { - background-color: #ffffdd; -} -.model-signature .snippet small { - font-size: 0.75em; -} -.model-signature .signature-container { - clear: both; -} -.model-signature .signature-nav a:hover { - text-decoration: underline; - color: black; -} -.model-signature .signature-nav .selected { - color: black; - text-decoration: none; -} -.model-signature ul.signature-nav { - display: block; - margin: 0; - padding: 0; -} -.model-signature ul.signature-nav li { - float: left; - margin: 0 5px 5px 0; - padding: 2px 5px 2px 0; - border-right: 1px solid #ddd; -} -.model-signature ul.signature-nav li:last-child { - padding-right: 0; - border-right: none; -} -.model-signature .propName { + font-family: "Droid Sans", sans-serif; font-weight: bold; } -.model-signature .propType { - color: #5555aa; +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; } -.model-signature .propOptKey { +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; font-style: italic; } -.model-signature .propOpt { - color: #555; +.swagger-section .swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; } -pre code { - background: none; +.swagger-section .swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; } -.content pre { - font-size: 12px; - margin-top: 5px; - padding: 5px; +.swagger-section .swagger-ui-wrap .markdown ol, +.swagger-section .swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; } -.swagger-ui-wrap { - max-width: 960px; +.swagger-section .swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-section .swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-section .swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-section .swagger-ui-wrap form.form_box p strong { + color: black; +} +.swagger-section .title { + font-style: bold; +} +.swagger-section .secondary_form { + display: none; +} +.swagger-section .main_image { + display: block; margin-left: auto; margin-right: auto; } -.icon-btn { +.swagger-section .oauth_body { + margin-left: 100px; + margin-right: 100px; +} +.swagger-section .oauth_submit { + text-align: center; +} +.swagger-section .api-popup-dialog { + z-index: 10000; + position: absolute; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + color: #777; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog p.error-msg { + padding-left: 5px; + padding-bottom: 5px; +} +.swagger-section .api-popup-dialog button.api-popup-authbtn { + height: 30px; +} +.swagger-section .api-popup-dialog button.api-popup-cancel { + height: 30px; +} +.swagger-section .api-popup-scopes { + padding: 10px 20px; +} +.swagger-section .api-popup-scopes li { + padding: 5px 0; + line-height: 20px; +} +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} +.swagger-section .api-popup-scopes li input { + position: relative; + top: 2px; +} +.swagger-section .api-popup-actions { + padding-top: 10px; +} +.swagger-section .access { + float: right; +} +.swagger-section .auth { + float: right; +} +.swagger-section #api_information_panel { + position: absolute; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section #api_information_panel p .api-msg-enabled { + color: green; +} +.swagger-section #api_information_panel p .api-msg-disabled { + color: red; +} +.swagger-section .api-ic { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .ic-info { + background-position: 0 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-warning { + background-position: -60px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-error { + background-position: -30px 0; + width: 18px; + margin-top: -7px; + margin-left: 4px; +} +.swagger-section .ic-off { + background-position: -90px 0; + width: 58px; + margin-top: -4px; cursor: pointer; } -#message-bar { +.swagger-section .ic-on { + background-position: -160px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.swagger-section #header { + background-color: #89bf04; + padding: 14px; +} +.swagger-section #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 40px; + color: white; +} +.swagger-section #header form#api_selector { + display: block; + clear: none; + float: right; +} +.swagger-section #header form#api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; +} +.swagger-section #header form#api_selector .input input#input_apiKey { + width: 200px; +} +.swagger-section #header form#api_selector .input input#input_baseUrl { + width: 400px; +} +.swagger-section #header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +.swagger-section #header form#api_selector .input a#explore:hover { + background-color: #547f00; +} +.swagger-section #header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +.swagger-section #message-bar { min-height: 30px; text-align: center; padding-top: 10px; } -.message-success { - color: #89BF04; -} -.message-fail { - color: #cc0000; -} diff --git a/public/index.html b/public/index.html index 03bd2c3..5af095a 100644 --- a/public/index.html +++ b/public/index.html @@ -1,82 +1,87 @@ - - - - StrongLoop API Explorer - - - - - - - - - - - - - - - - - - - - -
-   -
- -
- -
- - - - + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + diff --git a/public/lib/shred.bundle.js b/public/lib/shred.bundle.js new file mode 100644 index 0000000..74d0816 --- /dev/null +++ b/public/lib/shred.bundle.js @@ -0,0 +1,2765 @@ +var require = function (file, cwd) { + var resolved = require.resolve(file, cwd || '/'); + var mod = require.modules[resolved]; + if (!mod) throw new Error( + 'Failed to resolve module ' + file + ', tried ' + resolved + ); + var res = mod._cached ? mod._cached : mod(); + return res; +} + +require.paths = []; +require.modules = {}; +require.extensions = [".js",".coffee"]; + +require._core = { + 'assert': true, + 'events': true, + 'fs': true, + 'path': true, + 'vm': true +}; + +require.resolve = (function () { + return function (x, cwd) { + if (!cwd) cwd = '/'; + + if (require._core[x]) return x; + var path = require.modules.path(); + var y = cwd || '.'; + + if (x.match(/^(?:\.\.?\/|\/)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } + + var n = loadNodeModulesSync(x, y); + if (n) return n; + + throw new Error("Cannot find module '" + x + "'"); + + function loadAsFileSync (x) { + if (require.modules[x]) { + return x; + } + + for (var i = 0; i < require.extensions.length; i++) { + var ext = require.extensions[i]; + if (require.modules[x + ext]) return x + ext; + } + } + + function loadAsDirectorySync (x) { + x = x.replace(/\/+$/, ''); + var pkgfile = x + '/package.json'; + if (require.modules[pkgfile]) { + var pkg = require.modules[pkgfile](); + var b = pkg.browserify; + if (typeof b === 'object' && b.main) { + var m = loadAsFileSync(path.resolve(x, b.main)); + if (m) return m; + } + else if (typeof b === 'string') { + var m = loadAsFileSync(path.resolve(x, b)); + if (m) return m; + } + else if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + } + } + + return loadAsFileSync(x + '/index'); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPathsSync(start); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(dir + '/' + x); + if (m) return m; + var n = loadAsDirectorySync(dir + '/' + x); + if (n) return n; + } + + var m = loadAsFileSync(x); + if (m) return m; + } + + function nodeModulesPathsSync (start) { + var parts; + if (start === '/') parts = [ '' ]; + else parts = path.normalize(start).split('/'); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; + dirs.push(dir); + } + + return dirs; + } + }; +})(); + +require.alias = function (from, to) { + var path = require.modules.path(); + var res = null; + try { + res = require.resolve(from + '/package.json', '/'); + } + catch (err) { + res = require.resolve(from, '/'); + } + var basedir = path.dirname(res); + + var keys = (Object.keys || function (obj) { + var res = []; + for (var key in obj) res.push(key) + return res; + })(require.modules); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.slice(0, basedir.length + 1) === basedir + '/') { + var f = key.slice(basedir.length); + require.modules[to + f] = require.modules[basedir + f]; + } + else if (key === basedir) { + require.modules[to] = require.modules[basedir]; + } + } +}; + +require.define = function (filename, fn) { + var dirname = require._core[filename] + ? '' + : require.modules.path().dirname(filename) + ; + + var require_ = function (file) { + return require(file, dirname) + }; + require_.resolve = function (name) { + return require.resolve(name, dirname); + }; + require_.modules = require.modules; + require_.define = require.define; + var module_ = { exports : {} }; + + require.modules[filename] = function () { + require.modules[filename]._cached = module_.exports; + fn.call( + module_.exports, + require_, + module_, + module_.exports, + dirname, + filename + ); + require.modules[filename]._cached = module_.exports; + return module_.exports; + }; +}; + +if (typeof process === 'undefined') process = {}; + +if (!process.nextTick) process.nextTick = (function () { + var queue = []; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canPost) { + window.addEventListener('message', function (ev) { + if (ev.source === window && ev.data === 'browserify-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + } + + return function (fn) { + if (canPost) { + queue.push(fn); + window.postMessage('browserify-tick', '*'); + } + else setTimeout(fn, 0); + }; +})(); + +if (!process.title) process.title = 'browser'; + +if (!process.binding) process.binding = function (name) { + if (name === 'evals') return require('vm') + else throw new Error('No such module') +}; + +if (!process.cwd) process.cwd = function () { return '.' }; + +require.define("path", function (require, module, exports, __dirname, __filename) { + function filter (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + if (fn(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length; i >= 0; i--) { + var last = parts[i]; + if (last == '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Regex to split a filename into [*, dir, basename, ext] +// posix version +var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { +var resolvedPath = '', + resolvedAbsolute = false; + +for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) + ? arguments[i] + : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string' || !path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; +} + +// At this point the path should be resolved to a full absolute path, but +// handle relative paths to be safe (might happen when process.cwd() fails) + +// Normalize the path +resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { +var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.slice(-1) === '/'; + +// Normalize the path +path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + return p && typeof p === 'string'; + }).join('/')); +}; + + +exports.dirname = function(path) { + var dir = splitPathRe.exec(path)[1] || ''; + var isWindows = false; + if (!dir) { + // No dirname + return '.'; + } else if (dir.length === 1 || + (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { + // It is just a slash or a drive letter with a slash + return dir; + } else { + // It is a full dirname, strip trailing slash + return dir.substring(0, dir.length - 1); + } +}; + + +exports.basename = function(path, ext) { + var f = splitPathRe.exec(path)[2] || ''; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPathRe.exec(path)[3] || ''; +}; + +}); + +require.define("/shred.js", function (require, module, exports, __dirname, __filename) { + // Shred is an HTTP client library intended to simplify the use of Node's +// built-in HTTP library. In particular, we wanted to make it easier to interact +// with HTTP-based APIs. +// +// See the [examples](./examples.html) for more details. + +// Ax is a nice logging library we wrote. You can use any logger, providing it +// has `info`, `warn`, `debug`, and `error` methods that take a string. +var Ax = require("ax") + , CookieJarLib = require( "cookiejar" ) + , CookieJar = CookieJarLib.CookieJar +; + +// Shred takes some options, including a logger and request defaults. + +var Shred = function(options) { + options = (options||{}); + this.agent = options.agent; + this.defaults = options.defaults||{}; + this.log = options.logger||(new Ax({ level: "info" })); + this._sharedCookieJar = new CookieJar(); + this.logCurl = options.logCurl || false; +}; + +// Most of the real work is done in the request and reponse classes. + +Shred.Request = require("./shred/request"); +Shred.Response = require("./shred/response"); + +// The `request` method kicks off a new request, instantiating a new `Request` +// object and passing along whatever default options we were given. + +Shred.prototype = { + request: function(options) { + options.logger = this.log; + options.logCurl = options.logCurl || this.logCurl; + options.cookieJar = ( 'cookieJar' in options ) ? options.cookieJar : this._sharedCookieJar; // let them set cookieJar = null + options.agent = options.agent || this.agent; + // fill in default options + for (var key in this.defaults) { + if (this.defaults.hasOwnProperty(key) && !options[key]) { + options[key] = this.defaults[key] + } + } + return new Shred.Request(options); + } +}; + +// Define a bunch of convenience methods so that you don't have to include +// a `method` property in your request options. + +"get put post delete".split(" ").forEach(function(method) { + Shred.prototype[method] = function(options) { + options.method = method; + return this.request(options); + }; +}); + + +module.exports = Shred; + +}); + +require.define("/node_modules/ax/package.json", function (require, module, exports, __dirname, __filename) { + module.exports = {"main":"./lib/ax.js"} +}); + +require.define("/node_modules/ax/lib/ax.js", function (require, module, exports, __dirname, __filename) { + var inspect = require("util").inspect + , fs = require("fs") +; + + +// this is a quick-and-dirty logger. there are other nicer loggers out there +// but the ones i found were also somewhat involved. this one has a Ruby +// logger type interface +// +// we can easily replace this, provide the info, debug, etc. methods are the +// same. or, we can change Haiku to use a more standard node.js interface + +var format = function(level,message) { + var debug = (level=="debug"||level=="error"); + if (!message) { return message.toString(); } + if (typeof(message) == "object") { + if (message instanceof Error && debug) { + return message.stack; + } else { + return inspect(message); + } + } else { + return message.toString(); + } +}; + +var noOp = function(message) { return this; } +var makeLogger = function(level,fn) { + return function(message) { + this.stream.write(this.format(level, message)+"\n"); + return this; + } +}; + +var Logger = function(options) { + var logger = this; + var options = options||{}; + + // Default options + options.level = options.level || "info"; + options.timestamp = options.timestamp || true; + options.prefix = options.prefix || ""; + logger.options = options; + + // Allows a prefix to be added to the message. + // + // var logger = new Ax({ module: 'Haiku' }) + // logger.warn('this is going to be awesome!'); + // //=> Haiku: this is going to be awesome! + // + if (logger.options.module){ + logger.options.prefix = logger.options.module; + } + + // Write to stderr or a file + if (logger.options.file){ + logger.stream = fs.createWriteStream(logger.options.file, {"flags": "a"}); + } else { + if(process.title === "node") + logger.stream = process.stderr; + else if(process.title === "browser") + logger.stream = function () { + // Work around weird console context issue: http://code.google.com/p/chromium/issues/detail?id=48662 + return console[logger.options.level].apply(console, arguments); + }; + } + + switch(logger.options.level){ + case 'debug': + ['debug', 'info', 'warn'].forEach(function (level) { + logger[level] = Logger.writer(level); + }); + case 'info': + ['info', 'warn'].forEach(function (level) { + logger[level] = Logger.writer(level); + }); + case 'warn': + logger.warn = Logger.writer('warn'); + } +} + +// Used to define logger methods +Logger.writer = function(level){ + return function(message){ + var logger = this; + + if(process.title === "node") + logger.stream.write(logger.format(level, message) + '\n'); + else if(process.title === "browser") + logger.stream(logger.format(level, message) + '\n'); + + }; +} + + +Logger.prototype = { + info: function(){}, + debug: function(){}, + warn: function(){}, + error: Logger.writer('error'), + format: function(level, message){ + if (! message) return ''; + + var logger = this + , prefix = logger.options.prefix + , timestamp = logger.options.timestamp ? " " + (new Date().toISOString()) : "" + ; + + return (prefix + timestamp + ": " + message); + } +}; + +module.exports = Logger; + +}); + +require.define("util", function (require, module, exports, __dirname, __filename) { + // todo + +}); + +require.define("fs", function (require, module, exports, __dirname, __filename) { + // nothing to see here... no file methods for the browser + +}); + +require.define("/node_modules/cookiejar/package.json", function (require, module, exports, __dirname, __filename) { + module.exports = {"main":"cookiejar.js"} +}); + +require.define("/node_modules/cookiejar/cookiejar.js", function (require, module, exports, __dirname, __filename) { + exports.CookieAccessInfo=CookieAccessInfo=function CookieAccessInfo(domain,path,secure,script) { + if(this instanceof CookieAccessInfo) { + this.domain=domain||undefined; + this.path=path||"/"; + this.secure=!!secure; + this.script=!!script; + return this; + } + else { + return new CookieAccessInfo(domain,path,secure,script) + } +} + +exports.Cookie=Cookie=function Cookie(cookiestr) { + if(cookiestr instanceof Cookie) { + return cookiestr; + } + else { + if(this instanceof Cookie) { + this.name = null; + this.value = null; + this.expiration_date = Infinity; + this.path = "/"; + this.domain = null; + this.secure = false; //how to define? + this.noscript = false; //httponly + if(cookiestr) { + this.parse(cookiestr) + } + return this; + } + return new Cookie(cookiestr) + } +} + +Cookie.prototype.toString = function toString() { + var str=[this.name+"="+this.value]; + if(this.expiration_date !== Infinity) { + str.push("expires="+(new Date(this.expiration_date)).toGMTString()); + } + if(this.domain) { + str.push("domain="+this.domain); + } + if(this.path) { + str.push("path="+this.path); + } + if(this.secure) { + str.push("secure"); + } + if(this.noscript) { + str.push("httponly"); + } + return str.join("; "); +} + +Cookie.prototype.toValueString = function toValueString() { + return this.name+"="+this.value; +} + +var cookie_str_splitter=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g +Cookie.prototype.parse = function parse(str) { + if(this instanceof Cookie) { + var parts=str.split(";") + , pair=parts[0].match(/([^=]+)=((?:.|\n)*)/) + , key=pair[1] + , value=pair[2]; + this.name = key; + this.value = value; + + for(var i=1;i ", request.method.toUpperCase(), + request.url].join(" ") + return [ summary, "- Headers:", headers].join("\n"); +}; + +Request.prototype.format_headers = function () { + var array = [] + var headers = this._headers + for (var key in headers) { + if (headers.hasOwnProperty(key)) { + var value = headers[key] + array.push("\t" + key + ": " + value); + } + } + return array.join("\n"); +}; + +// Allow chainable 'on's: shred.get({ ... }).on( ... ). You can pass in a +// single function, a pair (event, function), or a hash: +// { event: function, event: function } +Request.prototype.on = function (eventOrHash, listener) { + var emitter = this.emitter; + // Pass in a single argument as a function then make it the default response handler + if (arguments.length === 1 && typeof(eventOrHash) === 'function') { + emitter.on('response', eventOrHash); + } else if (arguments.length === 1 && typeof(eventOrHash) === 'object') { + for (var key in eventOrHash) { + if (eventOrHash.hasOwnProperty(key)) { + emitter.on(key, eventOrHash[key]); + } + } + } else { + emitter.on(eventOrHash, listener); + } + return this; +}; + +// Add in the header methods. Again, these ensure we don't get the same header +// multiple times with different case conventions. +HeaderMixins.gettersAndSetters(Request); + +// `processOptions` is called from the constructor to handle all the work +// associated with making sure we do our best to ensure we have a valid request. + +var processOptions = function(request,options) { + + request.log.debug("Processing request options .."); + + // We'll use `request.emitter` to manage the `on` event handlers. + request.emitter = (new Emitter); + + request.agent = options.agent; + + // Set up the handlers ... + if (options.on) { + for (var key in options.on) { + if (options.on.hasOwnProperty(key)) { + request.emitter.on(key, options.on[key]); + } + } + } + + // Make sure we were give a URL or a host + if (!options.url && !options.host) { + request.emitter.emit("request_error", + new Error("No url or url options (host, port, etc.)")); + return; + } + + // Allow for the [use of a proxy](http://www.jmarshall.com/easy/http/#proxies). + + if (options.url) { + if (options.proxy) { + request.url = options.proxy; + request.path = options.url; + } else { + request.url = options.url; + } + } + + // Set the remaining options. + request.query = options.query||options.parameters||request.query ; + request.method = options.method; + request.setHeader("user-agent",options.agent||"Shred"); + request.setHeaders(options.headers); + + if (request.cookieJar) { + var cookies = request.cookieJar.getCookies( CookieAccessInfo( request.host, request.path ) ); + if (cookies.length) { + var cookieString = request.getHeader('cookie')||''; + for (var cookieIndex = 0; cookieIndex < cookies.length; ++cookieIndex) { + if ( cookieString.length && cookieString[ cookieString.length - 1 ] != ';' ) + { + cookieString += ';'; + } + cookieString += cookies[ cookieIndex ].name + '=' + cookies[ cookieIndex ].value + ';'; + } + request.setHeader("cookie", cookieString); + } + } + + // The content entity can be set either using the `body` or `content` attributes. + if (options.body||options.content) { + request.content = options.body||options.content; + } + request.timeout = options.timeout; + +}; + +// `createRequest` is also called by the constructor, after `processOptions`. +// This actually makes the request and processes the response, so `createRequest` +// is a bit of a misnomer. + +var createRequest = function(request) { + var timeout ; + + request.log.debug("Creating request .."); + request.log.debug(request); + + var reqParams = { + host: request.host, + port: request.port, + method: request.method, + path: request.path + (request.query ? '?'+request.query : ""), + headers: request.getHeaders(), + // Node's HTTP/S modules will ignore this, but we are using the + // browserify-http module in the browser for both HTTP and HTTPS, and this + // is how you differentiate the two. + scheme: request.scheme, + // Use a provided agent. 'Undefined' is the default, which uses a global + // agent. + agent: request.agent + }; + + if (request.logCurl) { + logCurl(request); + } + + var http = request.scheme == "http" ? HTTP : HTTPS; + + // Set up the real request using the selected library. The request won't be + // sent until we call `.end()`. + request._raw = http.request(reqParams, function(response) { + request.log.debug("Received response .."); + + // We haven't timed out and we have a response, so make sure we clear the + // timeout so it doesn't fire while we're processing the response. + clearTimeout(timeout); + + // Construct a Shred `Response` object from the response. This will stream + // the response, thus the need for the callback. We can access the response + // entity safely once we're in the callback. + response = new Response(response, request, function(response) { + + // Set up some event magic. The precedence is given first to + // status-specific handlers, then to responses for a given event, and then + // finally to the more general `response` handler. In the last case, we + // need to first make sure we're not dealing with a a redirect. + var emit = function(event) { + var emitter = request.emitter; + var textStatus = STATUS_CODES[response.status] ? STATUS_CODES[response.status].toLowerCase() : null; + if (emitter.listeners(response.status).length > 0 || emitter.listeners(textStatus).length > 0) { + emitter.emit(response.status, response); + emitter.emit(textStatus, response); + } else { + if (emitter.listeners(event).length>0) { + emitter.emit(event, response); + } else if (!response.isRedirect) { + emitter.emit("response", response); + //console.warn("Request has no event listener for status code " + response.status); + } + } + }; + + // Next, check for a redirect. We simply repeat the request with the URL + // given in the `Location` header. We fire a `redirect` event. + if (response.isRedirect) { + request.log.debug("Redirecting to " + + response.getHeader("Location")); + request.url = response.getHeader("Location"); + emit("redirect"); + createRequest(request); + + // Okay, it's not a redirect. Is it an error of some kind? + } else if (response.isError) { + emit("error"); + } else { + // It looks like we're good shape. Trigger the `success` event. + emit("success"); + } + }); + }); + + // We're still setting up the request. Next, we're going to handle error cases + // where we have no response. We don't emit an error event because that event + // takes a response. We don't response handlers to have to check for a null + // value. However, we [should introduce a different event + // type](https://github.com/spire-io/shred/issues/3) for this type of error. + request._raw.on("error", function(error) { + request.emitter.emit("request_error", error); + }); + + request._raw.on("socket", function(socket) { + request.emitter.emit("socket", socket); + }); + + // TCP timeouts should also trigger the "response_error" event. + request._raw.on('socket', function () { + request._raw.socket.on('timeout', function () { + // This should trigger the "error" event on the raw request, which will + // trigger the "response_error" on the shred request. + request._raw.abort(); + }); + }); + + + // We're almost there. Next, we need to write the request entity to the + // underlying request object. + if (request.content) { + request.log.debug("Streaming body: '" + + request.content.data.slice(0,59) + "' ... "); + request._raw.write(request.content.data); + } + + // Finally, we need to set up the timeout. We do this last so that we don't + // start the clock ticking until the last possible moment. + if (request.timeout) { + timeout = setTimeout(function() { + request.log.debug("Timeout fired, aborting request ..."); + request._raw.abort(); + request.emitter.emit("timeout", request); + },request.timeout); + } + + // The `.end()` method will cause the request to fire. Technically, it might + // have already sent the headers and body. + request.log.debug("Sending request ..."); + request._raw.end(); +}; + +// Logs the curl command for the request. +var logCurl = function (req) { + var headers = req.getHeaders(); + var headerString = ""; + + for (var key in headers) { + headerString += '-H "' + key + ": " + headers[key] + '" '; + } + + var bodyString = "" + + if (req.content) { + bodyString += "-d '" + req.content.body + "' "; + } + + var query = req.query ? '?' + req.query : ""; + + console.log("curl " + + "-X " + req.method.toUpperCase() + " " + + req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " + + headerString + + bodyString + ); +}; + + +module.exports = Request; + +}); + +require.define("http", function (require, module, exports, __dirname, __filename) { + // todo + +}); + +require.define("https", function (require, module, exports, __dirname, __filename) { + // todo + +}); + +require.define("/shred/parseUri.js", function (require, module, exports, __dirname, __filename) { + // parseUri 1.2.2 +// (c) Steven Levithan +// MIT License + +function parseUri (str) { + var o = parseUri.options, + m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), + uri = {}, + i = 14; + + while (i--) uri[o.key[i]] = m[i] || ""; + + uri[o.q.name] = {}; + uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { + if ($1) uri[o.q.name][$1] = $2; + }); + + return uri; +}; + +parseUri.options = { + strictMode: false, + key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], + q: { + name: "queryKey", + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ + } +}; + +module.exports = parseUri; + +}); + +require.define("events", function (require, module, exports, __dirname, __filename) { + if (!process.EventEmitter) process.EventEmitter = function () {}; + +var EventEmitter = exports.EventEmitter = process.EventEmitter; +var isArray = typeof Array.isArray === 'function' + ? Array.isArray + : function (xs) { + return Object.toString.call(xs) === '[object Array]' + } +; + +// By default EventEmitters will print a warning if more than +// 10 listeners are added to it. This is a useful default which +// helps finding memory leaks. +// +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +var defaultMaxListeners = 10; +EventEmitter.prototype.setMaxListeners = function(n) { + if (!this._events) this._events = {}; + this._events.maxListeners = n; +}; + + +EventEmitter.prototype.emit = function(type) { + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events || !this._events.error || + (isArray(this._events.error) && !this._events.error.length)) + { + if (arguments[1] instanceof Error) { + throw arguments[1]; // Unhandled 'error' event + } else { + throw new Error("Uncaught, unspecified 'error' event."); + } + return false; + } + } + + if (!this._events) return false; + var handler = this._events[type]; + if (!handler) return false; + + if (typeof handler == 'function') { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + var args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + return true; + + } else if (isArray(handler)) { + var args = Array.prototype.slice.call(arguments, 1); + + var listeners = handler.slice(); + for (var i = 0, l = listeners.length; i < l; i++) { + listeners[i].apply(this, args); + } + return true; + + } else { + return false; + } +}; + +// EventEmitter is defined in src/node_events.cc +// EventEmitter.prototype.emit() is also defined there. +EventEmitter.prototype.addListener = function(type, listener) { + if ('function' !== typeof listener) { + throw new Error('addListener only takes instances of Function'); + } + + if (!this._events) this._events = {}; + + // To avoid recursion in the case that type == "newListeners"! Before + // adding it to the listeners, first emit "newListeners". + this.emit('newListener', type, listener); + + if (!this._events[type]) { + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + } else if (isArray(this._events[type])) { + + // Check for listener leak + if (!this._events[type].warned) { + var m; + if (this._events.maxListeners !== undefined) { + m = this._events.maxListeners; + } else { + m = defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + console.trace(); + } + } + + // If we've already got an array, just append. + this._events[type].push(listener); + } else { + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + var self = this; + self.on(type, function g() { + self.removeListener(type, g); + listener.apply(this, arguments); + }); + + return this; +}; + +EventEmitter.prototype.removeListener = function(type, listener) { + if ('function' !== typeof listener) { + throw new Error('removeListener only takes instances of Function'); + } + + // does not use listeners(), so no side effect of creating _events[type] + if (!this._events || !this._events[type]) return this; + + var list = this._events[type]; + + if (isArray(list)) { + var i = list.indexOf(listener); + if (i < 0) return this; + list.splice(i, 1); + if (list.length == 0) + delete this._events[type]; + } else if (this._events[type] === listener) { + delete this._events[type]; + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + // does not use listeners(), so no side effect of creating _events[type] + if (type && this._events && this._events[type]) this._events[type] = null; + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + if (!this._events) this._events = {}; + if (!this._events[type]) this._events[type] = []; + if (!isArray(this._events[type])) { + this._events[type] = [this._events[type]]; + } + return this._events[type]; +}; + +}); + +require.define("/node_modules/sprintf/package.json", function (require, module, exports, __dirname, __filename) { + module.exports = {"main":"./lib/sprintf"} +}); + +require.define("/node_modules/sprintf/lib/sprintf.js", function (require, module, exports, __dirname, __filename) { + /** +sprintf() for JavaScript 0.7-beta1 +http://www.diveintojavascript.com/projects/javascript-sprintf + +Copyright (c) Alexandru Marasteanu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of sprintf() for JavaScript nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Changelog: +2010.11.07 - 0.7-beta1-node + - converted it to a node.js compatible module + +2010.09.06 - 0.7-beta1 + - features: vsprintf, support for named placeholders + - enhancements: format cache, reduced global namespace pollution + +2010.05.22 - 0.6: + - reverted to 0.4 and fixed the bug regarding the sign of the number 0 + Note: + Thanks to Raphael Pigulla (http://www.n3rd.org/) + who warned me about a bug in 0.5, I discovered that the last update was + a regress. I appologize for that. + +2010.05.09 - 0.5: + - bug fix: 0 is now preceeded with a + sign + - bug fix: the sign was not at the right position on padded results (Kamal Abdali) + - switched from GPL to BSD license + +2007.10.21 - 0.4: + - unit test and patch (David Baird) + +2007.09.17 - 0.3: + - bug fix: no longer throws exception on empty paramenters (Hans Pufal) + +2007.09.11 - 0.2: + - feature: added argument swapping + +2007.04.03 - 0.1: + - initial release +**/ + +var sprintf = (function() { + function get_type(variable) { + return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); + } + function str_repeat(input, multiplier) { + for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */} + return output.join(''); + } + + var str_format = function() { + if (!str_format.cache.hasOwnProperty(arguments[0])) { + str_format.cache[arguments[0]] = str_format.parse(arguments[0]); + } + return str_format.format.call(null, str_format.cache[arguments[0]], arguments); + }; + + str_format.format = function(parse_tree, argv) { + var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; + for (i = 0; i < tree_length; i++) { + node_type = get_type(parse_tree[i]); + if (node_type === 'string') { + output.push(parse_tree[i]); + } + else if (node_type === 'array') { + match = parse_tree[i]; // convenience purposes only + if (match[2]) { // keyword argument + arg = argv[cursor]; + for (k = 0; k < match[2].length; k++) { + if (!arg.hasOwnProperty(match[2][k])) { + throw(sprintf('[sprintf] property "%s" does not exist', match[2][k])); + } + arg = arg[match[2][k]]; + } + } + else if (match[1]) { // positional argument (explicit) + arg = argv[match[1]]; + } + else { // positional argument (implicit) + arg = argv[cursor++]; + } + + if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { + throw(sprintf('[sprintf] expecting number but found %s', get_type(arg))); + } + switch (match[8]) { + case 'b': arg = arg.toString(2); break; + case 'c': arg = String.fromCharCode(arg); break; + case 'd': arg = parseInt(arg, 10); break; + case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; + case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; + case 'o': arg = arg.toString(8); break; + case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; + case 'u': arg = Math.abs(arg); break; + case 'x': arg = arg.toString(16); break; + case 'X': arg = arg.toString(16).toUpperCase(); break; + } + arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); + pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; + pad_length = match[6] - String(arg).length; + pad = match[6] ? str_repeat(pad_character, pad_length) : ''; + output.push(match[5] ? arg + pad : pad + arg); + } + } + return output.join(''); + }; + + str_format.cache = {}; + + str_format.parse = function(fmt) { + var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; + while (_fmt) { + if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { + parse_tree.push(match[0]); + } + else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { + parse_tree.push('%'); + } + else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { + if (match[2]) { + arg_names |= 1; + var field_list = [], replacement_field = match[2], field_match = []; + if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { + field_list.push(field_match[1]); + while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { + if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { + field_list.push(field_match[1]); + } + else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { + field_list.push(field_match[1]); + } + else { + throw('[sprintf] huh?'); + } + } + } + else { + throw('[sprintf] huh?'); + } + match[2] = field_list; + } + else { + arg_names |= 2; + } + if (arg_names === 3) { + throw('[sprintf] mixing positional and named placeholders is not (yet) supported'); + } + parse_tree.push(match); + } + else { + throw('[sprintf] huh?'); + } + _fmt = _fmt.substring(match[0].length); + } + return parse_tree; + }; + + return str_format; +})(); + +var vsprintf = function(fmt, argv) { + argv.unshift(fmt); + return sprintf.apply(null, argv); +}; + +exports.sprintf = sprintf; +exports.vsprintf = vsprintf; +}); + +require.define("/shred/response.js", function (require, module, exports, __dirname, __filename) { + // The `Response object` encapsulates a Node.js HTTP response. + +var Content = require("./content") + , HeaderMixins = require("./mixins/headers") + , CookieJarLib = require( "cookiejar" ) + , Cookie = CookieJarLib.Cookie +; + +// Browser doesn't have zlib. +var zlib = null; +try { + zlib = require('zlib'); +} catch (e) { + console.warn("no zlib library"); +} + +// Iconv doesn't work in browser +var Iconv = null; +try { + Iconv = require('iconv-lite'); +} catch (e) { + console.warn("no iconv library"); +} + +// Construct a `Response` object. You should never have to do this directly. The +// `Request` object handles this, getting the raw response object and passing it +// in here, along with the request. The callback allows us to stream the response +// and then use the callback to let the request know when it's ready. +var Response = function(raw, request, callback) { + var response = this; + this._raw = raw; + + // The `._setHeaders` method is "private"; you can't otherwise set headers on + // the response. + this._setHeaders.call(this,raw.headers); + + // store any cookies + if (request.cookieJar && this.getHeader('set-cookie')) { + var cookieStrings = this.getHeader('set-cookie'); + var cookieObjs = [] + , cookie; + + for (var i = 0; i < cookieStrings.length; i++) { + var cookieString = cookieStrings[i]; + if (!cookieString) { + continue; + } + + if (!cookieString.match(/domain\=/i)) { + cookieString += '; domain=' + request.host; + } + + if (!cookieString.match(/path\=/i)) { + cookieString += '; path=' + request.path; + } + + try { + cookie = new Cookie(cookieString); + if (cookie) { + cookieObjs.push(cookie); + } + } catch (e) { + console.warn("Tried to set bad cookie: " + cookieString); + } + } + + request.cookieJar.setCookies(cookieObjs); + } + + this.request = request; + this.client = request.client; + this.log = this.request.log; + + // Stream the response content entity and fire the callback when we're done. + // Store the incoming data in a array of Buffers which we concatinate into one + // buffer at the end. We need to use buffers instead of strings here in order + // to preserve binary data. + var chunkBuffers = []; + var dataLength = 0; + raw.on("data", function(chunk) { + chunkBuffers.push(chunk); + dataLength += chunk.length; + }); + raw.on("end", function() { + var body; + if (typeof Buffer === 'undefined') { + // Just concatinate into a string + body = chunkBuffers.join(''); + } else { + // Initialize new buffer and add the chunks one-at-a-time. + body = new Buffer(dataLength); + for (var i = 0, pos = 0; i < chunkBuffers.length; i++) { + chunkBuffers[i].copy(body, pos); + pos += chunkBuffers[i].length; + } + } + + var setBodyAndFinish = function (body) { + response._body = new Content({ + body: body, + type: response.getHeader("Content-Type") + }); + callback(response); + } + + if (zlib && response.getHeader("Content-Encoding") === 'gzip'){ + zlib.gunzip(body, function (err, gunzippedBody) { + if (Iconv && response.request.encoding){ + body = Iconv.fromEncoding(gunzippedBody,response.request.encoding); + } else { + body = gunzippedBody.toString(); + } + setBodyAndFinish(body); + }) + } + else{ + if (response.request.encoding){ + body = Iconv.fromEncoding(body,response.request.encoding); + } + setBodyAndFinish(body); + } + }); +}; + +// The `Response` object can be pretty overwhelming to view using the built-in +// Node.js inspect method. We want to make it a bit more manageable. This +// probably goes [too far in the other +// direction](https://github.com/spire-io/shred/issues/2). + +Response.prototype = { + inspect: function() { + var response = this; + var headers = this.format_headers(); + var summary = [" ", response.status].join(" ") + return [ summary, "- Headers:", headers].join("\n"); + }, + format_headers: function () { + var array = [] + var headers = this._headers + for (var key in headers) { + if (headers.hasOwnProperty(key)) { + var value = headers[key] + array.push("\t" + key + ": " + value); + } + } + return array.join("\n"); + } +}; + +// `Response` object properties, all of which are read-only: +Object.defineProperties(Response.prototype, { + +// - **status**. The HTTP status code for the response. + status: { + get: function() { return this._raw.statusCode; }, + enumerable: true + }, + +// - **content**. The HTTP content entity, if any. Provided as a [content +// object](./content.html), which will attempt to convert the entity based upon +// the `content-type` header. The converted value is available as +// `content.data`. The original raw content entity is available as +// `content.body`. + body: { + get: function() { return this._body; } + }, + content: { + get: function() { return this.body; }, + enumerable: true + }, + +// - **isRedirect**. Is the response a redirect? These are responses with 3xx +// status and a `Location` header. + isRedirect: { + get: function() { + return (this.status>299 + &&this.status<400 + &&this.getHeader("Location")); + }, + enumerable: true + }, + +// - **isError**. Is the response an error? These are responses with status of +// 400 or greater. + isError: { + get: function() { + return (this.status === 0 || this.status > 399) + }, + enumerable: true + } +}); + +// Add in the [getters for accessing the normalized headers](./headers.js). +HeaderMixins.getters(Response); +HeaderMixins.privateSetters(Response); + +// Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes +// getAllResponseHeaders() to return {} if the response is a CORS request. +// xhr.getHeader still works correctly. +var getHeader = Response.prototype.getHeader; +Response.prototype.getHeader = function (name) { + return (getHeader.call(this,name) || + (typeof this._raw.getHeader === 'function' && this._raw.getHeader(name))); +}; + +module.exports = Response; + +}); + +require.define("/shred/content.js", function (require, module, exports, __dirname, __filename) { + +// The purpose of the `Content` object is to abstract away the data conversions +// to and from raw content entities as strings. For example, you want to be able +// to pass in a Javascript object and have it be automatically converted into a +// JSON string if the `content-type` is set to a JSON-based media type. +// Conversely, you want to be able to transparently get back a Javascript object +// in the response if the `content-type` is a JSON-based media-type. + +// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). + +// The `Content` constructor takes an options object, which *must* have either a +// `body` or `data` property and *may* have a `type` property indicating the +// media type. If there is no `type` attribute, a default will be inferred. +var Content = function(options) { + this.body = options.body; + this.data = options.data; + this.type = options.type; +}; + +Content.prototype = { + // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. + // + // toString: function() { return this.body; } + // + // Commented out, but I've forgotten why. :/ +}; + + +// `Content` objects have the following attributes: +Object.defineProperties(Content.prototype,{ + +// - **type**. Typically accessed as `content.type`, reflects the `content-type` +// header associated with the request or response. If not passed as an options +// to the constructor or set explicitly, it will infer the type the `data` +// attribute, if possible, and, failing that, will default to `text/plain`. + type: { + get: function() { + if (this._type) { + return this._type; + } else { + if (this._data) { + switch(typeof this._data) { + case "string": return "text/plain"; + case "object": return "application/json"; + } + } + } + return "text/plain"; + }, + set: function(value) { + this._type = value; + return this; + }, + enumerable: true + }, + +// - **data**. Typically accessed as `content.data`, reflects the content entity +// converted into Javascript data. This can be a string, if the `type` is, say, +// `text/plain`, but can also be a Javascript object. The conversion applied is +// based on the `processor` attribute. The `data` attribute can also be set +// directly, in which case the conversion will be done the other way, to infer +// the `body` attribute. + data: { + get: function() { + if (this._body) { + return this.processor.parser(this._body); + } else { + return this._data; + } + }, + set: function(data) { + if (this._body&&data) Errors.setDataWithBody(this); + this._data = data; + return this; + }, + enumerable: true + }, + +// - **body**. Typically accessed as `content.body`, reflects the content entity +// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the +// `data` attribute, the `body` attribute will be inferred and vice-versa. If +// you attempt to set both, an exception is raised. + body: { + get: function() { + if (this._data) { + return this.processor.stringify(this._data); + } else { + return this.processor.stringify(this._body); + } + }, + set: function(body) { + if (this._data&&body) Errors.setBodyWithData(this); + this._body = body; + return this; + }, + enumerable: true + }, + +// - **processor**. The functions that will be used to convert to/from `data` and +// `body` attributes. You can add processors. The two that are built-in are for +// `text/plain`, which is basically an identity transformation and +// `application/json` and other JSON-based media types (including custom media +// types with `+json`). You can add your own processors. See below. + processor: { + get: function() { + var processor = Content.processors[this.type]; + if (processor) { + return processor; + } else { + // Return the first processor that matches any part of the + // content type. ex: application/vnd.foobar.baz+json will match json. + var main = this.type.split(";")[0]; + var parts = main.split(/\+|\//); + for (var i=0, l=parts.length; i < l; i++) { + processor = Content.processors[parts[i]] + } + return processor || {parser:identity,stringify:toString}; + } + }, + enumerable: true + }, + +// - **length**. Typically accessed as `content.length`, returns the length in +// bytes of the raw content entity. + length: { + get: function() { + if (typeof Buffer !== 'undefined') { + return Buffer.byteLength(this.body); + } + return this.body.length; + } + } +}); + +Content.processors = {}; + +// The `registerProcessor` function allows you to add your own processors to +// convert content entities. Each processor consists of a Javascript object with +// two properties: +// - **parser**. The function used to parse a raw content entity and convert it +// into a Javascript data type. +// - **stringify**. The function used to convert a Javascript data type into a +// raw content entity. +Content.registerProcessor = function(types,processor) { + +// You can pass an array of types that will trigger this processor, or just one. +// We determine the array via duck-typing here. + if (types.forEach) { + types.forEach(function(type) { + Content.processors[type] = processor; + }); + } else { + // If you didn't pass an array, we just use what you pass in. + Content.processors[types] = processor; + } +}; + +// Register the identity processor, which is used for text-based media types. +var identity = function(x) { return x; } + , toString = function(x) { return x.toString(); } +Content.registerProcessor( + ["text/html","text/plain","text"], + { parser: identity, stringify: toString }); + +// Register the JSON processor, which is used for JSON-based media types. +Content.registerProcessor( + ["application/json; charset=utf-8","application/json","json"], + { + parser: function(string) { + return JSON.parse(string); + }, + stringify: function(data) { + return JSON.stringify(data); }}); + +// Error functions are defined separately here in an attempt to make the code +// easier to read. +var Errors = { + setDataWithBody: function(object) { + throw new Error("Attempt to set data attribute of a content object " + + "when the body attributes was already set."); + }, + setBodyWithData: function(object) { + throw new Error("Attempt to set body attribute of a content object " + + "when the data attributes was already set."); + } +} +module.exports = Content; + +}); + +require.define("/shred/mixins/headers.js", function (require, module, exports, __dirname, __filename) { + // The header mixins allow you to add HTTP header support to any object. This +// might seem pointless: why not simply use a hash? The main reason is that, per +// the [HTTP spec](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), +// headers are case-insensitive. So, for example, `content-type` is the same as +// `CONTENT-TYPE` which is the same as `Content-Type`. Since there is no way to +// overload the index operator in Javascript, using a hash to represent the +// headers means it's possible to have two conflicting values for a single +// header. +// +// The solution to this is to provide explicit methods to set or get headers. +// This also has the benefit of allowing us to introduce additional variations, +// including snake case, which we automatically convert to what Matthew King has +// dubbed "corset case" - the hyphen-separated names with initial caps: +// `Content-Type`. We use corset-case just in case we're dealing with servers +// that haven't properly implemented the spec. + +// Convert headers to corset-case. **Example:** `CONTENT-TYPE` will be converted +// to `Content-Type`. + +var corsetCase = function(string) { + return string.toLowerCase() + //.replace("_","-") + .replace(/(^|-)(\w)/g, + function(s) { return s.toUpperCase(); }); +}; + +// We suspect that `initializeHeaders` was once more complicated ... +var initializeHeaders = function(object) { + return {}; +}; + +// Access the `_headers` property using lazy initialization. **Warning:** If you +// mix this into an object that is using the `_headers` property already, you're +// going to have trouble. +var $H = function(object) { + return object._headers||(object._headers=initializeHeaders(object)); +}; + +// Hide the implementations as private functions, separate from how we expose them. + +// The "real" `getHeader` function: get the header after normalizing the name. +var getHeader = function(object,name) { + return $H(object)[corsetCase(name)]; +}; + +// The "real" `getHeader` function: get one or more headers, or all of them +// if you don't ask for any specifics. +var getHeaders = function(object,names) { + var keys = (names && names.length>0) ? names : Object.keys($H(object)); + var hash = keys.reduce(function(hash,key) { + hash[key] = getHeader(object,key); + return hash; + },{}); + // Freeze the resulting hash so you don't mistakenly think you're modifying + // the real headers. + Object.freeze(hash); + return hash; +}; + +// The "real" `setHeader` function: set a header, after normalizing the name. +var setHeader = function(object,name,value) { + $H(object)[corsetCase(name)] = value; + return object; +}; + +// The "real" `setHeaders` function: set multiple headers based on a hash. +var setHeaders = function(object,hash) { + for( var key in hash ) { setHeader(object,key,hash[key]); }; + return this; +}; + +// Here's where we actually bind the functionality to an object. These mixins work by +// exposing mixin functions. Each function mixes in a specific batch of features. +module.exports = { + + // Add getters. + getters: function(constructor) { + constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; + constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; + }, + // Add setters but as "private" methods. + privateSetters: function(constructor) { + constructor.prototype._setHeader = function(key,value) { return setHeader(this,key,value); }; + constructor.prototype._setHeaders = function(hash) { return setHeaders(this,hash); }; + }, + // Add setters. + setters: function(constructor) { + constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; + constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; + }, + // Add both getters and setters. + gettersAndSetters: function(constructor) { + constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; + constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; + constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; + constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; + }, +}; + +}); + +require.define("/node_modules/iconv-lite/package.json", function (require, module, exports, __dirname, __filename) { + module.exports = {} +}); + +require.define("/node_modules/iconv-lite/index.js", function (require, module, exports, __dirname, __filename) { + // Module exports +var iconv = module.exports = { + toEncoding: function(str, encoding) { + return iconv.getCodec(encoding).toEncoding(str); + }, + fromEncoding: function(buf, encoding) { + return iconv.getCodec(encoding).fromEncoding(buf); + }, + + defaultCharUnicode: '�', + defaultCharSingleByte: '?', + + // Get correct codec for given encoding. + getCodec: function(encoding) { + var enc = encoding || "utf8"; + var codecOptions = undefined; + while (1) { + if (getType(enc) === "String") + enc = enc.replace(/[- ]/g, "").toLowerCase(); + var codec = iconv.encodings[enc]; + var type = getType(codec); + if (type === "String") { + // Link to other encoding. + codecOptions = {originalEncoding: enc}; + enc = codec; + } + else if (type === "Object" && codec.type != undefined) { + // Options for other encoding. + codecOptions = codec; + enc = codec.type; + } + else if (type === "Function") + // Codec itself. + return codec(codecOptions); + else + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + }, + + // Define basic encodings + encodings: { + internal: function(options) { + return { + toEncoding: function(str) { + return new Buffer(ensureString(str), options.originalEncoding); + }, + fromEncoding: function(buf) { + return ensureBuffer(buf).toString(options.originalEncoding); + } + }; + }, + utf8: "internal", + ucs2: "internal", + binary: "internal", + ascii: "internal", + base64: "internal", + + // Codepage single-byte encodings. + singlebyte: function(options) { + // Prepare chars if needed + if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256)) + throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (options.chars.length === 128) + options.chars = asciiString + options.chars; + + if (!options.charsBuf) { + options.charsBuf = new Buffer(options.chars, 'ucs2'); + } + + if (!options.revCharsBuf) { + options.revCharsBuf = new Buffer(65536); + var defChar = iconv.defaultCharSingleByte.charCodeAt(0); + for (var i = 0; i < options.revCharsBuf.length; i++) + options.revCharsBuf[i] = defChar; + for (var i = 0; i < options.chars.length; i++) + options.revCharsBuf[options.chars.charCodeAt(i)] = i; + } + + return { + toEncoding: function(str) { + str = ensureString(str); + + var buf = new Buffer(str.length); + var revCharsBuf = options.revCharsBuf; + for (var i = 0; i < str.length; i++) + buf[i] = revCharsBuf[str.charCodeAt(i)]; + + return buf; + }, + fromEncoding: function(buf) { + buf = ensureBuffer(buf); + + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var charsBuf = options.charsBuf; + var newBuf = new Buffer(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0, _len = buf.length; i < _len; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = charsBuf[idx1]; + newBuf[idx2+1] = charsBuf[idx1+1]; + } + return newBuf.toString('ucs2'); + } + }; + }, + + // Codepage double-byte encodings. + table: function(options) { + var table = options.table, key, revCharsTable = options.revCharsTable; + if (!table) { + throw new Error("Encoding '" + options.type +"' has incorect 'table' option"); + } + if(!revCharsTable) { + revCharsTable = options.revCharsTable = {}; + for (key in table) { + revCharsTable[table[key]] = parseInt(key); + } + } + + return { + toEncoding: function(str) { + str = ensureString(str); + var strLen = str.length; + var bufLen = strLen; + for (var i = 0; i < strLen; i++) + if (str.charCodeAt(i) >> 7) + bufLen++; + + var newBuf = new Buffer(bufLen), gbkcode, unicode, + defaultChar = revCharsTable[iconv.defaultCharUnicode.charCodeAt(0)]; + + for (var i = 0, j = 0; i < strLen; i++) { + unicode = str.charCodeAt(i); + if (unicode >> 7) { + gbkcode = revCharsTable[unicode] || defaultChar; + newBuf[j++] = gbkcode >> 8; //high byte; + newBuf[j++] = gbkcode & 0xFF; //low byte + } else {//ascii + newBuf[j++] = unicode; + } + } + return newBuf; + }, + fromEncoding: function(buf) { + buf = ensureBuffer(buf); + var bufLen = buf.length, strLen = 0; + for (var i = 0; i < bufLen; i++) { + strLen++; + if (buf[i] & 0x80) //the high bit is 1, so this byte is gbkcode's high byte.skip next byte + i++; + } + var newBuf = new Buffer(strLen*2), unicode, gbkcode, + defaultChar = iconv.defaultCharUnicode.charCodeAt(0); + + for (var i = 0, j = 0; i < bufLen; i++, j+=2) { + gbkcode = buf[i]; + if (gbkcode & 0x80) { + gbkcode = (gbkcode << 8) + buf[++i]; + unicode = table[gbkcode] || defaultChar; + } else { + unicode = gbkcode; + } + newBuf[j] = unicode & 0xFF; //low byte + newBuf[j+1] = unicode >> 8; //high byte + } + return newBuf.toString('ucs2'); + } + } + } + } +}; + +// Add aliases to convert functions +iconv.encode = iconv.toEncoding; +iconv.decode = iconv.fromEncoding; + +// Load other encodings from files in /encodings dir. +var encodingsDir = __dirname+"/encodings/", + fs = require('fs'); +fs.readdirSync(encodingsDir).forEach(function(file) { + if(fs.statSync(encodingsDir + file).isDirectory()) return; + var encodings = require(encodingsDir + file) + for (var key in encodings) + iconv.encodings[key] = encodings[key] +}); + +// Utilities +var asciiString = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ + ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f'; + +var ensureBuffer = function(buf) { + buf = buf || new Buffer(0); + return (buf instanceof Buffer) ? buf : new Buffer(buf.toString(), "utf8"); +} + +var ensureString = function(str) { + str = str || ""; + return (str instanceof String) ? str : str.toString((str instanceof Buffer) ? 'utf8' : undefined); +} + +var getType = function(obj) { + return Object.prototype.toString.call(obj).slice(8, -1); +} + + +}); + +require.define("/node_modules/http-browserify/package.json", function (require, module, exports, __dirname, __filename) { + module.exports = {"main":"index.js","browserify":"browser.js"} +}); + +require.define("/node_modules/http-browserify/browser.js", function (require, module, exports, __dirname, __filename) { + var http = module.exports; +var EventEmitter = require('events').EventEmitter; +var Request = require('./lib/request'); + +http.request = function (params, cb) { + if (!params) params = {}; + if (!params.host) params.host = window.location.host.split(':')[0]; + if (!params.port) params.port = window.location.port; + + var req = new Request(new xhrHttp, params); + if (cb) req.on('response', cb); + return req; +}; + +http.get = function (params, cb) { + params.method = 'GET'; + var req = http.request(params, cb); + req.end(); + return req; +}; + +var xhrHttp = (function () { + if (typeof window === 'undefined') { + throw new Error('no window object present'); + } + else if (window.XMLHttpRequest) { + return window.XMLHttpRequest; + } + else if (window.ActiveXObject) { + var axs = [ + 'Msxml2.XMLHTTP.6.0', + 'Msxml2.XMLHTTP.3.0', + 'Microsoft.XMLHTTP' + ]; + for (var i = 0; i < axs.length; i++) { + try { + var ax = new(window.ActiveXObject)(axs[i]); + return function () { + if (ax) { + var ax_ = ax; + ax = null; + return ax_; + } + else { + return new(window.ActiveXObject)(axs[i]); + } + }; + } + catch (e) {} + } + throw new Error('ajax not supported in this browser') + } + else { + throw new Error('ajax not supported in this browser'); + } +})(); + +http.STATUS_CODES = { + 100 : 'Continue', + 101 : 'Switching Protocols', + 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 + 200 : 'OK', + 201 : 'Created', + 202 : 'Accepted', + 203 : 'Non-Authoritative Information', + 204 : 'No Content', + 205 : 'Reset Content', + 206 : 'Partial Content', + 207 : 'Multi-Status', // RFC 4918 + 300 : 'Multiple Choices', + 301 : 'Moved Permanently', + 302 : 'Moved Temporarily', + 303 : 'See Other', + 304 : 'Not Modified', + 305 : 'Use Proxy', + 307 : 'Temporary Redirect', + 400 : 'Bad Request', + 401 : 'Unauthorized', + 402 : 'Payment Required', + 403 : 'Forbidden', + 404 : 'Not Found', + 405 : 'Method Not Allowed', + 406 : 'Not Acceptable', + 407 : 'Proxy Authentication Required', + 408 : 'Request Time-out', + 409 : 'Conflict', + 410 : 'Gone', + 411 : 'Length Required', + 412 : 'Precondition Failed', + 413 : 'Request Entity Too Large', + 414 : 'Request-URI Too Large', + 415 : 'Unsupported Media Type', + 416 : 'Requested Range Not Satisfiable', + 417 : 'Expectation Failed', + 418 : 'I\'m a teapot', // RFC 2324 + 422 : 'Unprocessable Entity', // RFC 4918 + 423 : 'Locked', // RFC 4918 + 424 : 'Failed Dependency', // RFC 4918 + 425 : 'Unordered Collection', // RFC 4918 + 426 : 'Upgrade Required', // RFC 2817 + 500 : 'Internal Server Error', + 501 : 'Not Implemented', + 502 : 'Bad Gateway', + 503 : 'Service Unavailable', + 504 : 'Gateway Time-out', + 505 : 'HTTP Version not supported', + 506 : 'Variant Also Negotiates', // RFC 2295 + 507 : 'Insufficient Storage', // RFC 4918 + 509 : 'Bandwidth Limit Exceeded', + 510 : 'Not Extended' // RFC 2774 +}; + +}); + +require.define("/node_modules/http-browserify/lib/request.js", function (require, module, exports, __dirname, __filename) { + var EventEmitter = require('events').EventEmitter; +var Response = require('./response'); +var isSafeHeader = require('./isSafeHeader'); + +var Request = module.exports = function (xhr, params) { + var self = this; + self.xhr = xhr; + self.body = ''; + + var uri = params.host + ':' + params.port + (params.path || '/'); + + xhr.open( + params.method || 'GET', + (params.scheme || 'http') + '://' + uri, + true + ); + + if (params.headers) { + Object.keys(params.headers).forEach(function (key) { + if (!isSafeHeader(key)) return; + var value = params.headers[key]; + if (Array.isArray(value)) { + value.forEach(function (v) { + xhr.setRequestHeader(key, v); + }); + } + else xhr.setRequestHeader(key, value) + }); + } + + var res = new Response(xhr); + res.on('ready', function () { + self.emit('response', res); + }); + + xhr.onreadystatechange = function () { + res.handle(xhr); + }; +}; + +Request.prototype = new EventEmitter; + +Request.prototype.setHeader = function (key, value) { + if ((Array.isArray && Array.isArray(value)) + || value instanceof Array) { + for (var i = 0; i < value.length; i++) { + this.xhr.setRequestHeader(key, value[i]); + } + } + else { + this.xhr.setRequestHeader(key, value); + } +}; + +Request.prototype.write = function (s) { + this.body += s; +}; + +Request.prototype.end = function (s) { + if (s !== undefined) this.write(s); + this.xhr.send(this.body); +}; + +}); + +require.define("/node_modules/http-browserify/lib/response.js", function (require, module, exports, __dirname, __filename) { + var EventEmitter = require('events').EventEmitter; +var isSafeHeader = require('./isSafeHeader'); + +var Response = module.exports = function (xhr) { + this.xhr = xhr; + this.offset = 0; +}; + +Response.prototype = new EventEmitter; + +var capable = { + streaming : true, + status2 : true +}; + +function parseHeaders (xhr) { + var lines = xhr.getAllResponseHeaders().split(/\r?\n/); + var headers = {}; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line === '') continue; + + var m = line.match(/^([^:]+):\s*(.*)/); + if (m) { + var key = m[1].toLowerCase(), value = m[2]; + + if (headers[key] !== undefined) { + if ((Array.isArray && Array.isArray(headers[key])) + || headers[key] instanceof Array) { + headers[key].push(value); + } + else { + headers[key] = [ headers[key], value ]; + } + } + else { + headers[key] = value; + } + } + else { + headers[line] = true; + } + } + return headers; +} + +Response.prototype.getHeader = function (key) { + var header = this.headers ? this.headers[key.toLowerCase()] : null; + if (header) return header; + + // Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes + // getAllResponseHeaders() to return {} if the response is a CORS request. + // xhr.getHeader still works correctly. + if (isSafeHeader(key)) { + return this.xhr.getResponseHeader(key); + } + return null; +}; + +Response.prototype.handle = function () { + var xhr = this.xhr; + if (xhr.readyState === 2 && capable.status2) { + try { + this.statusCode = xhr.status; + this.headers = parseHeaders(xhr); + } + catch (err) { + capable.status2 = false; + } + + if (capable.status2) { + this.emit('ready'); + } + } + else if (capable.streaming && xhr.readyState === 3) { + try { + if (!this.statusCode) { + this.statusCode = xhr.status; + this.headers = parseHeaders(xhr); + this.emit('ready'); + } + } + catch (err) {} + + try { + this.write(); + } + catch (err) { + capable.streaming = false; + } + } + else if (xhr.readyState === 4) { + if (!this.statusCode) { + this.statusCode = xhr.status; + this.emit('ready'); + } + this.write(); + + if (xhr.error) { + this.emit('error', xhr.responseText); + } + else this.emit('end'); + } +}; + +Response.prototype.write = function () { + var xhr = this.xhr; + if (xhr.responseText.length > this.offset) { + this.emit('data', xhr.responseText.slice(this.offset)); + this.offset = xhr.responseText.length; + } +}; + +}); + +require.define("/node_modules/http-browserify/lib/isSafeHeader.js", function (require, module, exports, __dirname, __filename) { + // Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html +var unsafeHeaders = [ + "accept-charset", + "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", + "content-length", + "cookie", + "cookie2", + "content-transfer-encoding", + "date", + "expect", + "host", + "keep-alive", + "origin", + "referer", + "set-cookie", + "te", + "trailer", + "transfer-encoding", + "upgrade", + "user-agent", + "via" +]; + +module.exports = function (headerName) { + if (!headerName) return false; + return (unsafeHeaders.indexOf(headerName.toLowerCase()) === -1) +}; + +}); + +require.alias("http-browserify", "/node_modules/http"); + +require.alias("http-browserify", "/node_modules/https"); \ No newline at end of file diff --git a/public/lib/shred/content.js b/public/lib/shred/content.js new file mode 100644 index 0000000..b8051fe --- /dev/null +++ b/public/lib/shred/content.js @@ -0,0 +1,193 @@ + +// The purpose of the `Content` object is to abstract away the data conversions +// to and from raw content entities as strings. For example, you want to be able +// to pass in a Javascript object and have it be automatically converted into a +// JSON string if the `content-type` is set to a JSON-based media type. +// Conversely, you want to be able to transparently get back a Javascript object +// in the response if the `content-type` is a JSON-based media-type. + +// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). + +// The `Content` constructor takes an options object, which *must* have either a +// `body` or `data` property and *may* have a `type` property indicating the +// media type. If there is no `type` attribute, a default will be inferred. +var Content = function(options) { + this.body = options.body; + this.data = options.data; + this.type = options.type; +}; + +Content.prototype = { + // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. + // + // toString: function() { return this.body; } + // + // Commented out, but I've forgotten why. :/ +}; + + +// `Content` objects have the following attributes: +Object.defineProperties(Content.prototype,{ + +// - **type**. Typically accessed as `content.type`, reflects the `content-type` +// header associated with the request or response. If not passed as an options +// to the constructor or set explicitly, it will infer the type the `data` +// attribute, if possible, and, failing that, will default to `text/plain`. + type: { + get: function() { + if (this._type) { + return this._type; + } else { + if (this._data) { + switch(typeof this._data) { + case "string": return "text/plain"; + case "object": return "application/json"; + } + } + } + return "text/plain"; + }, + set: function(value) { + this._type = value; + return this; + }, + enumerable: true + }, + +// - **data**. Typically accessed as `content.data`, reflects the content entity +// converted into Javascript data. This can be a string, if the `type` is, say, +// `text/plain`, but can also be a Javascript object. The conversion applied is +// based on the `processor` attribute. The `data` attribute can also be set +// directly, in which case the conversion will be done the other way, to infer +// the `body` attribute. + data: { + get: function() { + if (this._body) { + return this.processor.parser(this._body); + } else { + return this._data; + } + }, + set: function(data) { + if (this._body&&data) Errors.setDataWithBody(this); + this._data = data; + return this; + }, + enumerable: true + }, + +// - **body**. Typically accessed as `content.body`, reflects the content entity +// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the +// `data` attribute, the `body` attribute will be inferred and vice-versa. If +// you attempt to set both, an exception is raised. + body: { + get: function() { + if (this._data) { + return this.processor.stringify(this._data); + } else { + return this._body.toString(); + } + }, + set: function(body) { + if (this._data&&body) Errors.setBodyWithData(this); + this._body = body; + return this; + }, + enumerable: true + }, + +// - **processor**. The functions that will be used to convert to/from `data` and +// `body` attributes. You can add processors. The two that are built-in are for +// `text/plain`, which is basically an identity transformation and +// `application/json` and other JSON-based media types (including custom media +// types with `+json`). You can add your own processors. See below. + processor: { + get: function() { + var processor = Content.processors[this.type]; + if (processor) { + return processor; + } else { + // Return the first processor that matches any part of the + // content type. ex: application/vnd.foobar.baz+json will match json. + var main = this.type.split(";")[0]; + var parts = main.split(/\+|\//); + for (var i=0, l=parts.length; i < l; i++) { + processor = Content.processors[parts[i]] + } + return processor || {parser:identity,stringify:toString}; + } + }, + enumerable: true + }, + +// - **length**. Typically accessed as `content.length`, returns the length in +// bytes of the raw content entity. + length: { + get: function() { + if (typeof Buffer !== 'undefined') { + return Buffer.byteLength(this.body); + } + return this.body.length; + } + } +}); + +Content.processors = {}; + +// The `registerProcessor` function allows you to add your own processors to +// convert content entities. Each processor consists of a Javascript object with +// two properties: +// - **parser**. The function used to parse a raw content entity and convert it +// into a Javascript data type. +// - **stringify**. The function used to convert a Javascript data type into a +// raw content entity. +Content.registerProcessor = function(types,processor) { + +// You can pass an array of types that will trigger this processor, or just one. +// We determine the array via duck-typing here. + if (types.forEach) { + types.forEach(function(type) { + Content.processors[type] = processor; + }); + } else { + // If you didn't pass an array, we just use what you pass in. + Content.processors[types] = processor; + } +}; + +// Register the identity processor, which is used for text-based media types. +var identity = function(x) { return x; } + , toString = function(x) { return x.toString(); } +Content.registerProcessor( + ["text/html","text/plain","text"], + { parser: identity, stringify: toString }); + +// Register the JSON processor, which is used for JSON-based media types. +Content.registerProcessor( + ["application/json; charset=utf-8","application/json","json"], + { + parser: function(string) { + return JSON.parse(string); + }, + stringify: function(data) { + return JSON.stringify(data); }}); + +var qs = require('querystring'); +// Register the post processor, which is used for JSON-based media types. +Content.registerProcessor( + ["application/x-www-form-urlencoded"], + { parser : qs.parse, stringify : qs.stringify }); + +// Error functions are defined separately here in an attempt to make the code +// easier to read. +var Errors = { + setDataWithBody: function(object) { + throw new Error("Attempt to set data attribute of a content object " + + "when the body attributes was already set."); + }, + setBodyWithData: function(object) { + throw new Error("Attempt to set body attribute of a content object " + + "when the data attributes was already set."); + } +} +module.exports = Content; \ No newline at end of file diff --git a/public/lib/swagger-oauth.js b/public/lib/swagger-oauth.js new file mode 100644 index 0000000..19777eb --- /dev/null +++ b/public/lib/swagger-oauth.js @@ -0,0 +1,218 @@ +var appName; +var popupMask; +var popupDialog; +var clientId; +var realm; + +function handleLogin() { + var scopes = []; + + if(window.swaggerUi.api.authSchemes + && window.swaggerUi.api.authSchemes.oauth2 + && window.swaggerUi.api.authSchemes.oauth2.scopes) { + scopes = window.swaggerUi.api.authSchemes.oauth2.scopes; + } + + if(window.swaggerUi.api + && window.swaggerUi.api.info) { + appName = window.swaggerUi.api.info.title; + } + + if(popupDialog.length > 0) + popupDialog = popupDialog.last(); + else { + popupDialog = $( + [ + '
', + '
Select OAuth2.0 Scopes
', + '
', + '

Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.', + 'Learn how to use', + '

', + '

' + appName + ' API requires the following scopes. Select which ones you want to grant to Swagger UI.

', + '
    ', + '
', + '

', + '
', + '
', + '
'].join('')); + $(document.body).append(popupDialog); + + popup = popupDialog.find('ul.api-popup-scopes').empty(); + for (i = 0; i < scopes.length; i ++) { + scope = scopes[i]; + str = '
  • ' + '
  • '; + popup.append(str); + } + + + var $win = $(window), + dw = $win.width(), + dh = $win.height(), + st = $win.scrollTop(), + dlgWd = popupDialog.outerWidth(), + dlgHt = popupDialog.outerHeight(), + top = (dh -dlgHt)/2 + st, + left = (dw - dlgWd)/2; + + popupDialog.css({ + top: (top < 0? 0 : top) + 'px', + left: (left < 0? 0 : left) + 'px' + }); + + popupDialog.find('button.api-popup-cancel').click(function() { + popupMask.hide(); + popupDialog.hide(); + }); + popupDialog.find('button.api-popup-authbtn').click(function() { + popupMask.hide(); + popupDialog.hide(); + + var authSchemes = window.swaggerUi.api.authSchemes; + var location = window.location; + var locationUrl = location.protocol + '//' + location.host + location.pathname; + var redirectUrl = locationUrl.replace("index.html","").concat("/o2c.html").replace("//o2c.html","/o2c.html"); + var url = null; + + var p = window.swaggerUi.api.authSchemes; + for (var key in p) { + if (p.hasOwnProperty(key)) { + var o = p[key].grantTypes; + for(var t in o) { + if(o.hasOwnProperty(t) && t === 'implicit') { + var dets = o[t]; + url = dets.loginEndpoint.url + "?response_type=token"; + window.swaggerUi.tokenName = dets.tokenName; + } + } + } + } + var scopes = []; + var scopeForUrl=''; + var o = $('.api-popup-scopes').find('input:checked'); + + for(var k =0; k < o.length; k++) { + scopes.push($(o[k]).attr("scope")); + if(k > 0){ + scopeForUrl+=' '; + } + scopeForUrl+=$(o[k]).attr("scope"); + } + + window.enabledScopes=scopes; + + + url += '&redirect_uri=' + encodeURIComponent(redirectUrl); + url += '&realm=' + encodeURIComponent(realm); + url += '&client_id=' + encodeURIComponent(clientId); + url += '&scope=' + encodeURIComponent(scopeForUrl); + + window.open(url); + }); + } + popupMask.show(); + popupDialog.show(); + return; +} + + +function handleLogout() { + for(key in window.authorizations.authz){ + window.authorizations.remove(key) + } + window.enabledScopes = null; + $('.api-ic.ic-on').addClass('ic-off'); + $('.api-ic.ic-on').removeClass('ic-on'); + + // set the info box + $('.api-ic.ic-warning').addClass('ic-error'); + $('.api-ic.ic-warning').removeClass('ic-warning'); +} + +function initOAuth(opts) { + var o = (opts||{}); + var errors = []; + + appName = (o.appName||errors.push("missing appName")); + popupMask = (o.popupMask||$('#api-common-mask')); + popupDialog = (o.popupDialog||$('.api-popup-dialog')); + clientId = (o.clientId||errors.push("missing client id")); + realm = (o.realm||errors.push("missing realm")); + + if(errors.length > 0){ + log("auth unable initialize oauth: " + errors); + return; + } + + $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); + $('.api-ic').click(function(s) { + if($(s.target).hasClass('ic-off')) + handleLogin(); + else { + handleLogout(); + } + false; + }); +} + +function onOAuthComplete(token) { + if(token) { + if(token.error) { + var checkbox = $('input[type=checkbox],.secured') + checkbox.each(function(pos){ + checkbox[pos].checked = false; + }); + alert(token.error); + } + else { + var b = token[window.swaggerUi.tokenName]; + if(b){ + // if all roles are satisfied + var o = null; + $.each($('.auth #api_information_panel'), function(k, v) { + var children = v; + if(children && children.childNodes) { + var requiredScopes = []; + $.each((children.childNodes), function (k1, v1){ + var inner = v1.innerHTML; + if(inner) + requiredScopes.push(inner); + }); + var diff = []; + for(var i=0; i < requiredScopes.length; i++) { + var s = requiredScopes[i]; + if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) { + diff.push(s); + } + } + if(diff.length > 0){ + o = v.parentNode; + $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off'); + $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on'); + + // sorry, not all scopes are satisfied + $(o).find('.api-ic').addClass('ic-warning'); + $(o).find('.api-ic').removeClass('ic-error'); + } + else { + o = v.parentNode; + $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on'); + $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off'); + + // all scopes are satisfied + $(o).find('.api-ic').addClass('ic-info'); + $(o).find('.api-ic').removeClass('ic-warning'); + $(o).find('.api-ic').removeClass('ic-error'); + } + } + }); + + window.authorizations.add("key", new ApiKeyAuthorization("Authorization", "Bearer " + b, "header")); + } + } + } +} \ No newline at end of file diff --git a/public/lib/swagger.js b/public/lib/swagger.js index daf31fd..f083b85 100644 --- a/public/lib/swagger.js +++ b/public/lib/swagger.js @@ -1,786 +1,1569 @@ -// Generated by CoffeeScript 1.4.0 -(function() { - var SwaggerApi, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; +// swagger.js +// version 2.0.31 - SwaggerApi = (function() { +var __bind = function(fn, me){ + return function(){ + return fn.apply(me, arguments); + }; +}; - SwaggerApi.prototype.discoveryUrl = "http://api.wordnik.com/v4/resources.json"; +log = function(){ + log.history = log.history || []; + log.history.push(arguments); + if(this.console){ + console.log( Array.prototype.slice.call(arguments) ); + } +}; - SwaggerApi.prototype.debug = false; - - SwaggerApi.prototype.api_key = null; - - SwaggerApi.prototype.basePath = null; - - function SwaggerApi(options) { - if (options == null) { - options = {}; - } - if (options.discoveryUrl != null) { - this.discoveryUrl = options.discoveryUrl; - } - if (options.debug != null) { - this.debug = options.debug; - } - this.apiKeyName = options.apiKeyName != null ? options.apiKeyName : 'api_key'; - if (options.apiKey != null) { - this.api_key = options.apiKey; - } - if (options.api_key != null) { - this.api_key = options.api_key; - } - if (options.verbose != null) { - this.verbose = options.verbose; - } - this.supportHeaderParams = options.supportHeaderParams != null ? options.supportHeaderParams : false; - this.supportedSubmitMethods = options.supportedSubmitMethods != null ? options.supportedSubmitMethods : ['get']; - if (options.success != null) { - this.success = options.success; - } - this.failure = options.failure != null ? options.failure : function() {}; - this.progress = options.progress != null ? options.progress : function() {}; - this.headers = options.headers != null ? options.headers : {}; - this.booleanValues = options.booleanValues != null ? options.booleanValues : new Array('true', 'false'); - this.discoveryUrl = this.suffixApiKey(this.discoveryUrl); - if (options.success != null) { - this.build(); - } +if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function(obj, start) { + for (var i = (start || 0), j = this.length; i < j; i++) { + if (this[i] === obj) { return i; } } + return -1; + } +} - SwaggerApi.prototype.build = function() { - var _this = this; - this.progress('fetching resource list: ' + this.discoveryUrl); - return jQuery.getJSON(this.discoveryUrl, function(response) { - var res, resource, _i, _j, _len, _len1, _ref, _ref1; - if (response.apiVersion != null) { - _this.apiVersion = response.apiVersion; +if (!('filter' in Array.prototype)) { + Array.prototype.filter= function(filter, that /*opt*/) { + var other= [], v; + for (var i=0, n= this.length; i 0) { - _this.basePath = response.basePath; - if (_this.basePath.match(/^HTTP/i) == null) { - _this.fail("discoveryUrl basePath must be a URL."); - } - _this.basePath = _this.basePath.replace(/\/$/, ''); - } else { - _this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/')); - log('derived basepath from discoveryUrl as ' + _this.basePath); - } - _this.apis = {}; - _this.apisArray = []; - if (response.resourcePath != null) { - _this.resourcePath = response.resourcePath; - res = null; - _ref = response.apis; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - resource = _ref[_i]; - if (res === null) { - res = new SwaggerResource(resource, _this); - } else { - res.addOperations(resource.path, resource.operations); + + if (hasDontEnumBug) { + for (var i = 0; i < DontEnumsLength; i++) { + if (hasOwnProperty.call(o, DontEnums[i])) + result.push(DontEnums[i]); } - } - if (res != null) { - _this.apis[res.name] = res; - _this.apisArray.push(res); - res.ready = true; - _this.selfReflect(); - } - } else { - _ref1 = response.apis; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - resource = _ref1[_j]; - res = new SwaggerResource(resource, _this); - _this.apis[res.name] = res; - _this.apisArray.push(res); - } } - return _this; - }).error(function(error) { - if (_this.discoveryUrl.substring(0, 4) !== 'http') { - return _this.fail('Please specify the protocol for ' + _this.discoveryUrl); - } else if (error.status === 0) { - return _this.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); - } else if (error.status === 404) { - return _this.fail('Can\'t read swagger JSON from ' + _this.discoveryUrl); - } else { - return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.discoveryUrl); - } - }); - }; - SwaggerApi.prototype.selfReflect = function() { - var resource, resource_name, _ref; - if (this.apis == null) { - return false; - } - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - if (resource.ready == null) { - return false; - } - } - this.setConsolidatedModels(); - this.ready = true; - if (this.success != null) { - return this.success(); - } - }; - - SwaggerApi.prototype.fail = function(message) { - this.failure(message); - throw message; - }; - - SwaggerApi.prototype.setConsolidatedModels = function() { - var model, modelName, resource, resource_name, _i, _len, _ref, _ref1, _results; - this.modelsArray = []; - this.models = {}; - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - for (modelName in resource.models) { - if (!(this.models[modelName] != null)) { - this.models[modelName] = resource.models[modelName]; - this.modelsArray.push(resource.models[modelName]); - } - } - } - _ref1 = this.modelsArray; - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - model = _ref1[_i]; - _results.push(model.setReferencedModels(this.models)); - } - return _results; - }; - - SwaggerApi.prototype.suffixApiKey = function(url) { - var sep; - if ((this.api_key != null) && jQuery.trim(this.api_key).length > 0 && (url != null)) { - sep = url.indexOf('?') > 0 ? '&' : '?'; - return url + sep + this.apiKeyName + '=' + this.api_key; - } else { - return url; - } - }; - - SwaggerApi.prototype.help = function() { - var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2; - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - console.log(resource_name); - _ref1 = resource.operations; - for (operation_name in _ref1) { - operation = _ref1[operation_name]; - console.log(" " + operation.nickname); - _ref2 = operation.parameters; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - parameter = _ref2[_i]; - console.log(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); - } - } - } - return this; - }; - - return SwaggerApi; - - })(); - - SwaggerResource = (function() { - - function SwaggerResource(resourceObj, api) { - var parts, - _this = this; - this.api = api; - this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path; - this.description = resourceObj.description; - parts = this.path.split("/"); - this.name = parts[parts.length - 1].replace('.{format}', ''); - this.basePath = this.api.basePath; - this.operations = {}; - this.operationsArray = []; - this.modelsArray = []; - this.models = {}; - if ((resourceObj.operations != null) && (this.api.resourcePath != null)) { - this.api.progress('reading resource ' + this.name + ' models and operations'); - this.addModels(resourceObj.models); - this.addOperations(resourceObj.path, resourceObj.operations); - this.api[this.name] = this; - } else { - if (this.path == null) { - this.api.fail("SwaggerResources must have a path."); - } - this.url = this.api.suffixApiKey(this.api.basePath + this.path.replace('{format}', 'json')); - this.api.progress('fetching resource ' + this.name + ': ' + this.url); - jQuery.getJSON(this.url, function(response) { - var endpoint, _i, _len, _ref; - if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) { - _this.basePath = response.basePath; - _this.basePath = _this.basePath.replace(/\/$/, ''); - } - _this.addModels(response.models); - if (response.apis) { - _ref = response.apis; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - endpoint = _ref[_i]; - _this.addOperations(endpoint.path, endpoint.operations); - } - } - _this.api[_this.name] = _this; - _this.ready = true; - return _this.api.selfReflect(); - }).error(function(error) { - return _this.api.fail("Unable to read api '" + _this.name + "' from path " + _this.url + " (server returned " + error.statusText + ")"); - }); - } - } - - SwaggerResource.prototype.addModels = function(models) { - var model, modelName, swaggerModel, _i, _len, _ref, _results; - if (models != null) { - for (modelName in models) { - if (!(this.models[modelName] != null)) { - swaggerModel = new SwaggerModel(modelName, models[modelName]); - this.modelsArray.push(swaggerModel); - this.models[modelName] = swaggerModel; - } - } - _ref = this.modelsArray; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - model = _ref[_i]; - _results.push(model.setReferencedModels(this.models)); - } - return _results; - } - }; - - SwaggerResource.prototype.addOperations = function(resource_path, ops) { - var consumes, err, errorResponses, o, op, _i, _j, _len, _len1, _results; - if (ops) { - _results = []; - for (_i = 0, _len = ops.length; _i < _len; _i++) { - o = ops[_i]; - consumes = o.consumes; - if (o.supportedContentTypes) { - consumes = o.supportedContentTypes; - } - errorResponses = o.responseMessages; - if (errorResponses) { - for (_j = 0, _len1 = errorResponses.length; _j < _len1; _j++) { - err = errorResponses[_j]; - err.reason = err.message; - } - } - if (o.errorResponses) { - errorResponses = o.errorResponses; - } - op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, o.responseClass, errorResponses, this, o.consumes, o.produces); - this.operations[op.nickname] = op; - _results.push(this.operationsArray.push(op)); - } - return _results; - } - }; - - SwaggerResource.prototype.help = function() { - var operation, operation_name, parameter, _i, _len, _ref, _ref1; - _ref = this.operations; - for (operation_name in _ref) { - operation = _ref[operation_name]; - console.log(" " + operation.nickname); - _ref1 = operation.parameters; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - parameter = _ref1[_i]; - console.log(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); - } - } - return this; - }; - - return SwaggerResource; - - })(); - - SwaggerModel = (function() { - - function SwaggerModel(modelName, obj) { - var propertyName; - this.name = obj.id != null ? obj.id : modelName; - this.properties = []; - for (propertyName in obj.properties) { - this.properties.push(new SwaggerModelProperty(propertyName, obj.properties[propertyName])); - } - } - - SwaggerModel.prototype.setReferencedModels = function(allModels) { - var prop, _i, _len, _ref, _results; - _ref = this.properties; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prop = _ref[_i]; - if (allModels[prop.dataType] != null) { - _results.push(prop.refModel = allModels[prop.dataType]); - } else if ((prop.refDataType != null) && (allModels[prop.refDataType] != null)) { - _results.push(prop.refModel = allModels[prop.refDataType]); - } else { - _results.push(void 0); - } - } - return _results; - }; - - SwaggerModel.prototype.getMockSignature = function(modelsToIgnore) { - var classClose, classOpen, prop, propertiesStr, returnVal, strong, strongClose, stronger, _i, _j, _len, _len1, _ref, _ref1; - propertiesStr = []; - _ref = this.properties; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prop = _ref[_i]; - propertiesStr.push(prop.toString()); - } - strong = ''; - stronger = ''; - strongClose = ''; - classOpen = strong + this.name + ' {' + strongClose; - classClose = strong + '}' + strongClose; - returnVal = classOpen + '
    ' + propertiesStr.join(',
    ') + '
    ' + classClose; - if (!modelsToIgnore) { - modelsToIgnore = []; - } - modelsToIgnore.push(this); - _ref1 = this.properties; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - prop = _ref1[_j]; - if ((prop.refModel != null) && (modelsToIgnore.indexOf(prop.refModel)) === -1) { - returnVal = returnVal + ('
    ' + prop.refModel.getMockSignature(modelsToIgnore)); - } - } - return returnVal; - }; - - SwaggerModel.prototype.createJSONSample = function(modelsToIgnore) { - var prop, result, _i, _len, _ref; - result = {}; - modelsToIgnore = modelsToIgnore || []; - modelsToIgnore.push(this.name); - _ref = this.properties; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prop = _ref[_i]; - result[prop.name] = prop.getSampleValue(modelsToIgnore); - } - return result; - }; - - return SwaggerModel; - - })(); - - SwaggerModelProperty = (function() { - - function SwaggerModelProperty(name, obj) { - this.name = name; - this.dataType = obj.type; - this.isCollection = this.dataType && (this.dataType.toLowerCase() === 'array' || this.dataType.toLowerCase() === 'list' || this.dataType.toLowerCase() === 'set'); - this.descr = obj.description; - this.required = obj.required; - if (obj.items != null) { - if (obj.items.type != null) { - this.refDataType = obj.items.type; - } - if (obj.items.$ref != null) { - this.refDataType = obj.items.$ref; - } - } - this.dataTypeWithRef = this.refDataType != null ? (this.dataType[0].toUpperCase() + this.dataType.substring(1, this.dataType.length) + ' of ' + this.refDataType) : this.dataType; - if (obj.allowableValues != null) { - this.valueType = obj.allowableValues.valueType; - this.values = obj.allowableValues.values; - if (this.values != null) { - this.valuesString = "'" + this.values.join("' or '") + "'"; - } - } - } - - SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) { - var result; - if ((this.refModel != null) && (modelsToIgnore.indexOf(this.refModel.name) === -1)) { - result = this.refModel.createJSONSample(modelsToIgnore); - } else { - if (this.isCollection) { - result = this.refDataType; - } else { - result = this.dataType; - } - } - if (this.isCollection) { - return [result]; - } else { return result; - } }; +})(); - SwaggerModelProperty.prototype.toString = function() { - var req, str; - req = this.required ? 'propReq' : 'propOpt'; - str = '' + this.name + ' (' + this.dataTypeWithRef + ''; - if (!this.required) { - str += ', optional'; - } - str += ')'; - if (this.values != null) { - str += " = ['" + this.values.join("' or '") + "']"; - } - if (this.descr != null) { - str += ': ' + this.descr + ''; - } - return str; - }; - return SwaggerModelProperty; +var SwaggerApi = function(url, options) { + this.url = null; + this.debug = false; + this.basePath = null; + this.authorizations = null; + this.authorizationScheme = null; + this.info = null; + this.useJQuery = false; - })(); + options = (options||{}); + if (url) + if (url.url) + options = url; + else + this.url = url; + else + options = url; - SwaggerOperation = (function() { + if (options.url != null) + this.url = options.url; - function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, responseClass, errorResponses, resource, consumes, produces) { - var parameter, v, _i, _j, _len, _len1, _ref, _ref1, _ref2, - _this = this; - this.nickname = nickname; - this.path = path; - this.httpMethod = httpMethod; - this.parameters = parameters != null ? parameters : []; - this.summary = summary; - this.notes = notes; - this.responseClass = responseClass; - this.errorResponses = errorResponses; - this.resource = resource; - this.consumes = consumes; - this.produces = produces; - this["do"] = __bind(this["do"], this); + if (options.success != null) + this.success = options.success; - if (this.nickname == null) { - this.resource.api.fail("SwaggerOperations must have a nickname."); - } - if (this.path == null) { - this.resource.api.fail("SwaggerOperation " + nickname + " is missing path."); - } - if (this.httpMethod == null) { - this.resource.api.fail("SwaggerOperation " + nickname + " is missing httpMethod."); - } - this.path = this.path.replace('{format}', 'json'); - this.httpMethod = this.httpMethod.toLowerCase(); - this.isGetMethod = this.httpMethod === "get"; - this.resourceName = this.resource.name; - if (((_ref = this.responseClass) != null ? _ref.toLowerCase() : void 0) === 'void') { - this.responseClass = void 0; - } - if (this.responseClass != null) { - this.responseClassSignature = this.getSignature(this.responseClass, this.resource.models); - this.responseSampleJSON = this.getSampleJSON(this.responseClass, this.resource.models); - } - this.errorResponses = this.errorResponses || []; - _ref1 = this.parameters; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - parameter = _ref1[_i]; - parameter.name = parameter.name || parameter.dataType; - if (parameter.dataType.toLowerCase() === 'boolean') { - parameter.allowableValues = {}; - parameter.allowableValues.values = this.resource.api.booleanValues; + if (typeof options.useJQuery === 'boolean') + this.useJQuery = options.useJQuery; + + this.failure = options.failure != null ? options.failure : function() {}; + this.progress = options.progress != null ? options.progress : function() {}; + if (options.success != null) + this.build(); +} + +SwaggerApi.prototype.build = function() { + var _this = this; + this.progress('fetching resource list: ' + this.url); + var obj = { + useJQuery: this.useJQuery, + url: this.url, + method: "get", + headers: { + accept: "application/json" + }, + on: { + error: function(response) { + if (_this.url.substring(0, 4) !== 'http') { + return _this.fail('Please specify the protocol for ' + _this.url); + } else if (response.status === 0) { + return _this.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); + } else if (response.status === 404) { + return _this.fail('Can\'t read swagger JSON from ' + _this.url); + } else { + return _this.fail(response.status + ' : ' + response.statusText + ' ' + _this.url); } - parameter.signature = this.getSignature(parameter.dataType, this.resource.models); - parameter.sampleJSON = this.getSampleJSON(parameter.dataType, this.resource.models); - if (parameter.allowableValues != null) { - if (parameter.allowableValues.valueType === "RANGE") { - parameter.isRange = true; - } else { - parameter.isList = true; - } - if (parameter.allowableValues.values != null) { - parameter.allowableValues.descriptiveValues = []; - _ref2 = parameter.allowableValues.values; - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - v = _ref2[_j]; - if ((parameter.defaultValue != null) && parameter.defaultValue === v) { - parameter.allowableValues.descriptiveValues.push({ - value: v, - isDefault: true - }); - } else { - parameter.allowableValues.descriptiveValues.push({ - value: v, - isDefault: false - }); - } + }, + response: function(resp) { + var responseObj = resp.obj || JSON.parse(resp.data); + _this.swaggerVersion = responseObj.swaggerVersion; + if (_this.swaggerVersion === "1.2") { + return _this.buildFromSpec(responseObj); + } else { + return _this.buildFrom1_1Spec(responseObj); + } + } + } + }; + var e = (typeof window !== 'undefined' ? window : exports); + e.authorizations.apply(obj); + new SwaggerHttp().execute(obj); + return this; +}; + +SwaggerApi.prototype.buildFromSpec = function(response) { + if (response.apiVersion != null) { + this.apiVersion = response.apiVersion; + } + this.apis = {}; + this.apisArray = []; + this.produces = response.produces; + this.authSchemes = response.authorizations; + if (response.info != null) { + this.info = response.info; + } + var isApi = false; + var i; + for (i = 0; i < response.apis.length; i++) { + var api = response.apis[i]; + if (api.operations) { + var j; + for (j = 0; j < api.operations.length; j++) { + operation = api.operations[j]; + isApi = true; + } + } + } + if (response.basePath) { + this.basePath = response.basePath; + } else if (this.url.indexOf('?') > 0) { + this.basePath = this.url.substring(0, this.url.lastIndexOf('?')); + } else { + this.basePath = this.url; + } + if (isApi) { + var newName = response.resourcePath.replace(/\//g, ''); + this.resourcePath = response.resourcePath; + res = new SwaggerResource(response, this); + this.apis[newName] = res; + this.apisArray.push(res); + } else { + var k; + for (k = 0; k < response.apis.length; k++) { + var resource = response.apis[k]; + res = new SwaggerResource(resource, this); + this.apis[res.name] = res; + this.apisArray.push(res); + } + } + if (this.success) { + this.success(); + } + return this; +}; + +SwaggerApi.prototype.buildFrom1_1Spec = function(response) { + log("This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info"); + if (response.apiVersion != null) + this.apiVersion = response.apiVersion; + this.apis = {}; + this.apisArray = []; + this.produces = response.produces; + if (response.info != null) { + this.info = response.info; + } + var isApi = false; + for (var i = 0; i < response.apis.length; i++) { + var api = response.apis[i]; + if (api.operations) { + for (var j = 0; j < api.operations.length; j++) { + operation = api.operations[j]; + isApi = true; + } + } + } + if (response.basePath) { + this.basePath = response.basePath; + } else if (this.url.indexOf('?') > 0) { + this.basePath = this.url.substring(0, this.url.lastIndexOf('?')); + } else { + this.basePath = this.url; + } + if (isApi) { + var newName = response.resourcePath.replace(/\//g, ''); + this.resourcePath = response.resourcePath; + var res = new SwaggerResource(response, this); + this.apis[newName] = res; + this.apisArray.push(res); + } else { + for (k = 0; k < response.apis.length; k++) { + resource = response.apis[k]; + res = new SwaggerResource(resource, this); + this.apis[res.name] = res; + this.apisArray.push(res); + } + } + if (this.success) { + this.success(); + } + return this; +}; + +SwaggerApi.prototype.selfReflect = function() { + var resource, resource_name, _ref; + if (this.apis == null) { + return false; + } + _ref = this.apis; + for (resource_name in _ref) { + resource = _ref[resource_name]; + if (resource.ready == null) { + return false; + } + } + this.setConsolidatedModels(); + this.ready = true; + if (this.success != null) { + return this.success(); + } +}; + +SwaggerApi.prototype.fail = function(message) { + this.failure(message); + throw message; +}; + +SwaggerApi.prototype.setConsolidatedModels = function() { + var model, modelName, resource, resource_name, _i, _len, _ref, _ref1, _results; + this.modelsArray = []; + this.models = {}; + _ref = this.apis; + for (resource_name in _ref) { + resource = _ref[resource_name]; + for (modelName in resource.models) { + if (this.models[modelName] == null) { + this.models[modelName] = resource.models[modelName]; + this.modelsArray.push(resource.models[modelName]); + } + } + } + _ref1 = this.modelsArray; + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + model = _ref1[_i]; + _results.push(model.setReferencedModels(this.models)); + } + return _results; +}; + +SwaggerApi.prototype.help = function() { + var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2; + _ref = this.apis; + for (resource_name in _ref) { + resource = _ref[resource_name]; + log(resource_name); + _ref1 = resource.operations; + for (operation_name in _ref1) { + operation = _ref1[operation_name]; + log(" " + operation.nickname); + _ref2 = operation.parameters; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + parameter = _ref2[_i]; + log(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); + } + } + } + return this; +}; + +var SwaggerResource = function(resourceObj, api) { + var _this = this; + this.api = api; + this.api = this.api; + produces = []; + consumes = []; + this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path; + this.description = resourceObj.description; + + var parts = this.path.split("/"); + this.name = parts[parts.length - 1].replace('.{format}', ''); + this.basePath = this.api.basePath; + this.operations = {}; + this.operationsArray = []; + this.modelsArray = []; + this.models = {}; + this.rawModels = {}; + this.useJQuery = (typeof api.useJQuery !== 'undefined' ? api.useJQuery : null); + + if ((resourceObj.apis != null) && (this.api.resourcePath != null)) { + this.addApiDeclaration(resourceObj); + } else { + if (this.path == null) { + this.api.fail("SwaggerResources must have a path."); + } + if (this.path.substring(0, 4) === 'http') { + this.url = this.path.replace('{format}', 'json'); + } else { + this.url = this.api.basePath + this.path.replace('{format}', 'json'); + } + this.api.progress('fetching resource ' + this.name + ': ' + this.url); + obj = { + url: this.url, + method: "get", + useJQuery: this.useJQuery, + headers: { + accept: "application/json" + }, + on: { + response: function(resp) { + var responseObj = resp.obj || JSON.parse(resp.data); + return _this.addApiDeclaration(responseObj); + }, + error: function(response) { + return _this.api.fail("Unable to read api '" + + _this.name + "' from path " + _this.url + " (server returned " + response.statusText + ")"); + } + } + }; + var e = typeof window !== 'undefined' ? window : exports; + e.authorizations.apply(obj); + new SwaggerHttp().execute(obj); + } +} + +SwaggerResource.prototype.getAbsoluteBasePath = function(relativeBasePath) { + var parts, pos, url; + url = this.api.basePath; + pos = url.lastIndexOf(relativeBasePath); + if (pos === -1) { + parts = url.split("/"); + url = parts[0] + "//" + parts[2]; + if (relativeBasePath.indexOf("/") === 0) { + return url + relativeBasePath; + } else { + return url + "/" + relativeBasePath; + } + } else if (relativeBasePath === "/") { + return url.substring(0, pos); + } else { + return url.substring(0, pos) + relativeBasePath; + } +}; + +SwaggerResource.prototype.addApiDeclaration = function(response) { + if (response.produces != null) + this.produces = response.produces; + if (response.consumes != null) + this.consumes = response.consumes; + if ((response.basePath != null) && response.basePath.replace(/\s/g, '').length > 0) + this.basePath = response.basePath.indexOf("http") === -1 ? this.getAbsoluteBasePath(response.basePath) : response.basePath; + + this.addModels(response.models); + if (response.apis) { + for (var i = 0 ; i < response.apis.length; i++) { + var endpoint = response.apis[i]; + this.addOperations(endpoint.path, endpoint.operations, response.consumes, response.produces); + } + } + this.api[this.name] = this; + this.ready = true; + return this.api.selfReflect(); +}; + +SwaggerResource.prototype.addModels = function(models) { + if (models != null) { + var modelName; + for (modelName in models) { + if (this.models[modelName] == null) { + var swaggerModel = new SwaggerModel(modelName, models[modelName]); + this.modelsArray.push(swaggerModel); + this.models[modelName] = swaggerModel; + this.rawModels[modelName] = models[modelName]; + } + } + var output = []; + for (var i = 0; i < this.modelsArray.length; i++) { + model = this.modelsArray[i]; + output.push(model.setReferencedModels(this.models)); + } + return output; + } +}; + +SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes, produces) { + if (ops) { + output = []; + for (var i = 0; i < ops.length; i++) { + o = ops[i]; + consumes = this.consumes; + produces = this.produces; + if (o.consumes != null) + consumes = o.consumes; + else + consumes = this.consumes; + + if (o.produces != null) + produces = o.produces; + else + produces = this.produces; + type = (o.type||o.responseClass); + + if (type === "array") { + ref = null; + if (o.items) + ref = o.items["type"] || o.items["$ref"]; + type = "array[" + ref + "]"; + } + responseMessages = o.responseMessages; + method = o.method; + if (o.httpMethod) { + method = o.httpMethod; + } + if (o.supportedContentTypes) { + consumes = o.supportedContentTypes; + } + if (o.errorResponses) { + responseMessages = o.errorResponses; + for (var j = 0; j < responseMessages.length; j++) { + r = responseMessages[j]; + r.message = r.reason; + r.reason = null; + } + } + o.nickname = this.sanitize(o.nickname); + op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations); + this.operations[op.nickname] = op; + output.push(this.operationsArray.push(op)); + } + return output; + } +}; + +SwaggerResource.prototype.sanitize = function(nickname) { + var op; + op = nickname.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_'); + op = op.replace(/((_){2,})/g, '_'); + op = op.replace(/^(_)*/g, ''); + op = op.replace(/([_])*$/g, ''); + return op; +}; + +SwaggerResource.prototype.help = function() { + var op = this.operations; + var output = []; + var operation_name; + for (operation_name in op) { + operation = op[operation_name]; + var msg = " " + operation.nickname; + for (var i = 0; i < operation.parameters; i++) { + parameter = operation.parameters[i]; + msg.concat(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); + } + output.push(msg); + } + return output; +}; + +var SwaggerModel = function(modelName, obj) { + this.name = obj.id != null ? obj.id : modelName; + this.properties = []; + var propertyName; + for (propertyName in obj.properties) { + if (obj.required != null) { + var value; + for (value in obj.required) { + if (propertyName === obj.required[value]) { + obj.properties[propertyName].required = true; + } + } + } + prop = new SwaggerModelProperty(propertyName, obj.properties[propertyName]); + this.properties.push(prop); + } +} + +SwaggerModel.prototype.setReferencedModels = function(allModels) { + var results = []; + for (var i = 0; i < this.properties.length; i++) { + var property = this.properties[i]; + var type = property.type || property.dataType; + if (allModels[type] != null) + results.push(property.refModel = allModels[type]); + else if ((property.refDataType != null) && (allModels[property.refDataType] != null)) + results.push(property.refModel = allModels[property.refDataType]); + else + results.push(void 0); + } + return results; +}; + +SwaggerModel.prototype.getMockSignature = function(modelsToIgnore) { + var propertiesStr = []; + for (var i = 0; i < this.properties.length; i++) { + prop = this.properties[i]; + propertiesStr.push(prop.toString()); + } + + var strong = ''; + var stronger = ''; + var strongClose = ''; + var classOpen = strong + this.name + ' {' + strongClose; + var classClose = strong + '}' + strongClose; + var returnVal = classOpen + '
    ' + propertiesStr.join(',
    ') + '
    ' + classClose; + if (!modelsToIgnore) + modelsToIgnore = []; + modelsToIgnore.push(this.name); + + for (var i = 0; i < this.properties.length; i++) { + prop = this.properties[i]; + if ((prop.refModel != null) && modelsToIgnore.indexOf(prop.refModel.name) === -1) { + returnVal = returnVal + ('
    ' + prop.refModel.getMockSignature(modelsToIgnore)); + } + } + return returnVal; +}; + +SwaggerModel.prototype.createJSONSample = function(modelsToIgnore) { + if(sampleModels[this.name]) { + return sampleModels[this.name]; + } + else { + var result = {}; + var modelsToIgnore = (modelsToIgnore||[]) + modelsToIgnore.push(this.name); + for (var i = 0; i < this.properties.length; i++) { + prop = this.properties[i]; + result[prop.name] = prop.getSampleValue(modelsToIgnore); + } + modelsToIgnore.pop(this.name); + return result; + } +}; + +var SwaggerModelProperty = function(name, obj) { + this.name = name; + this.dataType = obj.type || obj.dataType || obj["$ref"]; + this.isCollection = this.dataType && (this.dataType.toLowerCase() === 'array' || this.dataType.toLowerCase() === 'list' || this.dataType.toLowerCase() === 'set'); + this.descr = obj.description; + this.required = obj.required; + if (obj.items != null) { + if (obj.items.type != null) { + this.refDataType = obj.items.type; + } + if (obj.items.$ref != null) { + this.refDataType = obj.items.$ref; + } + } + this.dataTypeWithRef = this.refDataType != null ? (this.dataType[0].toUpperCase() + this.dataType.substring(1, this.dataType.length) + ' of ' + this.refDataType) : this.dataType; + if (obj.allowableValues != null) { + this.valueType = obj.allowableValues.valueType; + this.values = obj.allowableValues.values; + if (this.values != null) { + this.valuesString = "'" + this.values.join("' or '") + "'"; + } + } + if (obj["enum"] != null) { + this.valueType = "string"; + this.values = obj["enum"]; + if (this.values != null) { + this.valueString = "'" + this.values.join("' or '") + "'"; + } + } +} + +SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) { + var result; + if ((this.refModel != null) && (modelsToIgnore.indexOf(prop.refModel.name) === -1)) { + result = this.refModel.createJSONSample(modelsToIgnore); + } else { + if (this.isCollection) { + result = this.toSampleValue(this.refDataType); + } else { + result = this.toSampleValue(this.dataType); + } + } + if (this.isCollection) { + return [result]; + } else { + return result; + } +}; + +SwaggerModelProperty.prototype.toSampleValue = function(value) { + var result; + if (value === "integer") { + result = 0; + } else if (value === "boolean") { + result = false; + } else if (value === "double" || value === "number") { + result = 0.0; + } else if (value === "string") { + result = ""; + } else { + result = value; + } + return result; +}; + +SwaggerModelProperty.prototype.toString = function() { + var req = this.required ? 'propReq' : 'propOpt'; + var str = '' + this.name + ' (' + this.dataTypeWithRef + ''; + if (!this.required) { + str += ', optional'; + } + str += ')'; + if (this.values != null) { + str += " = ['" + this.values.join("' or '") + "']"; + } + if (this.descr != null) { + str += ': ' + this.descr + ''; + } + return str; +}; + +var SwaggerOperation = function(nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations) { + var _this = this; + + var errors = []; + this.nickname = (nickname||errors.push("SwaggerOperations must have a nickname.")); + this.path = (path||errors.push("SwaggerOperation " + nickname + " is missing path.")); + this.method = (method||errors.push("SwaggerOperation " + nickname + " is missing method.")); + this.parameters = parameters != null ? parameters : []; + this.summary = summary; + this.notes = notes; + this.type = type; + this.responseMessages = (responseMessages||[]); + this.resource = (resource||errors.push("Resource is required")); + this.consumes = consumes; + this.produces = produces; + this.authorizations = authorizations; + this["do"] = __bind(this["do"], this); + + if (errors.length > 0) + this.resource.api.fail(errors); + + this.path = this.path.replace('{format}', 'json'); + this.method = this.method.toLowerCase(); + this.isGetMethod = this.method === "get"; + + this.resourceName = this.resource.name; + if(typeof this.type !== 'undefined' && this.type === 'void') + this.type = null; + else { + this.responseClassSignature = this.getSignature(this.type, this.resource.models); + this.responseSampleJSON = this.getSampleJSON(this.type, this.resource.models); + } + + for(var i = 0; i < this.parameters.length; i ++) { + var param = this.parameters[i]; + // might take this away + param.name = param.name || param.type || param.dataType; + + // for 1.1 compatibility + var type = param.type || param.dataType; + if(type === 'array') { + type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']'; + } + param.type = type; + + if(type.toLowerCase() === 'boolean') { + param.allowableValues = {}; + param.allowableValues.values = ["true", "false"]; + } + param.signature = this.getSignature(type, this.resource.models); + param.sampleJSON = this.getSampleJSON(type, this.resource.models); + + var enumValue = param["enum"]; + if(enumValue != null) { + param.isList = true; + param.allowableValues = {}; + param.allowableValues.descriptiveValues = []; + + for(var j = 0; j < enumValue.length; j++) { + var v = enumValue[j]; + if(param.defaultValue != null) { + param.allowableValues.descriptiveValues.push ({ + value: String(v), + isDefault: (v === param.defaultValue) + }); + } + else { + param.allowableValues.descriptiveValues.push ({ + value: String(v), + isDefault: false + }); + } + } + } + else if(param.allowableValues != null) { + if(param.allowableValues.valueType === "RANGE") + param.isRange = true; + else + param.isList = true; + if(param.allowableValues != null) { + param.allowableValues.descriptiveValues = []; + if(param.allowableValues.values) { + for(var j = 0; j < param.allowableValues.values.length; j++){ + var v = param.allowableValues.values[j]; + if(param.defaultValue != null) { + param.allowableValues.descriptiveValues.push ({ + value: String(v), + isDefault: (v === param.defaultValue) + }); + } + else { + param.allowableValues.descriptiveValues.push ({ + value: String(v), + isDefault: false + }); } } } } - this.resource[this.nickname] = function(args, callback, error) { - return _this["do"](args, callback, error); - }; } + } + this.resource[this.nickname] = function(args, callback, error) { + return _this["do"](args, callback, error); + }; + this.resource[this.nickname].help = function() { + return _this.help(); + }; +} - SwaggerOperation.prototype.isListType = function(dataType) { - if (dataType.indexOf('[') >= 0) { - return dataType.substring(dataType.indexOf('[') + 1, dataType.indexOf(']')); - } else { - return void 0; +SwaggerOperation.prototype.isListType = function(type) { + if (type && type.indexOf('[') >= 0) { + return type.substring(type.indexOf('[') + 1, type.indexOf(']')); + } else { + return void 0; + } +}; + +SwaggerOperation.prototype.getSignature = function(type, models) { + var isPrimitive, listType; + listType = this.isListType(type); + isPrimitive = ((listType != null) && models[listType]) || (models[type] != null) ? false : true; + if (isPrimitive) { + if (listType != null) { + return 'Array of ' + listType; + } else { + return type; + } + } else { + if (listType != null) { + return 'Array of ' + models[listType].getMockSignature(); + } else { + return models[type].getMockSignature(); + } + } +}; + +SwaggerOperation.prototype.getSampleJSON = function(type, models) { + var isPrimitive, listType, val; + listType = this.isListType(type); + isPrimitive = ((listType != null) && models[listType]) || (models[type] != null) ? false : true; + val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[type].createJSONSample()); + if (val) { + val = listType ? [val] : val; + if(typeof val == "string") + return val; + else if(typeof val === "object") { + var t = val; + if(val instanceof Array && val.length > 0) { + t = val[0]; } - }; - - SwaggerOperation.prototype.getSignature = function(dataType, models) { - var isPrimitive, listType; - listType = this.isListType(dataType); - isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true; - if (isPrimitive) { - if (listType != null) { - return 'Array of ' + listType; - } else { - return dataType; - } - } else { - if (listType != null) { - return 'Array of ' + models[listType].getMockSignature(); - } else { - return models[dataType].getMockSignature(); - } + if(t.nodeName) { + var xmlString = new XMLSerializer().serializeToString(t); + return this.formatXml(xmlString); } - }; - - SwaggerOperation.prototype.getSampleJSON = function(dataType, models) { - var isPrimitive, listType, val; - listType = this.isListType(dataType); - isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true; - val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[dataType].createJSONSample()); - if (val) { - val = listType ? [val] : val; + else return JSON.stringify(val, null, 2); - } - }; + } + else + return val; + } +}; - SwaggerOperation.prototype["do"] = function(args, callback, error) { - var body, headers; - if (args == null) { - args = {}; - } - if ((typeof args) === "function") { - error = callback; - callback = args; - args = {}; - } - if (error == null) { - error = function(xhr, textStatus, error) { - return console.log(xhr, textStatus, error); - }; - } - if (callback == null) { - callback = function(data) { - return console.log(data); - }; - } - if (args.headers != null) { - headers = args.headers; - delete args.headers; - } - if (args.body != null) { - body = args.body; - delete args.body; - } - return new SwaggerRequest(this.httpMethod, this.urlify(args), headers, body, callback, error, this); +SwaggerOperation.prototype["do"] = function(args, opts, callback, error) { + var key, param, params, possibleParams, req, requestContentType, responseContentType, value, _i, _len, _ref; + if (args == null) { + args = {}; + } + if (opts == null) { + opts = {}; + } + requestContentType = null; + responseContentType = null; + if ((typeof args) === "function") { + error = opts; + callback = args; + args = {}; + } + if ((typeof opts) === "function") { + error = callback; + callback = opts; + } + if (error == null) { + error = function(xhr, textStatus, error) { + return log(xhr, textStatus, error); }; - - SwaggerOperation.prototype.pathJson = function() { - return this.path.replace("{format}", "json"); - }; - - SwaggerOperation.prototype.pathXml = function() { - return this.path.replace("{format}", "xml"); - }; - - SwaggerOperation.prototype.urlify = function(args, includeApiKey) { - var param, queryParams, reg, url, _i, _len, _ref; - if (includeApiKey == null) { - includeApiKey = true; - } - url = this.resource.basePath + this.pathJson(); - _ref = this.parameters; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - param = _ref[_i]; - if (param.paramType === 'path') { - if (args[param.name]) { - reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi'); - url = url.replace(reg, encodeURIComponent(args[param.name])); - delete args[param.name]; - } else { - throw "" + param.name + " is a required path param."; - } - } - } - if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length > 0) { - args[this.apiKeyName] = this.resource.api.api_key; - } - if (this.supportHeaderParams()) { - queryParams = jQuery.param(this.getQueryParams(args, includeApiKey)); + } + if (callback == null) { + callback = function(response) { + var content; + content = null; + if (response != null) { + content = response.data; } else { - queryParams = jQuery.param(this.getQueryAndHeaderParams(args, includeApiKey)); + content = "no data"; } - if ((queryParams != null) && queryParams.length > 0) { - url += "?" + queryParams; + return log("default callback: " + content); + }; + } + params = {}; + params.headers = []; + if (args.headers != null) { + params.headers = args.headers; + delete args.headers; + } + + var possibleParams = []; + for(var i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + if(param.paramType === 'header') { + if(args[param.name]) + params.headers[param.name] = args[param.name]; + } + else if(param.paramType === 'form' || param.paramType.toLowerCase() === 'file') + possibleParams.push(param); + } + + if (args.body != null) { + params.body = args.body; + delete args.body; + } + + if (possibleParams) { + var key; + for (key in possibleParams) { + value = possibleParams[key]; + if (args[value.name]) { + params[value.name] = args[value.name]; } - return url; - }; + } + } - SwaggerOperation.prototype.supportHeaderParams = function() { - return this.resource.api.supportHeaderParams; - }; + req = new SwaggerRequest(this.method, this.urlify(args), params, opts, callback, error, this); + if (opts.mock != null) { + return req; + } else { + return true; + } +}; - SwaggerOperation.prototype.supportedSubmitMethods = function() { - return this.resource.api.supportedSubmitMethods; - }; +SwaggerOperation.prototype.pathJson = function() { + return this.path.replace("{format}", "json"); +}; - SwaggerOperation.prototype.getQueryAndHeaderParams = function(args, includeApiKey) { - if (includeApiKey == null) { - includeApiKey = true; +SwaggerOperation.prototype.pathXml = function() { + return this.path.replace("{format}", "xml"); +}; + +SwaggerOperation.prototype.encodePathParam = function(pathParam) { + var encParts, part, parts, _i, _len; + pathParam = pathParam.toString(); + if (pathParam.indexOf("/") === -1) { + return encodeURIComponent(pathParam); + } else { + parts = pathParam.split("/"); + encParts = []; + for (_i = 0, _len = parts.length; _i < _len; _i++) { + part = parts[_i]; + encParts.push(encodeURIComponent(part)); + } + return encParts.join("/"); + } +}; + +SwaggerOperation.prototype.urlify = function(args) { + var url = this.resource.basePath + this.pathJson(); + var params = this.parameters; + for(var i = 0; i < params.length; i ++){ + var param = params[i]; + if (param.paramType === 'path') { + if(args[param.name]) { + // apply path params and remove from args + var reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi'); + url = url.replace(reg, this.encodePathParam(args[param.name])); + delete args[param.name]; } - return this.getMatchingParams(['query', 'header'], args, includeApiKey); - }; + else + throw "" + param.name + " is a required path param."; + } + } - SwaggerOperation.prototype.getQueryParams = function(args, includeApiKey) { - if (includeApiKey == null) { - includeApiKey = true; + var queryParams = ""; + for(var i = 0; i < params.length; i ++){ + var param = params[i]; + if(param.paramType === 'query') { + if (args[param.name] !== undefined) { + if (queryParams !== '') + queryParams += "&"; + queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]); } - return this.getMatchingParams(['query'], args, includeApiKey); - }; + } + } + if ((queryParams != null) && queryParams.length > 0) + url += '?' + queryParams; + return url; +}; - SwaggerOperation.prototype.getHeaderParams = function(args, includeApiKey) { - if (includeApiKey == null) { - includeApiKey = true; - } - return this.getMatchingParams(['header'], args, includeApiKey); - }; +SwaggerOperation.prototype.supportHeaderParams = function() { + return this.resource.api.supportHeaderParams; +}; - SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args, includeApiKey) { - var matchingParams, name, param, value, _i, _len, _ref, _ref1; - matchingParams = {}; - _ref = this.parameters; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - param = _ref[_i]; - if ((jQuery.inArray(param.paramType, paramTypes) >= 0) && args[param.name]) { - matchingParams[param.name] = args[param.name]; +SwaggerOperation.prototype.supportedSubmitMethods = function() { + return this.resource.api.supportedSubmitMethods; +}; + +SwaggerOperation.prototype.getQueryParams = function(args) { + return this.getMatchingParams(['query'], args); +}; + +SwaggerOperation.prototype.getHeaderParams = function(args) { + return this.getMatchingParams(['header'], args); +}; + +SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args) { + var matchingParams = {}; + var params = this.parameters; + for (var i = 0; i < params.length; i++) { + param = params[i]; + if (args && args[param.name]) + matchingParams[param.name] = args[param.name]; + } + var headers = this.resource.api.headers; + var name; + for (name in headers) { + var value = headers[name]; + matchingParams[name] = value; + } + return matchingParams; +}; + +SwaggerOperation.prototype.help = function() { + var msg = ""; + var params = this.parameters; + for (var i = 0; i < params.length; i++) { + var param = params[i]; + if (msg !== "") + msg += "\n"; + msg += "* " + param.name + (param.required ? ' (required)' : '') + " - " + param.description; + } + return msg; +}; + + +SwaggerOperation.prototype.formatXml = function(xml) { + var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len; + reg = /(>)(<)(\/*)/g; + wsexp = /[ ]*(.*)[ ]+\n/g; + contexp = /(<.+>)(.+\n)/g; + xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2'); + pad = 0; + formatted = ''; + lines = xml.split('\n'); + indent = 0; + lastType = 'other'; + transitions = { + 'single->single': 0, + 'single->closing': -1, + 'single->opening': 0, + 'single->other': 0, + 'closing->single': 0, + 'closing->closing': -1, + 'closing->opening': 0, + 'closing->other': 0, + 'opening->single': 1, + 'opening->closing': 0, + 'opening->opening': 1, + 'opening->other': 1, + 'other->single': 0, + 'other->closing': -1, + 'other->opening': 0, + 'other->other': 0 + }; + _fn = function(ln) { + var fromTo, j, key, padding, type, types, value; + types = { + single: Boolean(ln.match(/<.+\/>/)), + closing: Boolean(ln.match(/<\/.+>/)), + opening: Boolean(ln.match(/<[^!?].*>/)) + }; + type = ((function() { + var _results; + _results = []; + for (key in types) { + value = types[key]; + if (value) { + _results.push(key); } } - if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length > 0) { - matchingParams[this.resource.api.apiKeyName] = this.resource.api.api_key; + return _results; + })())[0]; + type = type === void 0 ? 'other' : type; + fromTo = lastType + '->' + type; + lastType = type; + padding = ''; + indent += transitions[fromTo]; + padding = ((function() { + var _j, _ref5, _results; + _results = []; + for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) { + _results.push(' '); } - if (jQuery.inArray('header', paramTypes) >= 0) { - _ref1 = this.resource.api.headers; - for (name in _ref1) { - value = _ref1[name]; - matchingParams[name] = value; + return _results; + })()).join(''); + if (fromTo === 'opening->closing') { + return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n'; + } else { + return formatted += padding + ln + '\n'; + } + }; + for (_i = 0, _len = lines.length; _i < _len; _i++) { + ln = lines[_i]; + _fn(ln); + } + return formatted; +}; + +var SwaggerRequest = function(type, url, params, opts, successCallback, errorCallback, operation, execution) { + var _this = this; + var errors = []; + this.useJQuery = (typeof operation.resource.useJQuery !== 'undefined' ? operation.resource.useJQuery : null); + this.type = (type||errors.push("SwaggerRequest type is required (get/post/put/delete/patch/options).")); + this.url = (url||errors.push("SwaggerRequest url is required.")); + this.params = params; + this.opts = opts; + this.successCallback = (successCallback||errors.push("SwaggerRequest successCallback is required.")); + this.errorCallback = (errorCallback||errors.push("SwaggerRequest error callback is required.")); + this.operation = (operation||errors.push("SwaggerRequest operation is required.")); + this.execution = execution; + this.headers = (params.headers||{}); + + if(errors.length > 0) { + throw errors; + } + + this.type = this.type.toUpperCase(); + + var myHeaders = {}; + var body = params.body; + var parent = params["parent"]; + var requestContentType = "application/json"; + + var formParams = []; + var fileParams = []; + var params = this.operation.parameters; + + + for(var i = 0; i < params.length; i++) { + var param = params[i]; + if(param.paramType === "form") + formParams.push(param); + else if(param.paramType === "file") + fileParams.push(param); + } + + + if (body && (this.type === "POST" || this.type === "PUT" || this.type === "PATCH")) { + if (this.opts.requestContentType) { + requestContentType = this.opts.requestContentType; + } + } else { + // if any form params, content type must be set + if(formParams.length > 0) { + if(fileParams.length > 0) + requestContentType = "multipart/form-data"; + else + requestContentType = "application/x-www-form-urlencoded"; + } + else if (this.type == "DELETE") + body = "{}"; + else if (this.type != "DELETE") + requestContentType = null; + } + + if (requestContentType && this.operation.consumes) { + if (this.operation.consumes[requestContentType] === 'undefined') { + log("server doesn't consume " + requestContentType + ", try " + JSON.stringify(this.operation.consumes)); + if (this.requestContentType === null) { + requestContentType = this.operation.consumes[0]; + } + } + } + + var responseContentType = null; + if (this.opts.responseContentType) { + responseContentType = this.opts.responseContentType; + } else { + responseContentType = "application/json"; + } + if (responseContentType && this.operation.produces) { + if (this.operation.produces[responseContentType] === 'undefined') { + log("server can't produce " + responseContentType); + } + } + if (requestContentType && requestContentType.indexOf("application/x-www-form-urlencoded") === 0) { + var fields = {}; + var possibleParams = {}; + var values = {}; + var key; + for(key in formParams){ + var param = formParams[key]; + values[param.name] = param; + } + + var encoded = ""; + var key; + for(key in values) { + value = this.params[key]; + if(typeof value !== 'undefined'){ + if(encoded !== "") + encoded += "&"; + encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); + } + } + body = encoded; + } + var name; + for (name in this.headers) + myHeaders[name] = this.headers[name]; + if ((requestContentType && body !== "") || (requestContentType === "application/x-www-form-urlencoded")) + myHeaders["Content-Type"] = requestContentType; + if (responseContentType) + myHeaders["Accept"] = responseContentType; + + if (!((this.headers != null) && (this.headers.mock != null))) { + obj = { + url: this.url, + method: this.type, + headers: myHeaders, + body: body, + useJQuery: this.useJQuery, + on: { + error: function(response) { + return _this.errorCallback(response, _this.opts.parent); + }, + redirect: function(response) { + return _this.successCallback(response, _this.opts.parent); + }, + 307: function(response) { + return _this.successCallback(response, _this.opts.parent); + }, + response: function(response) { + return _this.successCallback(response, _this.opts.parent); } } - return matchingParams; }; + var e; + if (typeof window !== 'undefined') { + e = window; + } else { + e = exports; + } + status = e.authorizations.apply(obj, this.operation.authorizations); + if (opts.mock == null) { + if (status !== false) { + new SwaggerHttp().execute(obj); + } else { + obj.canceled = true; + } + } else { + return obj; + } + } +}; - SwaggerOperation.prototype.help = function() { - var parameter, _i, _len, _ref; - _ref = this.parameters; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - parameter = _ref[_i]; - console.log(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); - } - return this; - }; +SwaggerRequest.prototype.asCurl = function() { + var results = []; + if(this.headers) { + var key; + for(key in this.headers) { + results.push("--header \"" + key + ": " + this.headers[v] + "\""); + } + } + return "curl " + (results.join(" ")) + " " + this.url; +}; - return SwaggerOperation; +/** + * SwaggerHttp is a wrapper for executing requests + */ +var SwaggerHttp = function() {}; - })(); +SwaggerHttp.prototype.execute = function(obj) { + if(obj && (typeof obj.useJQuery === 'boolean')) + this.useJQuery = obj.useJQuery; + else + this.useJQuery = this.isIE8(); - SwaggerRequest = (function() { + if(this.useJQuery) + return new JQueryHttpClient().execute(obj); + else + return new ShredHttpClient().execute(obj); +} - function SwaggerRequest(type, url, headers, body, successCallback, errorCallback, operation) { - var obj, - _this = this; - this.type = type; - this.url = url; - this.headers = headers; - this.body = body; - this.successCallback = successCallback; - this.errorCallback = errorCallback; - this.operation = operation; - if (this.type == null) { - throw "SwaggerRequest type is required (get/post/put/delete)."; +SwaggerHttp.prototype.isIE8 = function() { + var detectedIE = false; + if (typeof navigator !== 'undefined' && navigator.userAgent) { + nav = navigator.userAgent.toLowerCase(); + if (nav.indexOf('msie') !== -1) { + var version = parseInt(nav.split('msie')[1]); + if (version <= 8) { + detectedIE = true; } - if (this.url == null) { - throw "SwaggerRequest url is required."; - } - if (this.successCallback == null) { - throw "SwaggerRequest successCallback is required."; - } - if (this.errorCallback == null) { - throw "SwaggerRequest error callback is required."; - } - if (this.operation == null) { - throw "SwaggerRequest operation is required."; - } - if (this.operation.resource.api.verbose) { - console.log(this.asCurl()); - } - this.headers || (this.headers = {}); - if (this.operation.resource.api.api_key != null) { - this.headers[this.apiKeyName] = this.operation.resource.api.api_key; - } - if (this.headers.mock == null) { - obj = { - type: this.type, - url: this.url, - data: JSON.stringify(this.body), - dataType: 'json', - error: function(xhr, textStatus, error) { - return _this.errorCallback(xhr, textStatus, error); - }, - success: function(data) { - return _this.successCallback(data); - } - }; - if (obj.type.toLowerCase() === "post" || obj.type.toLowerCase() === "put") { - obj.contentType = "application/json"; + } + } + return detectedIE; +}; + +/* + * JQueryHttpClient lets a browser take advantage of JQuery's cross-browser magic. + * NOTE: when jQuery is available it will export both '$' and 'jQuery' to the global space. + * Since we are using closures here we need to alias it for internal use. + */ +var JQueryHttpClient = function(options) { + "use strict"; + if(!jQuery){ + var jQuery = window.jQuery; + } +} + +JQueryHttpClient.prototype.execute = function(obj) { + var cb = obj.on; + var request = obj; + + obj.type = obj.method; + obj.cache = false; + + obj.beforeSend = function(xhr) { + var key, results; + if (obj.headers) { + results = []; + var key; + for (key in obj.headers) { + if (key.toLowerCase() === "content-type") { + results.push(obj.contentType = obj.headers[key]); + } else if (key.toLowerCase() === "accept") { + results.push(obj.accepts = obj.headers[key]); + } else { + results.push(xhr.setRequestHeader(key, obj.headers[key])); } - jQuery.ajax(obj); + } + return results; + } + }; + + obj.data = obj.body; + obj.complete = function(response, textStatus, opts) { + var headers = {}, + headerArray = response.getAllResponseHeaders().split("\n"); + + for(var i = 0; i < headerArray.length; i++) { + var toSplit = headerArray[i].trim(); + if(toSplit.length === 0) + continue; + var separator = toSplit.indexOf(":"); + if(separator === -1) { + // Name but no value in the header + headers[toSplit] = null; + continue; + } + var name = toSplit.substring(0, separator).trim(), + value = toSplit.substring(separator + 1).trim(); + headers[name] = value; + } + + var out = { + url: request.url, + method: request.method, + status: response.status, + data: response.responseText, + headers: headers + }; + + var contentType = (headers["content-type"]||headers["Content-Type"]||null) + + if(contentType != null) { + if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) { + if(response.responseText && response.responseText !== "") + out.obj = JSON.parse(response.responseText); + else + out.obj = {} } } - SwaggerRequest.prototype.asCurl = function() { - var header_args, k, v; - header_args = (function() { - var _ref, _results; - _ref = this.headers; - _results = []; - for (k in _ref) { - v = _ref[k]; - _results.push("--header \"" + k + ": " + v + "\""); - } - return _results; - }).call(this); - return "curl " + (header_args.join(" ")) + " " + this.url; + if(response.status >= 200 && response.status < 300) + cb.response(out); + else if(response.status === 0 || (response.status >= 400 && response.status < 599)) + cb.error(out); + else + return cb.response(out); + }; + + jQuery.support.cors = true; + return jQuery.ajax(obj); +} + +/* + * ShredHttpClient is a light-weight, node or browser HTTP client + */ +var ShredHttpClient = function(options) { + this.options = (options||{}); + this.isInitialized = false; + + var identity, toString; + + if (typeof window !== 'undefined') { + this.Shred = require("./shred"); + this.content = require("./shred/content"); + } + else + this.Shred = require("shred"); + this.shred = new this.Shred(); +} + +ShredHttpClient.prototype.initShred = function () { + this.isInitialized = true; + this.registerProcessors(this.shred); +} + +ShredHttpClient.prototype.registerProcessors = function(shred) { + var identity = function(x) { + return x; + }; + var toString = function(x) { + return x.toString(); + }; + + if (typeof window !== 'undefined') { + this.content.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], { + parser: identity, + stringify: toString + }); + } else { + this.Shred.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], { + parser: identity, + stringify: toString + }); + } +} + +ShredHttpClient.prototype.execute = function(obj) { + if(!this.isInitialized) + this.initShred(); + + var cb = obj.on, res; + + var transform = function(response) { + var out = { + headers: response._headers, + url: response.request.url, + method: response.request.method, + status: response.status, + data: response.content.data }; - return SwaggerRequest; + var contentType = (response._headers["content-type"]||response._headers["Content-Type"]||null) - })(); + if(contentType != null) { + if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) { + if(response.content.data && response.content.data !== "") + out.obj = JSON.parse(response.content.data); + else + out.obj = {} + } + } + return out; + }; - window.SwaggerApi = SwaggerApi; + res = { + error: function(response) { + if (obj) + return cb.error(transform(response)); + }, + redirect: function(response) { + if (obj) + return cb.redirect(transform(response)); + }, + 307: function(response) { + if (obj) + return cb.redirect(transform(response)); + }, + response: function(response) { + if (obj) + return cb.response(transform(response)); + } + }; + if (obj) { + obj.on = res; + } + return this.shred.request(obj); +}; - window.SwaggerResource = SwaggerResource; +/** + * SwaggerAuthorizations applys the correct authorization to an operation being executed + */ +var SwaggerAuthorizations = function() { + this.authz = {}; +}; - window.SwaggerOperation = SwaggerOperation; +SwaggerAuthorizations.prototype.add = function(name, auth) { + this.authz[name] = auth; + return auth; +}; - window.SwaggerRequest = SwaggerRequest; +SwaggerAuthorizations.prototype.remove = function(name) { + return delete this.authz[name]; +}; - window.SwaggerModelProperty = SwaggerModelProperty; +SwaggerAuthorizations.prototype.apply = function(obj, authorizations) { + var status = null; + var key; -}).call(this); + if(typeof authorizations === 'undefined') { + // apply all keys since no authorizations hash is defined + for (key in this.authz) { + value = this.authz[key]; + result = value.apply(obj, authorizations); + if (result === true) + status = true; + } + } + else { + for(name in authorizations) { + for (key in this.authz) { + if(key == name) { + value = this.authz[key]; + result = value.apply(obj, authorizations); + if (result === true) + status = true; + } + } + } + } + + return status; +}; + +/** + * ApiKeyAuthorization allows a query param or header to be injected + */ +var ApiKeyAuthorization = function(name, value, type) { + this.name = name; + this.value = value; + this.type = type; +}; + +ApiKeyAuthorization.prototype.apply = function(obj, authorizations) { + if (this.type === "query") { + if (obj.url.indexOf('?') > 0) + obj.url = obj.url + "&" + this.name + "=" + this.value; + else + obj.url = obj.url + "?" + this.name + "=" + this.value; + return true; + } else if (this.type === "header") { + obj.headers[this.name] = this.value; + return true; + } +}; + +var CookieAuthorization = function(cookie) { + this.cookie = cookie; +} + +CookieAuthorization.prototype.apply = function(obj, authorizations) { + obj.cookieJar = obj.cookieJar || CookieJar(); + obj.cookieJar.setCookie(this.cookie); + return true; +} + +/** + * Password Authorization is a basic auth implementation + */ +var PasswordAuthorization = function(name, username, password) { + this.name = name; + this.username = username; + this.password = password; + this._btoa = null; + if (typeof window !== 'undefined') + this._btoa = btoa; + else + this._btoa = require("btoa"); +}; + +PasswordAuthorization.prototype.apply = function(obj, authorizations) { + var base64encoder = this._btoa; + obj.headers["Authorization"] = "Basic " + base64encoder(this.username + ":" + this.password); + return true; +}; + +var e = (typeof window !== 'undefined' ? window : exports); + +var sampleModels = {}; +var cookies = {}; + +e.SampleModels = sampleModels; +e.SwaggerHttp = SwaggerHttp; +e.SwaggerRequest = SwaggerRequest; +e.authorizations = new SwaggerAuthorizations(); +e.ApiKeyAuthorization = ApiKeyAuthorization; +e.PasswordAuthorization = PasswordAuthorization; +e.CookieAuthorization = CookieAuthorization; +e.JQueryHttpClient = JQueryHttpClient; +e.ShredHttpClient = ShredHttpClient; +e.SwaggerOperation = SwaggerOperation; +e.SwaggerModel = SwaggerModel; +e.SwaggerModelProperty = SwaggerModelProperty; +e.SwaggerResource = SwaggerResource; +e.SwaggerApi = SwaggerApi; diff --git a/public/o2c.html b/public/o2c.html new file mode 100644 index 0000000..d32d130 --- /dev/null +++ b/public/o2c.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/public/swagger-ui.js b/public/swagger-ui.js index 1f85869..770b1de 100644 --- a/public/swagger-ui.js +++ b/public/swagger-ui.js @@ -1,3 +1,5 @@ +// swagger-ui.js +// version 2.0.17 $(function() { // Helper function for vertically aligning DOM elements @@ -62,9 +64,14 @@ function clippyCopiedCallback(a) { } // Logging function that accounts for browsers that don't have window.console -function log() { - if (window.console) console.log.apply(console,arguments); -} +log = function(){ + log.history = log.history || []; + log.history.push(arguments); + if(this.console){ + console.log( Array.prototype.slice.call(arguments) ); + } +}; + // Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) if (Function.prototype.bind && console && typeof console.log == "object") { [ @@ -86,7 +93,7 @@ var Docs = { switch (fragments.length) { case 1: // Expand all operations for the resource and scroll to it -// log('shebang resource:' + fragments[0]); + log('shebang resource:' + fragments[0]); var dom_id = 'resource_' + fragments[0]; Docs.expandEndpointListForResource(fragments[0]); @@ -94,18 +101,18 @@ var Docs = { break; case 2: // Refer to the endpoint DOM element, e.g. #words_get_search -// log('shebang endpoint: ' + fragments.join('_')); + log('shebang endpoint: ' + fragments.join('_')); - // Expand Resource - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); + // Expand Resource + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); - // Expand operation + // Expand operation var li_dom_id = fragments.join('_'); var li_content_dom_id = li_dom_id + "_content"; -// log("li_dom_id " + li_dom_id); -// log("li_content_dom_id " + li_content_dom_id); + log("li_dom_id " + li_dom_id); + log("li_content_dom_id " + li_content_dom_id); Docs.expandOperation($('#'+li_content_dom_id)); $('#'+li_dom_id).slideto({highlight: false}); @@ -180,9 +187,7 @@ var Docs = { collapseOperation: function(elem) { elem.slideUp(); } - -}; -(function() { +};(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; @@ -192,7 +197,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; function program1(depth0,data) { var buffer = "", stack1; - buffer += "\n "; + buffer += "\n "; stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n"; @@ -214,7 +219,7 @@ function program2(depth0,data) { function program4(depth0,data) { - return "\n \n"; + return "\n \n"; } buffer += "\n\n \n \n \n "; + return "\n

    Response Class

    \n

    \n
    \n
    \n "; } - buffer += "\n
      \n
    • \n \n \n Parameter\n Value\n Description\n Parameter Type\n Data Type\n \n \n \n\n \n \n "; + } + +function program16(depth0,data) { + + + return "\n
      \n

      Response Messages

      \n \n \n \n \n \n \n \n \n \n \n \n
      HTTP Status CodeReasonResponse Model
      \n "; + } + +function program18(depth0,data) { + + + return "\n "; + } + +function program20(depth0,data) { + + var buffer = "", stack1; + buffer += "\n
      \n \n \n \n
      \n "; + return buffer; + } + + buffer += "\n \n"; + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.type, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n
      \n
      \n "; + stack1 = helpers['if'].call(depth0, depth0.parameters, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.responseMessages, {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.isReadOnly, {hash:{},inverse:self.program(20, program20, data),fn:self.program(18, program18, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n
      \n \n
    \n \n \n"; return buffer; }); })(); @@ -442,7 +524,7 @@ function program2(depth0,data) { if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "'/>\n "; + + "'/>\n
    \n "; return buffer; } @@ -477,7 +559,7 @@ function program7(depth0,data) { if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "'>\n
    \n
    \n "; + + "'>\n
    \n
    \n "; return buffer; } @@ -531,7 +613,7 @@ function program12(depth0,data) { if (stack1 = helpers.paramType) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.paramType; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n \n\n\n"; + buffer += "\n\n \n\n"; return buffer; }); })(); @@ -541,63 +623,70 @@ function program12(depth0,data) { templates['param_list'] = template(function (Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - var buffer = "", stack1, stack2, self=this, functionType="function", escapeExpression=this.escapeExpression; + var buffer = "", stack1, stack2, options, self=this, helperMissing=helpers.helperMissing, functionType="function", escapeExpression=this.escapeExpression; function program1(depth0,data) { + return " multiple='multiple'"; + } + +function program3(depth0,data) { + + + return "\n "; + } + +function program5(depth0,data) { + + var buffer = "", stack1; + buffer += "\n "; + stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(8, program8, data),fn:self.program(6, program6, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; + return buffer; + } +function program6(depth0,data) { + + + return "\n "; + } + +function program8(depth0,data) { + + var buffer = "", stack1, stack2, options; + buffer += "\n "; + options = {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data}; + stack2 = ((stack1 = helpers.isArray || depth0.isArray),stack1 ? stack1.call(depth0, depth0, options) : helperMissing.call(depth0, "isArray", depth0, options)); + if(stack2 || stack2 === 0) { buffer += stack2; } + buffer += "\n "; + return buffer; + } +function program9(depth0,data) { + + return "\n "; } -function program3(depth0,data) { - - var buffer = "", stack1; - buffer += "\n "; - stack1 = helpers['if'].call(depth0, depth0.defaultValue, {hash:{},inverse:self.program(6, program6, data),fn:self.program(4, program4, data),data:data}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - return buffer; - } -function program4(depth0,data) { - - - return "\n "; - } - -function program6(depth0,data) { - - - return "\n \n "; - } - -function program8(depth0,data) { - - var buffer = "", stack1; - buffer += "\n "; - stack1 = helpers['if'].call(depth0, depth0.isDefault, {hash:{},inverse:self.program(11, program11, data),fn:self.program(9, program9, data),data:data}); - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - return buffer; - } -function program9(depth0,data) { - - var buffer = "", stack1; - buffer += "\n \n "; - return buffer; - } - function program11(depth0,data) { + + return "\n \n "; + } + +function program13(depth0,data) { + var buffer = "", stack1; - buffer += "\n \n "; return buffer; } @@ -613,17 +717,21 @@ function program11(depth0,data) { if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "\n\n \n "; + stack2 = helpers['if'].call(depth0, depth0.required, {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data}); + if(stack2 || stack2 === 0) { buffer += stack2; } + buffer += "\n "; + stack2 = helpers.each.call(depth0, ((stack1 = depth0.allowableValues),stack1 == null || stack1 === false ? stack1 : stack1.descriptiveValues), {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data}); + if(stack2 || stack2 === 0) { buffer += stack2; } + buffer += "\n \n\n"; if (stack2 = helpers.description) { stack2 = stack2.call(depth0, {hash:{},data:data}); } else { stack2 = depth0.description; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } if(stack2 || stack2 === 0) { buffer += stack2; } @@ -631,7 +739,7 @@ function program11(depth0,data) { if (stack2 = helpers.paramType) { stack2 = stack2.call(depth0, {hash:{},data:data}); } else { stack2 = depth0.paramType; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } if(stack2 || stack2 === 0) { buffer += stack2; } - buffer += "\n\n"; + buffer += "\n"; return buffer; }); })(); @@ -830,7 +938,7 @@ function program7(depth0,data) { if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "'>\n
    \n
    \n "; + + "'>\n
    \n
    \n "; return buffer; } @@ -909,59 +1017,159 @@ function program15(depth0,data) { }); })(); +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['parameter_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, functionType="function", self=this; + +function program1(depth0,data) { + + var buffer = "", stack1; + buffer += "\n "; + stack1 = helpers.each.call(depth0, depth0.consumes, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer; + } +function program2(depth0,data) { + + var buffer = "", stack1; + buffer += "\n \n "; + return buffer; + } + +function program4(depth0,data) { + + + return "\n \n"; + } + + buffer += "\n\n"; + return buffer; + }); +})(); + (function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression; + var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing; +function program1(depth0,data) { + + + return " : "; + } - buffer += "\n
      Raw\n \n
    \n
    \n\n"; return buffer; }); })(); +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['response_content_type'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, functionType="function", self=this; + +function program1(depth0,data) { + + var buffer = "", stack1; + buffer += "\n "; + stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n"; + return buffer; + } +function program2(depth0,data) { + + var buffer = "", stack1; + buffer += "\n \n "; + return buffer; + } + +function program4(depth0,data) { + + + return "\n \n"; + } + + buffer += "\n\n"; + return buffer; + }); +})(); + (function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['signature'] = template(function (Handlebars,depth0,helpers,partials,data) { @@ -996,28 +1204,28 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; else { stack1 = depth0.code; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) + "\n"; - if (stack1 = helpers.reason) { stack1 = stack1.call(depth0, {hash:{},data:data}); } - else { stack1 = depth0.reason; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if (stack1 = helpers.message) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.message; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n\n"; + buffer += "\n"; return buffer; }); })(); -// Generated by CoffeeScript 1.5.0 +// Generated by CoffeeScript 1.6.3 (function() { - var ContentTypeView, HeaderView, MainView, OperationView, ParameterView, ResourceView, SignatureView, StatusCodeView, SwaggerUi, + var ContentTypeView, HeaderView, MainView, OperationView, ParameterContentTypeView, ParameterView, ResourceView, ResponseContentTypeView, SignatureView, StatusCodeView, SwaggerUi, _ref, _ref1, _ref10, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; SwaggerUi = (function(_super) { - __extends(SwaggerUi, _super); function SwaggerUi() { - SwaggerUi.__super__.constructor.apply(this, arguments); + _ref = SwaggerUi.__super__.constructor.apply(this, arguments); + return _ref; } SwaggerUi.prototype.dom_id = "swagger_ui"; @@ -1061,18 +1269,24 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }; SwaggerUi.prototype.updateSwaggerUi = function(data) { - this.options.discoveryUrl = data.discoveryUrl; - this.options.apiKey = data.apiKey; + this.options.url = data.url; return this.load(); }; SwaggerUi.prototype.load = function() { - var _ref; - if ((_ref = this.mainView) != null) { - _ref.clear(); + var url, _ref1; + if ((_ref1 = this.mainView) != null) { + _ref1.clear(); } - this.headerView.update(this.options.discoveryUrl, this.options.apiKey); - return this.api = new SwaggerApi(this.options); + url = this.options.url; + if (url.indexOf("http") !== 0) { + url = this.buildUrl(window.location.href.toString(), url); + } + this.options.url = url; + this.headerView.update(url); + this.api = new SwaggerApi(this.options); + this.api.build(); + return this.api; }; SwaggerUi.prototype.render = function() { @@ -1098,12 +1312,41 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }, 400); }; + SwaggerUi.prototype.buildUrl = function(base, url) { + var endOfPath, parts; + log("base is " + base); + if (url.indexOf("/") === 0) { + parts = base.split("/"); + base = parts[0] + "//" + parts[2]; + return base + url; + } else { + endOfPath = base.length; + if (base.indexOf("?") > -1) { + endOfPath = Math.min(endOfPath, base.indexOf("?")); + } + if (base.indexOf("#") > -1) { + endOfPath = Math.min(endOfPath, base.indexOf("#")); + } + base = base.substring(0, endOfPath); + if (base.indexOf("/", base.length - 1) !== -1) { + return base + url; + } + return base + "/" + url; + } + }; + SwaggerUi.prototype.showMessage = function(data) { if (data == null) { data = ''; } $('#message-bar').removeClass('message-fail'); - $('#message-bar').addClass('message-success'); + $('#message-bar').removeClass('message-none'); + $('#message-bar').removeClass('message-success'); + if (data.length > 0) { + $('#message-bar').addClass('message-success'); + } else { + $('#message-bar').addClass('message-none'); + } return $('#message-bar').html(data); }; @@ -1112,8 +1355,14 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; if (data == null) { data = ''; } + $('#message-bar').removeClass('message-fail'); + $('#message-bar').removeClass('message-none'); $('#message-bar').removeClass('message-success'); - $('#message-bar').addClass('message-fail'); + if (data.length > 0) { + $('#message-bar').addClass('message-fail'); + } else { + $('#message-bar').addClass('message-none'); + } val = $('#message-bar').html(data); if (this.options.onFailure != null) { this.options.onFailure(data); @@ -1128,11 +1377,11 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; window.SwaggerUi = SwaggerUi; HeaderView = (function(_super) { - __extends(HeaderView, _super); function HeaderView() { - HeaderView.__super__.constructor.apply(this, arguments); + _ref1 = HeaderView.__super__.constructor.apply(this, arguments); + return _ref1; } HeaderView.prototype.events = { @@ -1147,15 +1396,13 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; HeaderView.prototype.showPetStore = function(e) { return this.trigger('update-swagger-ui', { - discoveryUrl: "http://petstore.swagger.wordnik.com/api/api-docs.json", - apiKey: "special-key" + url: "http://petstore.swagger.wordnik.com/api/api-docs" }); }; HeaderView.prototype.showWordnikDev = function(e) { return this.trigger('update-swagger-ui', { - discoveryUrl: "http://api.wordnik.com/v4/resources.json", - apiKey: "" + url: "http://api.wordnik.com/v4/resources.json" }); }; @@ -1170,7 +1417,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; e.preventDefault(); } return this.trigger('update-swagger-ui', { - discoveryUrl: $('#input_baseUrl').val(), + url: $('#input_baseUrl').val(), apiKey: $('#input_apiKey').val() }); }; @@ -1180,11 +1427,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; trigger = false; } $('#input_baseUrl').val(url); - $('#input_apiKey').val(apiKey); if (trigger) { return this.trigger('update-swagger-ui', { - discoveryUrl: url, - apiKey: apiKey + url: url }); } }; @@ -1194,21 +1439,30 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); MainView = (function(_super) { - __extends(MainView, _super); function MainView() { - MainView.__super__.constructor.apply(this, arguments); + _ref2 = MainView.__super__.constructor.apply(this, arguments); + return _ref2; } MainView.prototype.initialize = function() {}; MainView.prototype.render = function() { - var resource, _i, _len, _ref; + var counter, id, resource, resources, _i, _len, _ref3; $(this.el).html(Handlebars.templates.main(this.model)); - _ref = this.model.apisArray; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - resource = _ref[_i]; + resources = {}; + counter = 0; + _ref3 = this.model.apisArray; + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + resource = _ref3[_i]; + id = resource.name; + while (typeof resources[id] !== 'undefined') { + id = id + "_" + counter; + counter += 1; + } + resource.id = id; + resources[id] = resource; this.addResource(resource); } return this; @@ -1219,7 +1473,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; resourceView = new ResourceView({ model: resource, tagName: 'li', - id: 'resource_' + resource.name, + id: 'resource_' + resource.id, className: 'resource' }); return $('#resources').append(resourceView.render().el); @@ -1234,22 +1488,32 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); ResourceView = (function(_super) { - __extends(ResourceView, _super); function ResourceView() { - ResourceView.__super__.constructor.apply(this, arguments); + _ref3 = ResourceView.__super__.constructor.apply(this, arguments); + return _ref3; } ResourceView.prototype.initialize = function() {}; ResourceView.prototype.render = function() { - var operation, _i, _len, _ref; + var counter, id, methods, operation, _i, _len, _ref4; $(this.el).html(Handlebars.templates.resource(this.model)); - this.number = 0; - _ref = this.model.operationsArray; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - operation = _ref[_i]; + methods = {}; + _ref4 = this.model.operationsArray; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + operation = _ref4[_i]; + counter = 0; + id = operation.nickname; + while (typeof methods[id] !== 'undefined') { + id = id + "_" + counter; + counter += 1; + } + methods[id] = operation; + operation.nickname = id; + operation.parentId = this.model.id; + operation.swaggerRoot = $("script[src]").last().attr("src").split('?')[0].split('/').slice(0, -1).join('/') + '/..'; this.addOperation(operation); } return this; @@ -1272,28 +1536,85 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); OperationView = (function(_super) { - __extends(OperationView, _super); function OperationView() { - OperationView.__super__.constructor.apply(this, arguments); + _ref4 = OperationView.__super__.constructor.apply(this, arguments); + return _ref4; } + OperationView.prototype.invocationUrl = null; + OperationView.prototype.events = { 'submit .sandbox': 'submitOperation', 'click .submit': 'submitOperation', 'click .response_hider': 'hideResponse', - 'click .toggleOperation': 'toggleOperationContent' + 'click .toggleOperation': 'toggleOperationContent', + 'mouseenter .api-ic': 'mouseEnter', + 'mouseout .api-ic': 'mouseExit' }; OperationView.prototype.initialize = function() {}; + OperationView.prototype.mouseEnter = function(e) { + var elem, hgh, pos, scMaxX, scMaxY, scX, scY, wd, x, y; + elem = $(e.currentTarget.parentNode).find('#api_information_panel'); + x = event.pageX; + y = event.pageY; + scX = $(window).scrollLeft(); + scY = $(window).scrollTop(); + scMaxX = scX + $(window).width(); + scMaxY = scY + $(window).height(); + wd = elem.width(); + hgh = elem.height(); + if (x + wd > scMaxX) { + x = scMaxX - wd; + } + if (x < scX) { + x = scX; + } + if (y + hgh > scMaxY) { + y = scMaxY - hgh; + } + if (y < scY) { + y = scY; + } + pos = {}; + pos.top = y; + pos.left = x; + elem.css(pos); + return $(e.currentTarget.parentNode).find('#api_information_panel').show(); + }; + + OperationView.prototype.mouseExit = function(e) { + return $(e.currentTarget.parentNode).find('#api_information_panel').hide(); + }; + OperationView.prototype.render = function() { - var contentTypeModel, contentTypeView, isMethodSubmissionSupported, param, responseSignatureView, signatureModel, statusCode, _i, _j, _len, _len1, _ref, _ref1; - isMethodSubmissionSupported = jQuery.inArray(this.model.httpMethod, this.model.supportedSubmitMethods()) >= 0; + var contentTypeModel, isMethodSubmissionSupported, k, o, param, responseContentTypeView, responseSignatureView, signatureModel, statusCode, type, v, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref5, _ref6, _ref7, _ref8; + isMethodSubmissionSupported = true; if (!isMethodSubmissionSupported) { this.model.isReadOnly = true; } + this.model.oauth = null; + if (this.model.authorizations) { + _ref5 = this.model.authorizations; + for (k in _ref5) { + v = _ref5[k]; + if (k === "oauth2") { + if (this.model.oauth === null) { + this.model.oauth = {}; + } + if (this.model.oauth.scopes === void 0) { + this.model.oauth.scopes = []; + } + for (_i = 0, _len = v.length; _i < _len; _i++) { + o = v[_i]; + this.model.oauth.scopes.push(o); + } + } + } + } $(this.el).html(Handlebars.templates.operation(this.model)); if (this.model.responseClassSignature && this.model.responseClassSignature !== 'string') { signatureModel = { @@ -1307,36 +1628,44 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }); $('.model-signature', $(this.el)).append(responseSignatureView.render().el); } else { - $('.model-signature', $(this.el)).html(this.model.responseClass); + $('.model-signature', $(this.el)).html(this.model.type); } contentTypeModel = { isParam: false }; - if (this.model.supportedContentTypes) { - contentTypeModel.produces = this.model.supportedContentTypes; + contentTypeModel.consumes = this.model.consumes; + contentTypeModel.produces = this.model.produces; + _ref6 = this.model.parameters; + for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { + param = _ref6[_j]; + type = param.type || param.dataType; + if (type.toLowerCase() === 'file') { + if (!contentTypeModel.consumes) { + log("set content type "); + contentTypeModel.consumes = 'multipart/form-data'; + } + } } - if (this.model.produces) { - contentTypeModel.produces = this.model.produces; - } - contentTypeView = new ContentTypeView({ + responseContentTypeView = new ResponseContentTypeView({ model: contentTypeModel }); - $('.content-type', $(this.el)).append(contentTypeView.render().el); - _ref = this.model.parameters; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - param = _ref[_i]; - this.addParameter(param); + $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el); + _ref7 = this.model.parameters; + for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) { + param = _ref7[_k]; + this.addParameter(param, contentTypeModel.consumes); } - _ref1 = this.model.errorResponses; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - statusCode = _ref1[_j]; + _ref8 = this.model.responseMessages; + for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) { + statusCode = _ref8[_l]; this.addStatusCode(statusCode); } return this; }; - OperationView.prototype.addParameter = function(param) { + OperationView.prototype.addParameter = function(param, consumes) { var paramView; + param.consumes = consumes; paramView = new ParameterView({ model: param, tagName: 'tr', @@ -1355,8 +1684,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }; OperationView.prototype.submitOperation = function(e) { - var bodyParam, consumes, error_free, form, headerParams, invocationUrl, isFileUpload, isFormPost, map, o, obj, param, paramContentTypeField, responseContentTypeField, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4, - _this = this; + var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7; if (e != null) { e.preventDefault(); } @@ -1377,105 +1705,158 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }); if (error_free) { map = {}; - _ref = form.serializeArray(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - o = _ref[_i]; + opts = { + parent: this + }; + isFileUpload = false; + _ref5 = form.find("input"); + for (_i = 0, _len = _ref5.length; _i < _len; _i++) { + o = _ref5[_i]; if ((o.value != null) && jQuery.trim(o.value).length > 0) { map[o.name] = o.value; } - } - isFileUpload = form.children().find('input[type~="file"]').size() !== 0; - isFormPost = false; - consumes = "application/json"; - if (this.model.consumes && this.model.consumes.length > 0) { - consumes = this.model.consumes[0]; - } else { - _ref1 = this.model.parameters; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - o = _ref1[_j]; - if (o.paramType === 'form') { - isFormPost = true; - consumes = false; - } - } - if (isFileUpload) { - consumes = false; - } else if (this.model.httpMethod.toLowerCase() === "post" && isFormPost === false) { - consumes = "application/json"; + if (o.type === "file") { + isFileUpload = true; } } - if (isFileUpload) { - bodyParam = new FormData(); - _ref2 = this.model.parameters; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - param = _ref2[_k]; - if ((param.paramType === 'body' || 'form') && param.name !== 'file' && param.name !== 'File' && (map[param.name] != null)) { - bodyParam.append(param.name, map[param.name]); - } - } - $.each(form.children().find('input[type~="file"]'), function(i, el) { - return bodyParam.append($(el).attr('name'), el.files[0]); - }); - console.log(bodyParam); - } else if (isFormPost) { - bodyParam = new FormData(); - _ref3 = this.model.parameters; - for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { - param = _ref3[_l]; - if (map[param.name] != null) { - bodyParam.append(param.name, map[param.name]); - } - } - } else { - bodyParam = null; - _ref4 = this.model.parameters; - for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) { - param = _ref4[_m]; - if (param.paramType === 'body') { - bodyParam = map[param.name]; - } + _ref6 = form.find("textarea"); + for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { + o = _ref6[_j]; + if ((o.value != null) && jQuery.trim(o.value).length > 0) { + map["body"] = o.value; } } - log("bodyParam = " + bodyParam); - headerParams = null; - invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true); - log('submitting ' + invocationUrl); - $(".request_url", $(this.el)).html("
    " + invocationUrl + "
    "); + _ref7 = form.find("select"); + for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) { + o = _ref7[_k]; + val = this.getSelectedValue(o); + if ((val != null) && jQuery.trim(val).length > 0) { + map[o.name] = val; + } + } + opts.responseContentType = $("div select[name=responseContentType]", $(this.el)).val(); + opts.requestContentType = $("div select[name=parameterContentType]", $(this.el)).val(); $(".response_throbber", $(this.el)).show(); - obj = { - type: this.model.httpMethod, - url: invocationUrl, - headers: headerParams, - data: bodyParam, - contentType: consumes, - dataType: 'json', - processData: false, - error: function(xhr, textStatus, error) { - return _this.showErrorStatus(xhr, textStatus, error); - }, - success: function(data) { - return _this.showResponse(data); - }, - complete: function(data) { - return _this.showCompleteStatus(data); + if (isFileUpload) { + return this.handleFileUpload(map, form); + } else { + return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this); + } + } + }; + + OperationView.prototype.success = function(response, parent) { + return parent.showCompleteStatus(response); + }; + + OperationView.prototype.handleFileUpload = function(map, form) { + var bodyParam, el, headerParams, o, obj, param, params, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref5, _ref6, _ref7, _ref8, + _this = this; + _ref5 = form.serializeArray(); + for (_i = 0, _len = _ref5.length; _i < _len; _i++) { + o = _ref5[_i]; + if ((o.value != null) && jQuery.trim(o.value).length > 0) { + map[o.name] = o.value; + } + } + bodyParam = new FormData(); + params = 0; + _ref6 = this.model.parameters; + for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { + param = _ref6[_j]; + if (param.paramType === 'form') { + if (map[param.name] !== void 0) { + bodyParam.append(param.name, map[param.name]); } - }; - paramContentTypeField = $("td select[name=contentType]", $(this.el)).val(); - if (paramContentTypeField) { - obj.contentType = paramContentTypeField; } - log('content type = ' + obj.contentType); - if (!(obj.data || (obj.type === 'GET' || obj.type === 'DELETE')) && obj.contentType === !"application/x-www-form-urlencoded") { - obj.contentType = false; + } + headerParams = {}; + _ref7 = this.model.parameters; + for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) { + param = _ref7[_k]; + if (param.paramType === 'header') { + headerParams[param.name] = map[param.name]; } - log('content type is now = ' + obj.contentType); - responseContentTypeField = $('.content > .content-type > div > select[name=contentType]', $(this.el)).val(); - if (responseContentTypeField) { - obj.headers = obj.headers != null ? obj.headers : {}; - obj.headers.accept = responseContentTypeField; + } + log(headerParams); + _ref8 = form.find('input[type~="file"]'); + for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) { + el = _ref8[_l]; + if (typeof el.files[0] !== 'undefined') { + bodyParam.append($(el).attr('name'), el.files[0]); + params += 1; + } + } + log(bodyParam); + this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true); + $(".request_url", $(this.el)).html("
    " + this.invocationUrl + "
    "); + obj = { + type: this.model.method, + url: this.invocationUrl, + headers: headerParams, + data: bodyParam, + dataType: 'json', + contentType: false, + processData: false, + error: function(data, textStatus, error) { + return _this.showErrorStatus(_this.wrap(data), _this); + }, + success: function(data) { + return _this.showResponse(data, _this); + }, + complete: function(data) { + return _this.showCompleteStatus(_this.wrap(data), _this); + } + }; + if (window.authorizations) { + window.authorizations.apply(obj); + } + if (params === 0) { + obj.data.append("fake", "true"); + } + jQuery.ajax(obj); + return false; + }; + + OperationView.prototype.wrap = function(data) { + var h, headerArray, headers, i, o, _i, _len; + headers = {}; + headerArray = data.getAllResponseHeaders().split("\r"); + for (_i = 0, _len = headerArray.length; _i < _len; _i++) { + i = headerArray[_i]; + h = i.split(':'); + if (h[0] !== void 0 && h[1] !== void 0) { + headers[h[0].trim()] = h[1].trim(); + } + } + o = {}; + o.content = {}; + o.content.data = data.responseText; + o.headers = headers; + o.request = {}; + o.request.url = this.invocationUrl; + o.status = data.status; + return o; + }; + + OperationView.prototype.getSelectedValue = function(select) { + var opt, options, _i, _len, _ref5; + if (!select.multiple) { + return select.value; + } else { + options = []; + _ref5 = select.options; + for (_i = 0, _len = _ref5.length; _i < _len; _i++) { + opt = _ref5[_i]; + if (opt.selected) { + options.push(opt.value); + } + } + if (options.length > 0) { + return options.join(","); + } else { + return null; } - jQuery.ajax(obj); - return false; } }; @@ -1493,12 +1874,12 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; return $(".response_body", $(this.el)).html(escape(prettyJson)); }; - OperationView.prototype.showErrorStatus = function(data) { - return this.showStatus(data); + OperationView.prototype.showErrorStatus = function(data, parent) { + return parent.showStatus(data); }; - OperationView.prototype.showCompleteStatus = function(data) { - return this.showStatus(data); + OperationView.prototype.showCompleteStatus = function(data, parent) { + return parent.showStatus(data); }; OperationView.prototype.formatXml = function(xml) { @@ -1554,9 +1935,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; padding = ''; indent += transitions[fromTo]; padding = ((function() { - var _j, _ref, _results; + var _j, _ref5, _results; _results = []; - for (j = _j = 0, _ref = indent; 0 <= _ref ? _j < _ref : _j > _ref; j = 0 <= _ref ? ++_j : --_j) { + for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) { _results.push(' '); } return _results; @@ -1574,19 +1955,40 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; return formatted; }; - OperationView.prototype.showStatus = function(data) { - var code, pre, response_body; - try { - code = $('').text(JSON.stringify(JSON.parse(data.responseText), null, 2)); + OperationView.prototype.showStatus = function(response) { + var code, content, contentType, headers, pre, response_body, url; + if (response.content === void 0) { + content = response.data; + url = response.url; + } else { + content = response.content.data; + url = response.request.url; + } + headers = response.headers; + contentType = headers && headers["Content-Type"] ? headers["Content-Type"].split(";")[0].trim() : null; + if (!content) { + code = $('').text("no content"); pre = $('
    ').append(code);
    -      } catch (error) {
    -        code = $('').text(this.formatXml(data.responseText));
    +      } else if (contentType === "application/json" || /\+json$/.test(contentType)) {
    +        code = $('').text(JSON.stringify(JSON.parse(content), null, "  "));
    +        pre = $('
    ').append(code);
    +      } else if (contentType === "application/xml" || /\+xml$/.test(contentType)) {
    +        code = $('').text(this.formatXml(content));
             pre = $('
    ').append(code);
    +      } else if (contentType === "text/html") {
    +        code = $('').html(content);
    +        pre = $('
    ').append(code);
    +      } else if (/^image\//.test(contentType)) {
    +        pre = $('').attr('src', url);
    +      } else {
    +        code = $('').text(content);
    +        pre = $('
    ').append(code);
           }
           response_body = pre;
    -      $(".response_code", $(this.el)).html("
    " + data.status + "
    "); + $(".request_url", $(this.el)).html("
    " + url + "
    "); + $(".response_code", $(this.el)).html("
    " + response.status + "
    "); $(".response_body", $(this.el)).html(response_body); - $(".response_headers", $(this.el)).html("
    " + data.getAllResponseHeaders() + "
    "); + $(".response_headers", $(this.el)).html("
    " + JSON.stringify(response.headers, null, "  ").replace(/\n/g, "
    ") + "
    "); $(".response", $(this.el)).slideDown(); $(".response_hider", $(this.el)).show(); $(".response_throbber", $(this.el)).hide(); @@ -1595,7 +1997,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; OperationView.prototype.toggleOperationContent = function() { var elem; - elem = $('#' + Docs.escapeResourceName(this.model.resourceName) + "_" + this.model.nickname + "_" + this.model.httpMethod + "_" + this.model.number + "_content"); + elem = $('#' + Docs.escapeResourceName(this.model.parentId) + "_" + this.model.nickname + "_content"); if (elem.is(':visible')) { return Docs.collapseOperation(elem); } else { @@ -1608,19 +2010,63 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); StatusCodeView = (function(_super) { - __extends(StatusCodeView, _super); function StatusCodeView() { - StatusCodeView.__super__.constructor.apply(this, arguments); + _ref5 = StatusCodeView.__super__.constructor.apply(this, arguments); + return _ref5; } StatusCodeView.prototype.initialize = function() {}; + StatusCodeView.prototype.isListType = function(type) { + var listType; + listType = null; + if (type && type.indexOf('[') >= 0) { + listType = type.substring(type.indexOf('[') + 1, type.indexOf(']')); + } else { + listType = void 0; + } + return listType; + }; + StatusCodeView.prototype.render = function() { - var template; + var isPrimitive, jsonSample, listType, mockSignature, responseModel, responseModelView, template; template = this.template(); $(this.el).html(template(this.model)); + listType = this.isListType(this.model.responseModel); + if (swaggerUi.api.models.hasOwnProperty(listType || this.model.responseModel)) { + isPrimitive = false; + if ((listType !== null && swaggerUi.api.models[listType]) || swaggerUi.api.models[this.model.responseModel] !== null) { + isPrimitive = false; + } else { + isPrimitive = true; + } + jsonSample = null; + mockSignature = null; + if (isPrimitive) { + jsonSample = void 0; + mockSignature = void 0; + } else if (listType) { + jsonSample = '[' + JSON.stringify(swaggerUi.api.models[listType].createJSONSample(), null, 2) + ']'; + mockSignature = 'Array of ' + swaggerUi.api.models[listType].getMockSignature(); + } else { + jsonSample = JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2); + mockSignature = swaggerUi.api.models[this.model.responseModel].getMockSignature(); + } + responseModel = { + sampleJSON: jsonSample, + isParam: false, + signature: mockSignature + }; + responseModelView = new SignatureView({ + model: responseModel, + tagName: 'div' + }); + $('.model-signature', this.$el).append(responseModelView.render().el); + } else { + $('.model-signature', this.$el).html(''); + } return this; }; @@ -1633,21 +2079,30 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); ParameterView = (function(_super) { - __extends(ParameterView, _super); function ParameterView() { - ParameterView.__super__.constructor.apply(this, arguments); + _ref6 = ParameterView.__super__.constructor.apply(this, arguments); + return _ref6; } - ParameterView.prototype.initialize = function() {}; + ParameterView.prototype.initialize = function() { + return Handlebars.registerHelper('isArray', function(param, opts) { + if (param.type.toLowerCase() === 'array' || param.allowMultiple) { + return opts.fn(this); + } else { + return opts.inverse(this); + } + }); + }; ParameterView.prototype.render = function() { - var contentTypeModel, contentTypeView, signatureModel, signatureView, template; + var contentTypeModel, isParam, parameterContentTypeView, responseContentTypeView, signatureModel, signatureView, template, type; + type = this.model.type || this.model.dataType; if (this.model.paramType === 'body') { this.model.isBody = true; } - if (this.model.dataType === 'file') { + if (type.toLowerCase() === 'file') { this.model.isFile = true; } template = this.template(); @@ -1666,19 +2121,25 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; } else { $('.model-signature', $(this.el)).html(this.model.signature); } + isParam = false; + if (this.model.isBody) { + isParam = true; + } contentTypeModel = { - isParam: false + isParam: isParam }; - if (this.model.supportedContentTypes) { - contentTypeModel.produces = this.model.supportedContentTypes; + contentTypeModel.consumes = this.model.consumes; + if (isParam) { + parameterContentTypeView = new ParameterContentTypeView({ + model: contentTypeModel + }); + $('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el); + } else { + responseContentTypeView = new ResponseContentTypeView({ + model: contentTypeModel + }); + $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el); } - if (this.model.produces) { - contentTypeModel.produces = this.model.produces; - } - contentTypeView = new ContentTypeView({ - model: contentTypeModel - }); - $('.content-type', $(this.el)).append(contentTypeView.render().el); return this; }; @@ -1707,11 +2168,11 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); SignatureView = (function(_super) { - __extends(SignatureView, _super); function SignatureView() { - SignatureView.__super__.constructor.apply(this, arguments); + _ref7 = SignatureView.__super__.constructor.apply(this, arguments); + return _ref7; } SignatureView.prototype.events = { @@ -1776,11 +2237,11 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); ContentTypeView = (function(_super) { - __extends(ContentTypeView, _super); function ContentTypeView() { - ContentTypeView.__super__.constructor.apply(this, arguments); + _ref8 = ContentTypeView.__super__.constructor.apply(this, arguments); + return _ref8; } ContentTypeView.prototype.initialize = function() {}; @@ -1789,12 +2250,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; var template; template = this.template(); $(this.el).html(template(this.model)); - this.isParam = this.model.isParam; - if (this.isParam) { - $('label[for=contentType]', $(this.el)).text('Parameter content type:'); - } else { - $('label[for=contentType]', $(this.el)).text('Response Content Type'); - } + $('label[for=contentType]', $(this.el)).text('Response Content Type'); return this; }; @@ -1806,4 +2262,56 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); + ResponseContentTypeView = (function(_super) { + __extends(ResponseContentTypeView, _super); + + function ResponseContentTypeView() { + _ref9 = ResponseContentTypeView.__super__.constructor.apply(this, arguments); + return _ref9; + } + + ResponseContentTypeView.prototype.initialize = function() {}; + + ResponseContentTypeView.prototype.render = function() { + var template; + template = this.template(); + $(this.el).html(template(this.model)); + $('label[for=responseContentType]', $(this.el)).text('Response Content Type'); + return this; + }; + + ResponseContentTypeView.prototype.template = function() { + return Handlebars.templates.response_content_type; + }; + + return ResponseContentTypeView; + + })(Backbone.View); + + ParameterContentTypeView = (function(_super) { + __extends(ParameterContentTypeView, _super); + + function ParameterContentTypeView() { + _ref10 = ParameterContentTypeView.__super__.constructor.apply(this, arguments); + return _ref10; + } + + ParameterContentTypeView.prototype.initialize = function() {}; + + ParameterContentTypeView.prototype.render = function() { + var template; + template = this.template(); + $(this.el).html(template(this.model)); + $('label[for=parameterContentType]', $(this.el)).text('Parameter content type:'); + return this; + }; + + ParameterContentTypeView.prototype.template = function() { + return Handlebars.templates.parameter_content_type; + }; + + return ParameterContentTypeView; + + })(Backbone.View); + }).call(this); diff --git a/public/swagger-ui.min.js b/public/swagger-ui.min.js index d7f35d1..423d3ae 100644 --- a/public/swagger-ui.min.js +++ b/public/swagger-ui.min.js @@ -1 +1 @@ -$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}function log(){if(window.console){console.log.apply(console,arguments)}}if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,g="function",i=this.escapeExpression,m=this;function d(q,p){var n="",o;n+='\n , api version: ';if(o=e.apiVersion){o=o.call(q,{hash:{},data:p})}else{o=q.apiVersion;o=typeof o===g?o.apply(q):o}n+=i(o)+"\n ";return n}h+="\n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=e.basePath){c=c.call(l,{hash:{},data:j})}else{c=l.basePath;c=typeof c===g?c.apply(l):c}h+=i(c)+"\n ";c=e["if"].call(l,l.apiVersion,{hash:{},inverse:m.noop,fn:m.program(1,d,j),data:j});if(c||c===0){h+=c}h+="]

    \n
    \n
    \n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(h,n,g,m,l){this.compilerInfo=[4,">= 1.0.0"];g=this.merge(g,h.helpers);l=l||{};var j="",d,i="function",k=this.escapeExpression,r=this;function f(v,u){var s="",t;s+="\n

    Implementation Notes

    \n

    ";if(t=g.notes){t=t.call(v,{hash:{},data:u})}else{t=v.notes;t=typeof t===i?t.apply(v):t}if(t||t===0){s+=t}s+="

    \n ";return s}function c(t,s){return'\n

    Response Class

    \n

    \n
    \n
    \n '}function q(t,s){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function p(t,s){return"\n
    \n

    Error Status Codes

    \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReason
    \n "}function o(t,s){return"\n "}function e(t,s){return"\n
    \n \n \n \n
    \n "}j+="\n \n";return j})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n ";return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(g,r,p,k,t){this.compilerInfo=[4,">= 1.0.0"];p=this.merge(p,g.helpers);t=t||{};var q="",i,e,o=this,d="function",c=this.escapeExpression;function n(v,u){return"\n "}function m(x,w){var u="",v;u+="\n ";v=p["if"].call(x,x.defaultValue,{hash:{},inverse:o.program(6,j,w),fn:o.program(4,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(v,u){return"\n "}function j(v,u){return"\n \n "}function h(x,w){var u="",v;u+="\n ";v=p["if"].call(x,x.isDefault,{hash:{},inverse:o.program(11,s,w),fn:o.program(9,f,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function f(x,w){var u="",v;u+="\n \n ";return u}function s(x,w){var u="",v;u+="\n \n ";return u}q+="";if(i=p.name){i=i.call(r,{hash:{},data:t})}else{i=r.name;i=typeof i===d?i.apply(r):i}q+=c(i)+"\n\n \n\n";if(e=p.description){e=e.call(r,{hash:{},data:t})}else{e=r.description;e=typeof e===d?e.apply(r):e}if(e||e===0){q+=e}q+="\n";if(e=p.paramType){e=e.call(r,{hash:{},data:t})}else{e=r.paramType;e=typeof e===d?e.apply(r):e}if(e||e===0){q+=e}q+='\n\n';return q})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="\n\n";return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n\n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.reason){c=c.call(k,{hash:{},data:i})}else{c=k.reason;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n\n";return g})})();(function(){var f,b,h,c,e,j,k,i,a,g={}.hasOwnProperty,d=function(o,m){for(var l in m){if(g.call(m,l)){o[l]=m[l]}}function n(){this.constructor=o}n.prototype=m.prototype;o.prototype=new n();o.__super__=m.prototype;return o};a=(function(m){d(l,m);function l(){l.__super__.constructor.apply(this,arguments)}l.prototype.dom_id="swagger_ui";l.prototype.options=null;l.prototype.api=null;l.prototype.headerView=null;l.prototype.mainView=null;l.prototype.initialize=function(n){var o=this;if(n==null){n={}}if(n.dom_id!=null){this.dom_id=n.dom_id;delete n.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=n;this.options.success=function(){return o.render()};this.options.progress=function(p){return o.showMessage(p)};this.options.failure=function(p){return o.onLoadFailure(p)};this.headerView=new b({el:$("#header")});return this.headerView.on("update-swagger-ui",function(p){return o.updateSwaggerUi(p)})};l.prototype.updateSwaggerUi=function(n){this.options.discoveryUrl=n.discoveryUrl;this.options.apiKey=n.apiKey;return this.load()};l.prototype.load=function(){var n;if((n=this.mainView)!=null){n.clear()}this.headerView.update(this.options.discoveryUrl,this.options.apiKey);return this.api=new SwaggerApi(this.options)};l.prototype.render=function(){var n=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new h({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};l.prototype.showMessage=function(n){if(n==null){n=""}$("#message-bar").removeClass("message-fail");$("#message-bar").addClass("message-success");return $("#message-bar").html(n)};l.prototype.onLoadFailure=function(n){var o;if(n==null){n=""}$("#message-bar").removeClass("message-success");$("#message-bar").addClass("message-fail");o=$("#message-bar").html(n);if(this.options.onFailure!=null){this.options.onFailure(n)}return o};return l})(Backbone.Router);window.SwaggerUi=a;b=(function(m){d(l,m);function l(){l.__super__.constructor.apply(this,arguments)}l.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};l.prototype.initialize=function(){};l.prototype.showPetStore=function(n){return this.trigger("update-swagger-ui",{discoveryUrl:"http://petstore.swagger.wordnik.com/api/api-docs.json",apiKey:"special-key"})};l.prototype.showWordnikDev=function(n){return this.trigger("update-swagger-ui",{discoveryUrl:"http://api.wordnik.com/v4/resources.json",apiKey:""})};l.prototype.showCustomOnKeyup=function(n){if(n.keyCode===13){return this.showCustom()}};l.prototype.showCustom=function(n){if(n!=null){n.preventDefault()}return this.trigger("update-swagger-ui",{discoveryUrl:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};l.prototype.update=function(o,p,n){if(n==null){n=false}$("#input_baseUrl").val(o);$("#input_apiKey").val(p);if(n){return this.trigger("update-swagger-ui",{discoveryUrl:o,apiKey:p})}};return l})(Backbone.View);h=(function(l){d(m,l);function m(){m.__super__.constructor.apply(this,arguments)}m.prototype.initialize=function(){};m.prototype.render=function(){var q,p,n,o;$(this.el).html(Handlebars.templates.main(this.model));o=this.model.apisArray;for(p=0,n=o.length;p=0;if(!y){this.model.isReadOnly=true}$(this.el).html(Handlebars.templates.operation(this.model));if(this.model.responseClassSignature&&this.model.responseClassSignature!=="string"){z={sampleJSON:this.model.responseSampleJSON,isParam:false,signature:this.model.responseClassSignature};u=new k({model:z,tagName:"div"});$(".model-signature",$(this.el)).append(u.render().el)}else{$(".model-signature",$(this.el)).html(this.model.responseClass)}n={isParam:false};if(this.model.supportedContentTypes){n.produces=this.model.supportedContentTypes}if(this.model.produces){n.produces=this.model.produces}x=new f({model:n});$(".content-type",$(this.el)).append(x.render().el);t=this.model.parameters;for(s=0,w=t.length;s0){Q[H.name]=H.value}}P=v.children().find('input[type~="file"]').size()!==0;J=false;L="application/json";if(this.model.consumes&&this.model.consumes.length>0){L=this.model.consumes[0]}else{z=this.model.parameters;for(u=0,S=z.length;u"+A+"
    ");$(".response_throbber",$(this.el)).show();D={type:this.model.httpMethod,url:A,headers:q,data:F,contentType:L,dataType:"json",processData:false,error:function(T,U,o){return I.showErrorStatus(T,U,o)},success:function(o){return I.showResponse(o)},complete:function(o){return I.showCompleteStatus(o)}};G=$("td select[name=contentType]",$(this.el)).val();if(G){D.contentType=G}log("content type = "+D.contentType);if(!(D.data||(D.type==="GET"||D.type==="DELETE"))&&D.contentType===!"application/x-www-form-urlencoded"){D.contentType=false}log("content type is now = "+D.contentType);s=$(".content > .content-type > div > select[name=contentType]",$(this.el)).val();if(s){D.headers=D.headers!=null?D.headers:{};D.headers.accept=s}jQuery.ajax(D);return false}};l.prototype.hideResponse=function(n){if(n!=null){n.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};l.prototype.showResponse=function(n){var o;o=JSON.stringify(n,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(o))};l.prototype.showErrorStatus=function(n){return this.showStatus(n)};l.prototype.showCompleteStatus=function(n){return this.showStatus(n)};l.prototype.formatXml=function(u){var q,t,o,v,A,w,p,n,y,z,s,r,x;n=/(>)(<)(\/*)/g;z=/[ ]*(.*)[ ]+\n/g;q=/(<.+>)(.+\n)/g;u=u.replace(n,"$1\n$2$3").replace(z,"$1\n").replace(q,"$1\n$2");p=0;t="";A=u.split("\n");o=0;v="other";y={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};s=function(G){var C,B,E,I,F,D,H;D={single:Boolean(G.match(/<.+\/>/)),closing:Boolean(G.match(/<\/.+>/)),opening:Boolean(G.match(/<[^!?].*>/))};F=((function(){var J;J=[];for(E in D){H=D[E];if(H){J.push(E)}}return J})())[0];F=F===void 0?"other":F;C=v+"->"+F;v=F;I="";o+=y[C];I=((function(){var K,L,J;J=[];for(B=K=0,L=o;0<=L?KL;B=0<=L?++K:--K){J.push(" ")}return J})()).join("");if(C==="opening->closing"){return t=t.substr(0,t.length-1)+G+"\n"}else{return t+=I+G+"\n"}};for(r=0,x=A.length;r").text(JSON.stringify(JSON.parse(q.responseText),null,2));r=$('
    ').append(p)}catch(n){p=$("").text(this.formatXml(q.responseText));r=$('
    ').append(p)}o=r;$(".response_code",$(this.el)).html("
    "+q.status+"
    ");$(".response_body",$(this.el)).html(o);$(".response_headers",$(this.el)).html("
    "+q.getAllResponseHeaders()+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};l.prototype.toggleOperationContent=function(){var n;n=$("#"+Docs.escapeResourceName(this.model.resourceName)+"_"+this.model.nickname+"_"+this.model.httpMethod+"_"+this.model.number+"_content");if(n.is(":visible")){return Docs.collapseOperation(n)}else{return Docs.expandOperation(n)}};return l})(Backbone.View);i=(function(m){d(l,m);function l(){l.__super__.constructor.apply(this,arguments)}l.prototype.initialize=function(){};l.prototype.render=function(){var n;n=this.template();$(this.el).html(n(this.model));return this};l.prototype.template=function(){return Handlebars.templates.status_code};return l})(Backbone.View);e=(function(m){d(l,m);function l(){l.__super__.constructor.apply(this,arguments)}l.prototype.initialize=function(){};l.prototype.render=function(){var q,o,n,r,p;if(this.model.paramType==="body"){this.model.isBody=true}if(this.model.dataType==="file"){this.model.isFile=true}p=this.template();$(this.el).html(p(this.model));n={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){r=new k({model:n,tagName:"div"});$(".model-signature",$(this.el)).append(r.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}q={isParam:false};if(this.model.supportedContentTypes){q.produces=this.model.supportedContentTypes}if(this.model.produces){q.produces=this.model.produces}o=new f({model:q});$(".content-type",$(this.el)).append(o.render().el);return this};l.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return l})(Backbone.View);k=(function(m){d(l,m);function l(){l.__super__.constructor.apply(this,arguments)}l.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};l.prototype.initialize=function(){};l.prototype.render=function(){var n;n=this.template();$(this.el).html(n(this.model));this.switchToDescription();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};l.prototype.template=function(){return Handlebars.templates.signature};l.prototype.switchToDescription=function(n){if(n!=null){n.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};l.prototype.switchToSnippet=function(n){if(n!=null){n.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};l.prototype.snippetToTextArea=function(n){var o;if(this.isParam){if(n!=null){n.preventDefault()}o=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(o.val())===""){return o.val(this.model.sampleJSON)}}};return l})(Backbone.View);f=(function(l){d(m,l);function m(){m.__super__.constructor.apply(this,arguments)}m.prototype.initialize=function(){};m.prototype.render=function(){var n;n=this.template();$(this.el).html(n(this.model));this.isParam=this.model.isParam;if(this.isParam){$("label[for=contentType]",$(this.el)).text("Parameter content type:")}else{$("label[for=contentType]",$(this.el)).text("Response Content Type")}return this};m.prototype.template=function(){return Handlebars.templates.content_type};return m})(Backbone.View)}).call(this); \ No newline at end of file +$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Response Class

    \n

    \n
    \n
    \n '}function v(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n\n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}C={sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file From 59afbb1f32cf29f4480e58c0a7c066d6f75b2220 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Sat, 12 Jul 2014 23:09:00 -0700 Subject: [PATCH 04/54] Upgraded to latest Swagger-UI for 1.2 support --- public/images/explorer_icons.png | Bin 0 -> 5763 bytes public/images/logo_small.png | Bin 2681 -> 770 bytes public/images/pet_store_api.png | Bin 0 -> 824 bytes public/images/wordnik_api.png | Bin 0 -> 980 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/images/explorer_icons.png create mode 100644 public/images/pet_store_api.png create mode 100644 public/images/wordnik_api.png diff --git a/public/images/explorer_icons.png b/public/images/explorer_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..ed9d2fffb64a2e6e282b90e489d83fc4ddfac3cd GIT binary patch literal 5763 zcmZ{mbyU<(_s2g-OG-&gcc*kqH^>44l1sRf(jbV^A<_-v(jAL*ch?e2h)bu^&BOEk zo%4PE`u#EQxpQV-XJ+oXbLU3rXer}8rF;qi0G_Ifq8D|DCwR-n=IDL>ob*=NNmlJRW(O8-vWlRta1d^>JngezA^kml zYwJ9+!B3f7079%<8+!LUMik&OP*ReUp#!rGK=Gc&!2&uoGdlRF!yX8B<rv|{n1^9Hszpw*n ze!$xSMn-Soa~eSM>exu~FJ}ee)}wE|(`qCenZ%TWO|iILF^!CPXxYY8pL3FkSU#~# zm*wg5Nuv-579#j{G6Dd(@uZKpJ-PE9!>~ceSt0K?#!Fpf0btD| zaPppux0W(U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`FvZ4wa`_$&@=;~j{tp^Kw&*Also1fa8>i_LTW}mL*6?*x!M1`4qcd0q& zQ0T2^^^MJJTv5l`){DdK;Co4yHg)jH?i!XgjIsM{hPO@?bfm}8fI!t9i2ZT zz9)XY2oJzBHre#H{>{h6^uVK5byTl{*hWLc`s;t#qYvKk<9J2==X<8~Z{}p@iHpw* z-V4kgdVCiCL}6#~aMc-8T3$5zm5SA!#?B{g)lQa;K3_Ka<#b$H^^5ZU#FNDo-%#e& z(EE-b<}$O_Pi8eSX6)9`+D9U*d#!3FR(&(F`q-GYA2}4Nf8o$X`G0|)30pm)@$I42 nM<$Hj{;KUy&XO#>JCgqmGv#NA-1B%700000NkvXXu0mjfr2aL@ diff --git a/public/images/pet_store_api.png b/public/images/pet_store_api.png new file mode 100644 index 0000000000000000000000000000000000000000..f9f9cd4aeb35a108c4b2f1dddb59977d56c595d8 GIT binary patch literal 824 zcmV-81IPS{P)n=Rd;8mVwQNY4k4xJQ%YT}s;WA7;r!W@XgqjG_4og} z8w>{OB9REiMa8-B85td+y}bji^~2KA`Md4j-u{zw=H%Da@83%_8qEnl9k1WK;pWX- zb-lg)pQYAreK@>)*5Clqni{IZVYGG+NY67Bp-^bn;L{Nbh44I6CIK+n7p8#U?;fCA zYMFcy%UEjup4fgnli%NyzSe*@419QuU9lJ|T$?f9w?HIQ$RwEJGK7^!y7LhxIgVJp z9c!kB{0aydM1epU1NJ=h(}2X?Y{qn70yEN$dwm~favs=VbQ+T?!AvSl{P~PE zS&zsJbTQttne>kdM4$jBhLMFy@I1)3u-4cAzrY*l!o9eK^w%+jqY!oi(Ri8sMauvK zwnCP#%3hEH#FtNqq{iT(?=_JA_8XC>5Y8Y@!wmxKb|A87ZbpHA`+%v~0pt{5Nko1L zLKR^25YExt1lH7L1{t{|P z@n)yHyZf~3>LZ@#&CNw1rA#OlY^|)UJQKUrlKKO&x%wPhH}6&e0000dvj&>@zN_HP5m0E=+A=efDBI*IG*Gy%%< zz@yc%2XvGm)QQv5k^ZC6!9MwX8BCmQ{3eAX|GTwn#>(PS6PoB=$Pwn*?wz?%Tx2gwJ4apoy`A15D=>?%}hj`fV*p=6XW=YR(sp))`dxTnqHE&{&; zPdeO}SVkf*6_$c45W3Z}u|Z&a8{r!6ZNY62S>5{jAd)Hkjg@h%@c)c#BvZK2lmGw| z`Vh+%ECkF{t=)XpF3Z1bj=Pe9LpHbnQwjeTU#=4hB76#52DU2P2Ouj~^lRWwRd%eN zBw_z%FL0CUlk!`s2!`>QG&H__i_)I9=AuA=jn40z>;@hRsg)>J(58cx;l;h_zE*-R7Wbz6Ff#1Mss*)zTImU4`2@?a7y;v4 zH=lJ_PM5Rkw*AU`Cmq6aa>chASJ&Z3Ebj`y;w$MM!fa6`13VU7Kc|T5Xl#7ecj?mp zREV-nBJ6C)`?&}QDe_(KM>BrlN|iF{7-90j+J>N0^vY=LK;8!^9Y_m*aRPX{!S6ag zgRw(13pJvt`;{^S-vgUk?8pV_Vh4a4P7~}uHT)ENFMqd71QIOl8Q6+24TM_+158z) z54U-*C{M)S&!2Bfu&`?Ti6;WojY;%6+I;uCof+*T2iUMz!7Eg<{}#DJSx)C$5f zP(oSf>_s1t06cJ-U3?<9poS4O{Go>H>hro^ks;r3mm1Ehfq?m(_YE8UiVUgG%W9ZY z!@O^}KR%JW*0e=66rUYj5BP~=x%$^x92-m_ Date: Mon, 14 Jul 2014 21:48:46 -0700 Subject: [PATCH 05/54] Updated to latest Swagger-UI for better responseMessage signature handling --- public/swagger-ui.js | 16 ++++++++++++++-- public/swagger-ui.min.js | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/public/swagger-ui.js b/public/swagger-ui.js index 770b1de..d19a9e5 100644 --- a/public/swagger-ui.js +++ b/public/swagger-ui.js @@ -1178,7 +1178,11 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression; - buffer += "
    \n\n
    \n\n
    \n
    \n "; + buffer += "
    \n
      \n
    • "; + if (stack1 = helpers.modelLabel) { stack1 = stack1.call(depth0, {hash:{},data:data}); } + else { stack1 = depth0.modelLabel; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n "; if (stack1 = helpers.signature) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.signature; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if(stack1 || stack1 === 0) { buffer += stack1; } @@ -2031,7 +2035,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; }; StatusCodeView.prototype.render = function() { - var isPrimitive, jsonSample, listType, mockSignature, responseModel, responseModelView, template; + var isPrimitive, jsonSample, listType, mockSignature, modelLabel, responseModel, responseModelView, template; template = this.template(); $(this.el).html(template(this.model)); listType = this.isListType(this.model.responseModel); @@ -2054,7 +2058,13 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; jsonSample = JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2); mockSignature = swaggerUi.api.models[this.model.responseModel].getMockSignature(); } + if (mockSignature.indexOf('{') > -1) { + modelLabel = mockSignature.substring(0, mockSignature.indexOf('{')) + ''; + } else { + modelLabel = mockSignature; + } responseModel = { + modelLabel: modelLabel, sampleJSON: jsonSample, isParam: false, signature: mockSignature @@ -2188,6 +2198,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; template = this.template(); $(this.el).html(template(this.model)); this.switchToDescription(); + $('.description-link', $(this.el)).removeClass('selected'); + $(".description", $(this.el)).hide(); this.isParam = this.model.isParam; if (this.isParam) { $('.notice', $(this.el)).text('Click to set as parameter value'); diff --git a/public/swagger-ui.min.js b/public/swagger-ui.min.js index 423d3ae..7286c24 100644 --- a/public/swagger-ui.min.js +++ b/public/swagger-ui.min.js @@ -1 +1 @@ -$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Response Class

    \n

    \n
    \n
    \n '}function v(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n\n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}C={sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file +$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Response Class

    \n

    \n
    \n
    \n '}function v(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file From ed044468f750b72467daa91612f7eea68ef19eab Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 14 Jul 2014 21:57:39 -0700 Subject: [PATCH 06/54] Reverted to use special loading logic from loopback-explorer --- public/css/loopbackStyles.css | 26 +++++++++ public/index.html | 104 +++++++++++----------------------- public/lib/loadSwaggerUI.js | 63 ++++++++++++++++++++ 3 files changed, 121 insertions(+), 72 deletions(-) create mode 100644 public/css/loopbackStyles.css create mode 100644 public/lib/loadSwaggerUI.js diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css new file mode 100644 index 0000000..193bb4e --- /dev/null +++ b/public/css/loopbackStyles.css @@ -0,0 +1,26 @@ +/* Styles used for loopback explorer customizations */ +.accessTokenDisplay { + color: white; + margin-right: 10px; +} +.accessTokenDisplay.set { + border-bottom: 1px dotted #333; position: relative; cursor: pointer; +} +.accessTokenDisplay.set:hover:after { + content: attr(data-tooltip); + position: absolute; + white-space: nowrap; + font-size: 12px; + background: rgba(0, 0, 0, 0.85); + padding: 3px 7px; + color: #FFF; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + right: 0; + bottom: -30px; +} + +/* +FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. +*/ diff --git a/public/index.html b/public/index.html index 5af095a..f85ca38 100644 --- a/public/index.html +++ b/public/index.html @@ -1,84 +1,44 @@ - Swagger UI - - - - - - - - - - - - - - - - + StrongLoop API Explorer + + + + + + + + + + + + + + + + + - - + + - + +
     
    diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js new file mode 100644 index 0000000..7907316 --- /dev/null +++ b/public/lib/loadSwaggerUI.js @@ -0,0 +1,63 @@ +'use strict'; + +// Refactoring of inline script from index.html. +/*global SwaggerUi, log, ApiKeyAuthorization, hljs, window, $ */ +$(function() { + $.getJSON('config.json', function(config) { + log(config); + loadSwaggerUi(config); + }); + + var accessToken; + function loadSwaggerUi(config) { + window.swaggerUi = new SwaggerUi({ + url: config.url || '/swagger/resources', + apiKey: '', + dom_id: 'swagger-ui-container', + supportHeaderParams: true, + supportedSubmitMethods: ['get', 'post', 'put', 'delete'], + onComplete: function(swaggerApi, swaggerUi) { + log('Loaded SwaggerUI'); + log(swaggerApi); + log(swaggerUi); + $('pre code').each(function(i, e) {hljs.highlightBlock(e); }); + }, + onFailure: function(data) { + log('Unable to Load SwaggerUI'); + log(data); + }, + docExpansion: 'none' + }); + + $('#explore').click(setAccessToken); + $('#api_selector').submit(setAccessToken); + $('#input_accessToken').keyup(onInputChange); + + window.swaggerUi.load(); + } + + function setAccessToken(e) { + e.stopPropagation(); // Don't let the default #explore handler fire + e.preventDefault(); + var key = $('#input_accessToken')[0].value; + log('key: ' + key); + if(key && key.trim() !== '') { + log('added accessToken ' + key); + window.authorizations.add('key', new ApiKeyAuthorization('access_token', key, 'query')); + accessToken = key; + $('.accessTokenDisplay').text('Token Set.').addClass('set'); + $('.accessTokenDisplay').attr('data-tooltip', 'Current Token: ' + key); + } + } + + function onInputChange(e) { + var el = e.currentTarget; + var key = $(e.currentTarget)[0].value; + if (!key || key.trim === '') return; + if (accessToken !== key) { + $('.accessTokenDisplay').text('Token changed; submit to confirm.'); + } else { + $('.accessTokenDisplay').text('Token Set.'); + } + } +}); From 0e223845e5701c425d5adc64f6bd60861365d752 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 14 Jul 2014 22:07:14 -0700 Subject: [PATCH 07/54] Reverted to use special loading logic from loopback-explorer --- public/lib/loadSwaggerUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index 7907316..8240c95 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -11,7 +11,7 @@ $(function() { var accessToken; function loadSwaggerUi(config) { window.swaggerUi = new SwaggerUi({ - url: config.url || '/swagger/resources', + url: config.discoveryUrl || '/swagger/resources', apiKey: '', dom_id: 'swagger-ui-container', supportHeaderParams: true, From 15aa4e9ae59cf6783fa6c68b94a9475007052fc4 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 16 Jul 2014 14:30:32 -0700 Subject: [PATCH 08/54] Ensure Response Content Type is shown regardless of Response Class --- public/css/screen.css | 1 + public/swagger-ui.js | 24 ++++++++++++------------ public/swagger-ui.min.js | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/public/css/screen.css b/public/css/screen.css index 3c1fc37..d07a9ed 100644 --- a/public/css/screen.css +++ b/public/css/screen.css @@ -739,6 +739,7 @@ float: none; clear: both; overflow: hidden; + margin-top: 10px; display: block; } .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { diff --git a/public/swagger-ui.js b/public/swagger-ui.js index d19a9e5..3aebecf 100644 --- a/public/swagger-ui.js +++ b/public/swagger-ui.js @@ -372,25 +372,25 @@ function program10(depth0,data) { function program12(depth0,data) { - return "\n

    Response Class

    \n

    \n
    \n
    \n "; + return "\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n "; } function program14(depth0,data) { - return "\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n "; + return "\n

    Response Class

    \n

    \n
    \n "; } function program16(depth0,data) { - return "\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReasonResponse Model
    \n "; + return "\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "; } function program18(depth0,data) { - return "\n "; + return "\n "; } function program20(depth0,data) { @@ -400,7 +400,7 @@ function program20(depth0,data) { if (stack1 = helpers.swaggerRoot) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.swaggerRoot; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1) - + "/images/throbber.gif' style='display:none' />\n
    \n "; + + "/images/throbber.gif' style='display:none' />\n
    \n "; return buffer; } @@ -484,19 +484,19 @@ function program20(depth0,data) { else { stack1 = depth0.oauth; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); } if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, depth0.type, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data}); - if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n
    \n
    \n "; - stack1 = helpers['if'].call(depth0, depth0.parameters, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data}); + stack1 = helpers['if'].call(depth0, depth0.parameters, {hash:{},inverse:self.noop,fn:self.program(12, program12, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; + buffer += "\n
    \n "; + stack1 = helpers['if'].call(depth0, depth0.type, {hash:{},inverse:self.noop,fn:self.program(14, program14, data),data:data}); + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\n "; stack1 = helpers['if'].call(depth0, depth0.responseMessages, {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n "; + buffer += "\n
    \n "; stack1 = helpers['if'].call(depth0, depth0.isReadOnly, {hash:{},inverse:self.program(20, program20, data),fn:self.program(18, program18, data),data:data}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n \n \n
    \n \n \n"; + buffer += "\n \n
    \n \n \n"; return buffer; }); })(); diff --git a/public/swagger-ui.min.js b/public/swagger-ui.min.js index 7286c24..5ad2588 100644 --- a/public/swagger-ui.min.js +++ b/public/swagger-ui.min.js @@ -1 +1 @@ -$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Response Class

    \n

    \n
    \n
    \n '}function v(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file +$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function v(A,z){return'\n

    Response Class

    \n

    \n
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file From 17e8b7b919416273f7fd9758b12c4a9358e2ac55 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 28 Jul 2014 21:36:28 -0700 Subject: [PATCH 09/54] Added support for toggling Model and Schema, and added support for primitives in StatusCodeView --- public/swagger-ui.js | 85 +++++++++++++++++++++------------------- public/swagger-ui.min.js | 2 +- 2 files changed, 45 insertions(+), 42 deletions(-) diff --git a/public/swagger-ui.js b/public/swagger-ui.js index 3aebecf..87b927e 100644 --- a/public/swagger-ui.js +++ b/public/swagger-ui.js @@ -2039,44 +2039,47 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; template = this.template(); $(this.el).html(template(this.model)); listType = this.isListType(this.model.responseModel); - if (swaggerUi.api.models.hasOwnProperty(listType || this.model.responseModel)) { + isPrimitive = false; + if ((listType !== null && swaggerUi.api.models[listType]) || swaggerUi.api.models[this.model.responseModel]) { isPrimitive = false; - if ((listType !== null && swaggerUi.api.models[listType]) || swaggerUi.api.models[this.model.responseModel] !== null) { - isPrimitive = false; - } else { - isPrimitive = true; - } - jsonSample = null; - mockSignature = null; - if (isPrimitive) { - jsonSample = void 0; - mockSignature = void 0; - } else if (listType) { - jsonSample = '[' + JSON.stringify(swaggerUi.api.models[listType].createJSONSample(), null, 2) + ']'; - mockSignature = 'Array of ' + swaggerUi.api.models[listType].getMockSignature(); - } else { - jsonSample = JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2); - mockSignature = swaggerUi.api.models[this.model.responseModel].getMockSignature(); - } - if (mockSignature.indexOf('{') > -1) { - modelLabel = mockSignature.substring(0, mockSignature.indexOf('{')) + ''; - } else { - modelLabel = mockSignature; - } - responseModel = { - modelLabel: modelLabel, - sampleJSON: jsonSample, - isParam: false, - signature: mockSignature - }; - responseModelView = new SignatureView({ - model: responseModel, - tagName: 'div' - }); - $('.model-signature', this.$el).append(responseModelView.render().el); } else { - $('.model-signature', this.$el).html(''); + isPrimitive = true; } + jsonSample = null; + mockSignature = null; + if (isPrimitive) { + jsonSample = SwaggerModelProperty.prototype.toSampleValue(listType || this.model.responseModel); + mockSignature = listType || this.model.responseModel; + if ((listType || this.model.responseModel) === 'string') { + jsonSample = '"' + jsonSample + '"'; + } + if (listType) { + jsonSample = '[' + jsonSample + ']'; + mockSignature = 'Array of ' + mockSignature + ''; + } + } else if (listType) { + jsonSample = '[' + JSON.stringify(swaggerUi.api.models[listType].createJSONSample(), null, 2) + ']'; + mockSignature = 'Array of ' + swaggerUi.api.models[listType].getMockSignature(); + } else { + jsonSample = JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(), null, 2); + mockSignature = swaggerUi.api.models[this.model.responseModel].getMockSignature(); + } + if (mockSignature.indexOf('{') > -1) { + modelLabel = mockSignature.substring(0, mockSignature.indexOf('{')) + ''; + } else { + modelLabel = mockSignature; + } + responseModel = { + modelLabel: modelLabel, + sampleJSON: jsonSample, + isParam: false, + signature: mockSignature + }; + responseModelView = new SignatureView({ + model: responseModel, + tagName: 'div' + }); + $('.model-signature', this.$el).append(responseModelView.render().el); return this; }; @@ -2216,9 +2219,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; e.preventDefault(); } $(".snippet", $(this.el)).hide(); - $(".description", $(this.el)).show(); - $('.description-link', $(this.el)).addClass('selected'); - return $('.snippet-link', $(this.el)).removeClass('selected'); + $('.snippet-link', $(this.el)).removeClass('selected'); + $(".description", $(this.el)).toggle(); + return $('.description-link', $(this.el)).toggleClass('selected'); }; SignatureView.prototype.switchToSnippet = function(e) { @@ -2226,9 +2229,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; e.preventDefault(); } $(".description", $(this.el)).hide(); - $(".snippet", $(this.el)).show(); - $('.snippet-link', $(this.el)).addClass('selected'); - return $('.description-link', $(this.el)).removeClass('selected'); + $('.description-link', $(this.el)).removeClass('selected'); + $(".snippet", $(this.el)).toggle(); + return $('.snippet-link', $(this.el)).toggleClass('selected'); }; SignatureView.prototype.snippetToTextArea = function(e) { diff --git a/public/swagger-ui.min.js b/public/swagger-ui.min.js index 5ad2588..609895b 100644 --- a/public/swagger-ui.min.js +++ b/public/swagger-ui.min.js @@ -1 +1 @@ -$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function v(A,z){return'\n

    Response Class

    \n

    \n
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);if(swaggerUi.api.models.hasOwnProperty(F||this.model.responseModel)){D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]!==null){D=false}else{D=true}G=null;A=null;if(D){G=void 0;A=void 0}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el)}else{$(".model-signature",this.$el).html("")}return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".description",$(this.el)).show();$(".description-link",$(this.el)).addClass("selected");return $(".snippet-link",$(this.el)).removeClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".snippet",$(this.el)).show();$(".snippet-link",$(this.el)).addClass("selected");return $(".description-link",$(this.el)).removeClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file +$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function v(A,z){return'\n

    Response Class

    \n

    \n
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]){D=false}else{D=true}G=null;A=null;if(D){G=SwaggerModelProperty.prototype.toSampleValue(F||this.model.responseModel);A=F||this.model.responseModel;if((F||this.model.responseModel)==="string"){G='"'+G+'"'}if(F){G="["+G+"]";A='Array of '+A+""}}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el);return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".snippet-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).toggle();return $(".description-link",$(this.el)).toggleClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".description-link",$(this.el)).removeClass("selected");$(".snippet",$(this.el)).toggle();return $(".snippet-link",$(this.el)).toggleClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file From c1a0eb51923c8c098df88f30a644f2f76294a654 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 30 Jul 2014 11:40:45 -0700 Subject: [PATCH 10/54] Upgraded to SwaggerUI 2.0.18 --- public/swagger-ui.js | 47 ++++++++++++++++++++++++++++++++-------- public/swagger-ui.min.js | 2 +- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/public/swagger-ui.js b/public/swagger-ui.js index 87b927e..e8f74bc 100644 --- a/public/swagger-ui.js +++ b/public/swagger-ui.js @@ -1,5 +1,5 @@ // swagger-ui.js -// version 2.0.17 +// version 2.0.18 $(function() { // Helper function for vertically aligning DOM elements @@ -1298,7 +1298,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...'); this.mainView = new MainView({ model: this.api, - el: $('#' + this.dom_id) + el: $('#' + this.dom_id), + swaggerOptions: this.options }).render(); this.showMessage(); switch (this.options.docExpansion) { @@ -1443,6 +1444,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; })(Backbone.View); MainView = (function(_super) { + var sorters; + __extends(MainView, _super); function MainView() { @@ -1450,7 +1453,33 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; return _ref2; } - MainView.prototype.initialize = function() {}; + sorters = { + 'alpha': function(a, b) { + return a.path.localeCompare(b.path); + }, + 'method': function(a, b) { + return a.method.localeCompare(b.method); + } + }; + + MainView.prototype.initialize = function(opts) { + var route, sorter, sorterName, _i, _len, _ref3; + if (opts == null) { + opts = {}; + } + if (opts.swaggerOptions.sorter) { + sorterName = opts.swaggerOptions.sorter; + sorter = sorters[sorterName]; + _ref3 = this.model.apisArray; + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + route = _ref3[_i]; + route.operationsArray.sort(sorter); + } + if (sorterName === "alpha") { + return this.model.apisArray.sort(sorter); + } + } + }; MainView.prototype.render = function() { var counter, id, resource, resources, _i, _len, _ref3; @@ -1563,8 +1592,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; OperationView.prototype.mouseEnter = function(e) { var elem, hgh, pos, scMaxX, scMaxY, scX, scY, wd, x, y; elem = $(e.currentTarget.parentNode).find('#api_information_panel'); - x = event.pageX; - y = event.pageY; + x = e.pageX; + y = e.pageY; scX = $(window).scrollLeft(); scY = $(window).scrollTop(); scMaxX = scX + $(window).width(); @@ -1992,7 +2021,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; $(".request_url", $(this.el)).html("
    " + url + "
    "); $(".response_code", $(this.el)).html("
    " + response.status + "
    "); $(".response_body", $(this.el)).html(response_body); - $(".response_headers", $(this.el)).html("
    " + JSON.stringify(response.headers, null, "  ").replace(/\n/g, "
    ") + "
    "); + $(".response_headers", $(this.el)).html("
    " + _.escape(JSON.stringify(response.headers, null, "  ")).replace(/\n/g, "
    ") + "
    "); $(".response", $(this.el)).slideDown(); $(".response_hider", $(this.el)).show(); $(".response_throbber", $(this.el)).hide(); @@ -2200,9 +2229,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; var template; template = this.template(); $(this.el).html(template(this.model)); - this.switchToDescription(); - $('.description-link', $(this.el)).removeClass('selected'); - $(".description", $(this.el)).hide(); + this.switchToSnippet(); + $('.snippet-link', $(this.el)).removeClass('selected'); + $(".snippet", $(this.el)).hide(); this.isParam = this.model.isParam; if (this.isParam) { $('.notice', $(this.el)).text('Click to set as parameter value'); diff --git a/public/swagger-ui.min.js b/public/swagger-ui.min.js index 609895b..b130c89 100644 --- a/public/swagger-ui.min.js +++ b/public/swagger-ui.min.js @@ -1 +1 @@ -$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function v(A,z){return'\n

    Response Class

    \n

    \n
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id)}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){v(z,y);function z(){g=z.__super__.constructor.apply(this,arguments);return g}z.prototype.initialize=function(){};z.prototype.render=function(){var B,G,D,E,C,A,F;$(this.el).html(Handlebars.templates.main(this.model));E={};B=0;F=this.model.apisArray;for(C=0,A=F.length;CB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+JSON.stringify(A.headers,null,"  ").replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]){D=false}else{D=true}G=null;A=null;if(D){G=SwaggerModelProperty.prototype.toSampleValue(F||this.model.responseModel);A=F||this.model.responseModel;if((F||this.model.responseModel)==="string"){G='"'+G+'"'}if(F){G="["+G+"]";A='Array of '+A+""}}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el);return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToDescription();$(".description-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".snippet-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).toggle();return $(".description-link",$(this.el)).toggleClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".description-link",$(this.el)).removeClass("selected");$(".snippet",$(this.el)).toggle();return $(".snippet-link",$(this.el)).toggleClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file +$(function(){$.fn.vAlign=function(){return this.each(function(c){var a=$(this).height();var d=$(this).parent().height();var b=(d-a)/2;$(this).css("margin-top",b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(b){var d=$(this).closest("form").innerWidth();var c=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var a=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",d-c-a)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var a=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()==""){$(this).addClass("error");$(this).wiggle();a=false}});return a})});function clippyCopiedCallback(b){$("#api_key_copied").fadeIn().delay(1000).fadeOut()}log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};if(Function.prototype.bind&&console&&typeof console.log=="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var Docs={shebang:function(){var b=$.param.fragment().split("/");b.shift();switch(b.length){case 1:log("shebang resource:"+b[0]);var d="resource_"+b[0];Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});break;case 2:log("shebang endpoint: "+b.join("_"));Docs.expandEndpointListForResource(b[0]);$("#"+d).slideto({highlight:false});var c=b.join("_");var a=c+"_content";log("li_dom_id "+c);log("li_content_dom_id "+a);Docs.expandOperation($("#"+a));$("#"+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var a=$("li#resource_"+Docs.escapeResourceName(b)+" ul.endpoints");if(a.is(":visible")){Docs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);if(b==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+b).addClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideDown()},collapseEndpointListForResource:function(b){var b=Docs.escapeResourceName(b);$("li#resource_"+b).removeClass("active");var a=$("li#resource_"+b+" ul.endpoints");a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$("li#resource_"+Docs.escapeResourceName(a)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(a){return a.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",c,h="function",j=this.escapeExpression,p=this;function e(v,u){var r="",t,s;r+='\n
    '+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof t===h?t.apply(v):t))+'
    \n
    ';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof t===h?t.apply(v):t);if(s||s===0){r+=s}r+="
    \n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.termsOfServiceUrl),{hash:{},inverse:p.noop,fn:p.program(2,d,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.contact),{hash:{},inverse:p.noop,fn:p.program(4,q,u),data:u});if(s||s===0){r+=s}r+="\n ";s=f["if"].call(v,((t=v.info),t==null||t===false?t:t.license),{hash:{},inverse:p.noop,fn:p.program(6,o,u),data:u});if(s||s===0){r+=s}r+="\n ";return r}function d(u,t){var r="",s;r+='';return r}function q(u,t){var r="",s;r+="';return r}function o(u,t){var r="",s;r+="";return r}function n(u,t){var r="",s;r+='\n , api version: ';if(s=f.apiVersion){s=s.call(u,{hash:{},data:t})}else{s=u.apiVersion;s=typeof s===h?s.apply(u):s}r+=j(s)+"\n ";return r}i+="
    \n ";c=f["if"].call(m,m.info,{hash:{},inverse:p.noop,fn:p.program(1,e,k),data:k});if(c||c===0){i+=c}i+="\n
    \n
    \n
      \n
    \n\n
    \n
    \n
    \n

    [ base url: ";if(c=f.basePath){c=c.call(m,{hash:{},data:k})}else{c=m.basePath;c=typeof c===h?c.apply(m):c}i+=j(c)+"\n ";c=f["if"].call(m,m.apiVersion,{hash:{},inverse:p.noop,fn:p.program(8,n,k),data:k});if(c||c===0){i+=c}i+="]

    \n
    \n
    \n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.operation=b(function(g,s,q,m,y){this.compilerInfo=[4,">= 1.0.0"];q=this.merge(q,g.helpers);y=y||{};var r="",i,f,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(C,B){var z="",A;z+="\n

    Implementation Notes

    \n

    ";if(A=q.notes){A=A.call(C,{hash:{},data:B})}else{A=C.notes;A=typeof A===e?A.apply(C):A}if(A||A===0){z+=A}z+="

    \n ";return z}function n(A,z){return'\n
    \n '}function l(C,B){var z="",A;z+='\n \n ";return z}function k(D,C){var z="",B,A;z+="\n
    "+d(((B=D.scope),typeof B===e?B.apply(D):B))+"
    \n ";return z}function h(A,z){return"
    "}function x(A,z){return'\n
    \n \n
    \n '}function w(A,z){return'\n

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n '}function v(A,z){return'\n

    Response Class

    \n

    \n
    \n '}function u(A,z){return"\n
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse Model
    \n "}function t(A,z){return"\n "}function j(C,B){var z="",A;z+="\n
    \n \n \n \n
    \n ";return z}r+="\n
      \n
    • \n \n
    • \n
    \n";return r})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param=b(function(f,q,o,j,s){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);s=s||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.isFile,{hash:{},inverse:n.program(4,k,w),fn:n.program(2,l,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function l(x,w){var u="",v;u+='\n \n
    \n ';return u}function k(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(7,h,w),fn:n.program(5,i,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function i(x,w){var u="",v;u+="\n \n ";return u}function h(x,w){var u="",v;u+="\n \n
    \n
    \n ';return u}function e(x,w){var u="",v;u+="\n ";v=o["if"].call(x,x.defaultValue,{hash:{},inverse:n.program(12,r,w),fn:n.program(10,t,w),data:w});if(v||v===0){u+=v}u+="\n ";return u}function t(x,w){var u="",v;u+="\n \n ";return u}function r(x,w){var u="",v;u+="\n \n ";return u}p+="";if(g=o.name){g=g.call(q,{hash:{},data:s})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,s),fn:n.program(1,m,s),data:s});if(g||g===0){p+=g}p+="\n\n\n";if(g=o.description){g=g.call(q,{hash:{},data:s})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n";if(g=o.paramType){g=g.call(q,{hash:{},data:s})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n \n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_list=b(function(h,t,r,m,y){this.compilerInfo=[4,">= 1.0.0"];r=this.merge(r,h.helpers);y=y||{};var s="",j,g,e,p=this,q=r.helperMissing,d="function",c=this.escapeExpression;function o(A,z){return" multiple='multiple'"}function n(A,z){return"\n "}function l(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.defaultValue,{hash:{},inverse:p.program(8,i,B),fn:p.program(6,k,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function k(A,z){return"\n "}function i(E,D){var z="",C,B,A;z+="\n ";A={hash:{},inverse:p.program(11,x,D),fn:p.program(9,f,D),data:D};B=((C=r.isArray||E.isArray),C?C.call(E,E,A):q.call(E,"isArray",E,A));if(B||B===0){z+=B}z+="\n ";return z}function f(A,z){return"\n "}function x(A,z){return"\n \n "}function w(C,B){var z="",A;z+="\n ";A=r["if"].call(C,C.isDefault,{hash:{},inverse:p.program(16,u,B),fn:p.program(14,v,B),data:B});if(A||A===0){z+=A}z+="\n ";return z}function v(C,B){var z="",A;z+='\n \n ";return z}function u(C,B){var z="",A;z+="\n \n ";return z}s+="";if(j=r.name){j=j.call(t,{hash:{},data:y})}else{j=t.name;j=typeof j===d?j.apply(t):j}s+=c(j)+"\n\n \n\n";if(g=r.description){g=g.call(t,{hash:{},data:y})}else{g=t.description;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+="\n";if(g=r.paramType){g=g.call(t,{hash:{},data:y})}else{g=t.paramType;g=typeof g===d?g.apply(t):g}if(g||g===0){s+=g}s+='\n';return s})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_readonly_required=b(function(g,m,f,l,k){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);k=k||{};var i="",d,h="function",j=this.escapeExpression,o=this;function e(t,s){var q="",r;q+="\n \n ";return q}function c(t,s){var q="",r;q+="\n ";r=f["if"].call(t,t.defaultValue,{hash:{},inverse:o.program(6,n,s),fn:o.program(4,p,s),data:s});if(r||r===0){q+=r}q+="\n ";return q}function p(t,s){var q="",r;q+="\n ";if(r=f.defaultValue){r=r.call(t,{hash:{},data:s})}else{r=t.defaultValue;r=typeof r===h?r.apply(t):r}q+=j(r)+"\n ";return q}function n(r,q){return"\n (empty)\n "}i+="";if(d=f.name){d=d.call(m,{hash:{},data:k})}else{d=m.name;d=typeof d===h?d.apply(m):d}i+=j(d)+"\n\n ";d=f["if"].call(m,m.isBody,{hash:{},inverse:o.program(3,c,k),fn:o.program(1,e,k),data:k});if(d||d===0){i+=d}i+="\n\n";if(d=f.description){d=d.call(m,{hash:{},data:k})}else{d=m.description;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+="\n";if(d=f.paramType){d=d.call(m,{hash:{},data:k})}else{d=m.paramType;d=typeof d===h?d.apply(m):d}if(d||d===0){i+=d}i+='\n\n';return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.param_required=b(function(f,q,o,j,u){this.compilerInfo=[4,">= 1.0.0"];o=this.merge(o,f.helpers);u=u||{};var p="",g,d="function",c=this.escapeExpression,n=this;function m(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(4,k,y),fn:n.program(2,l,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function l(z,y){var w="",x;w+='\n \n ";return w}function k(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(7,h,y),fn:n.program(5,i,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function i(z,y){var w="",x;w+="\n \n ";return w}function h(z,y){var w="",x;w+="\n \n
    \n
    \n ';return w}function e(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.isFile,{hash:{},inverse:n.program(12,t,y),fn:n.program(10,v,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function v(z,y){var w="",x;w+="\n \n ";return w}function t(z,y){var w="",x;w+="\n ";x=o["if"].call(z,z.defaultValue,{hash:{},inverse:n.program(15,r,y),fn:n.program(13,s,y),data:y});if(x||x===0){w+=x}w+="\n ";return w}function s(z,y){var w="",x;w+="\n \n ";return w}function r(z,y){var w="",x;w+="\n \n ";return w}p+="";if(g=o.name){g=g.call(q,{hash:{},data:u})}else{g=q.name;g=typeof g===d?g.apply(q):g}p+=c(g)+"\n\n ";g=o["if"].call(q,q.isBody,{hash:{},inverse:n.program(9,e,u),fn:n.program(1,m,u),data:u});if(g||g===0){p+=g}p+="\n\n\n ";if(g=o.description){g=g.call(q,{hash:{},data:u})}else{g=q.description;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+="\n\n";if(g=o.paramType){g=g.call(q,{hash:{},data:u})}else{g=q.paramType;g=typeof g===d?g.apply(q):g}if(g||g===0){p+=g}p+='\n\n';return p})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.parameter_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.consumes,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.resource=b(function(f,l,e,k,j){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,f.helpers);j=j||{};var h="",c,o,g="function",i=this.escapeExpression,n=this,m=e.blockHelperMissing;function d(q,p){return" : "}h+="
    \n

    \n ";if(c=e.name){c=c.call(l,{hash:{},data:j})}else{c=l.name;c=typeof c===g?c.apply(l):c}h+=i(c)+" ";o={hash:{},inverse:n.noop,fn:n.program(1,d,j),data:j};if(c=e.description){c=c.call(l,o)}else{c=l.description;c=typeof c===g?c.apply(l):c}if(!e.description){c=m.call(l,c,o)}if(c||c===0){h+=c}if(c=e.description){c=c.call(l,{hash:{},data:j})}else{c=l.description;c=typeof c===g?c.apply(l):c}if(c||c===0){h+=c}h+="\n

    \n \n
    \n\n";return h})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.response_content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,g.helpers);j=j||{};var i="",c,h="function",m=this;function e(r,q){var o="",p;o+="\n ";p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+="\n";return o}function d(r,q){var o="",p;o+='\n \n ";return o}function n(p,o){return'\n \n'}i+='\n\n";return i})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.signature=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+='
    \n
      \n
    • ';if(c=d.modelLabel){c=c.call(k,{hash:{},data:i})}else{c=k.modelLabel;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='
    • \n
    • Model
    • \n
    • Model Schema
    • \n
    \n
    \n\n
    \n
    \n ';if(c=d.signature){c=c.call(k,{hash:{},data:i})}else{c=k.signature;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+='\n
    \n\n
    \n
    ';if(c=d.sampleJSON){c=c.call(k,{hash:{},data:i})}else{c=k.sampleJSON;c=typeof c===f?c.apply(k):c}g+=h(c)+'
    \n \n
    \n
    \n\n';return g})})();(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.status_code=b(function(e,k,d,j,i){this.compilerInfo=[4,">= 1.0.0"];d=this.merge(d,e.helpers);i=i||{};var g="",c,f="function",h=this.escapeExpression;g+="";if(c=d.code){c=c.call(k,{hash:{},data:i})}else{c=k.code;c=typeof c===f?c.apply(k):c}g+=h(c)+"\n";if(c=d.message){c=c.call(k,{hash:{},data:i})}else{c=k.message;c=typeof c===f?c.apply(k):c}if(c||c===0){g+=c}g+="\n";return g})})();(function(){var j,r,u,o,l,k,n,m,i,p,s,q,h,c,g,f,e,d,b,a,x,w,t={}.hasOwnProperty,v=function(B,z){for(var y in z){if(t.call(z,y)){B[y]=z[y]}}function A(){this.constructor=B}A.prototype=z.prototype;B.prototype=new A();B.__super__=z.prototype;return B};s=(function(z){v(y,z);function y(){q=y.__super__.constructor.apply(this,arguments);return q}y.prototype.dom_id="swagger_ui";y.prototype.options=null;y.prototype.api=null;y.prototype.headerView=null;y.prototype.mainView=null;y.prototype.initialize=function(A){var B=this;if(A==null){A={}}if(A.dom_id!=null){this.dom_id=A.dom_id;delete A.dom_id}if($("#"+this.dom_id)==null){$("body").append('
    ')}this.options=A;this.options.success=function(){return B.render()};this.options.progress=function(C){return B.showMessage(C)};this.options.failure=function(C){return B.onLoadFailure(C)};this.headerView=new r({el:$("#header")});return this.headerView.on("update-swagger-ui",function(C){return B.updateSwaggerUi(C)})};y.prototype.updateSwaggerUi=function(A){this.options.url=A.url;return this.load()};y.prototype.load=function(){var B,A;if((A=this.mainView)!=null){A.clear()}B=this.options.url;if(B.indexOf("http")!==0){B=this.buildUrl(window.location.href.toString(),B)}this.options.url=B;this.headerView.update(B);this.api=new SwaggerApi(this.options);this.api.build();return this.api};y.prototype.render=function(){var A=this;this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new u({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options}).render();this.showMessage();switch(this.options.docExpansion){case"full":Docs.expandOperationsForResource("");break;case"list":Docs.collapseOperationsForResource("")}if(this.options.onComplete){this.options.onComplete(this.api,this)}return setTimeout(function(){return Docs.shebang()},400)};y.prototype.buildUrl=function(C,A){var B,D;log("base is "+C);if(A.indexOf("/")===0){D=C.split("/");C=D[0]+"//"+D[2];return C+A}else{B=C.length;if(C.indexOf("?")>-1){B=Math.min(B,C.indexOf("?"))}if(C.indexOf("#")>-1){B=Math.min(B,C.indexOf("#"))}C=C.substring(0,B);if(C.indexOf("/",C.length-1)!==-1){return C+A}return C+"/"+A}};y.prototype.showMessage=function(A){if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-success")}else{$("#message-bar").addClass("message-none")}return $("#message-bar").html(A)};y.prototype.onLoadFailure=function(A){var B;if(A==null){A=""}$("#message-bar").removeClass("message-fail");$("#message-bar").removeClass("message-none");$("#message-bar").removeClass("message-success");if(A.length>0){$("#message-bar").addClass("message-fail")}else{$("#message-bar").addClass("message-none")}B=$("#message-bar").html(A);if(this.options.onFailure!=null){this.options.onFailure(A)}return B};return y})(Backbone.Router);window.SwaggerUi=s;r=(function(z){v(y,z);function y(){h=y.__super__.constructor.apply(this,arguments);return h}y.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"};y.prototype.initialize=function(){};y.prototype.showPetStore=function(A){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})};y.prototype.showWordnikDev=function(A){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})};y.prototype.showCustomOnKeyup=function(A){if(A.keyCode===13){return this.showCustom()}};y.prototype.showCustom=function(A){if(A!=null){A.preventDefault()}return this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})};y.prototype.update=function(B,C,A){if(A==null){A=false}$("#input_baseUrl").val(B);if(A){return this.trigger("update-swagger-ui",{url:B})}};return y})(Backbone.View);u=(function(y){var z;v(A,y);function A(){g=A.__super__.constructor.apply(this,arguments);return g}z={alpha:function(C,B){return C.path.localeCompare(B.path)},method:function(C,B){return C.method.localeCompare(B.method)}};A.prototype.initialize=function(D){var C,H,F,E,B,G;if(D==null){D={}}if(D.swaggerOptions.sorter){F=D.swaggerOptions.sorter;H=z[F];G=this.model.apisArray;for(E=0,B=G.length;EB){K=B-C}if(KA){H=A-E}if(H0){D[I.name]=I.value}if(I.type==="file"){N=true}}E=G.find("textarea");for(L=0,F=E.length;L0){D.body=I.value}}B=G.find("select");for(K=0,C=B.length;K0){D[I.name]=J}}A.responseContentType=$("div select[name=responseContentType]",$(this.el)).val();A.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val();$(".response_throbber",$(this.el)).show();if(N){return this.handleFileUpload(D,G)}else{return this.model["do"](D,A,this.showCompleteStatus,this.showErrorStatus,this)}}};y.prototype.success=function(A,B){return B.showCompleteStatus(A)};y.prototype.handleFileUpload=function(R,I){var M,H,C,N,L,K,P,J,G,F,D,Q,U,T,S,E,B,A,V,O=this;E=I.serializeArray();for(J=0,Q=E.length;J0){R[N.name]=N.value}}M=new FormData();P=0;B=this.model.parameters;for(G=0,U=B.length;G"+this.invocationUrl+"
    ");L={type:this.model.method,url:this.invocationUrl,headers:C,data:M,dataType:"json",contentType:false,processData:false,error:function(X,Y,W){return O.showErrorStatus(O.wrap(X),O)},success:function(W){return O.showResponse(W,O)},complete:function(W){return O.showCompleteStatus(O.wrap(W),O)}};if(window.authorizations){window.authorizations.apply(L)}if(P===0){L.data.append("fake","true")}jQuery.ajax(L);return false};y.prototype.wrap=function(E){var C,F,H,B,G,D,A;H={};F=E.getAllResponseHeaders().split("\r");for(D=0,A=F.length;D0){return C.join(",")}else{return null}}};y.prototype.hideResponse=function(A){if(A!=null){A.preventDefault()}$(".response",$(this.el)).slideUp();return $(".response_hider",$(this.el)).fadeOut()};y.prototype.showResponse=function(A){var B;B=JSON.stringify(A,null,"\t").replace(/\n/g,"
    ");return $(".response_body",$(this.el)).html(escape(B))};y.prototype.showErrorStatus=function(B,A){return A.showStatus(B)};y.prototype.showCompleteStatus=function(B,A){return A.showStatus(B)};y.prototype.formatXml=function(H){var D,G,B,I,N,J,C,A,L,M,F,E,K;A=/(>)(<)(\/*)/g;M=/[ ]*(.*)[ ]+\n/g;D=/(<.+>)(.+\n)/g;H=H.replace(A,"$1\n$2$3").replace(M,"$1\n").replace(D,"$1\n$2");C=0;G="";N=H.split("\n");B=0;I="other";L={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0};F=function(T){var P,O,R,V,S,Q,U;Q={single:Boolean(T.match(/<.+\/>/)),closing:Boolean(T.match(/<\/.+>/)),opening:Boolean(T.match(/<[^!?].*>/))};S=((function(){var W;W=[];for(R in Q){U=Q[R];if(U){W.push(R)}}return W})())[0];S=S===void 0?"other":S;P=I+"->"+S;I=S;V="";B+=L[P];V=((function(){var X,Y,W;W=[];for(O=X=0,Y=B;0<=Y?XY;O=0<=Y?++X:--X){W.push(" ")}return W})()).join("");if(P==="opening->closing"){return G=G.substr(0,G.length-1)+T+"\n"}else{return G+=V+T+"\n"}};for(E=0,K=N.length;E").text("no content");F=$('
    ').append(E)}else{if(H==="application/json"||/\+json$/.test(H)){E=$("").text(JSON.stringify(JSON.parse(D),null,"  "));F=$('
    ').append(E)}else{if(H==="application/xml"||/\+xml$/.test(H)){E=$("").text(this.formatXml(D));F=$('
    ').append(E)}else{if(H==="text/html"){E=$("").html(D);F=$('
    ').append(E)}else{if(/^image\//.test(H)){F=$("").attr("src",B)}else{E=$("").text(D);F=$('
    ').append(E)}}}}}C=F;$(".request_url",$(this.el)).html("
    "+B+"
    ");$(".response_code",$(this.el)).html("
    "+A.status+"
    ");$(".response_body",$(this.el)).html(C);$(".response_headers",$(this.el)).html("
    "+_.escape(JSON.stringify(A.headers,null,"  ")).replace(/\n/g,"
    ")+"
    ");$(".response",$(this.el)).slideDown();$(".response_hider",$(this.el)).show();$(".response_throbber",$(this.el)).hide();return hljs.highlightBlock($(".response_body",$(this.el))[0])};y.prototype.toggleOperationContent=function(){var A;A=$("#"+Docs.escapeResourceName(this.model.parentId)+"_"+this.model.nickname+"_content");if(A.is(":visible")){return Docs.collapseOperation(A)}else{return Docs.expandOperation(A)}};return y})(Backbone.View);p=(function(z){v(y,z);function y(){d=y.__super__.constructor.apply(this,arguments);return d}y.prototype.initialize=function(){};y.prototype.isListType=function(B){var A;A=null;if(B&&B.indexOf("[")>=0){A=B.substring(B.indexOf("[")+1,B.indexOf("]"))}else{A=void 0}return A};y.prototype.render=function(){var D,G,F,A,H,C,B,E;E=this.template();$(this.el).html(E(this.model));F=this.isListType(this.model.responseModel);D=false;if((F!==null&&swaggerUi.api.models[F])||swaggerUi.api.models[this.model.responseModel]){D=false}else{D=true}G=null;A=null;if(D){G=SwaggerModelProperty.prototype.toSampleValue(F||this.model.responseModel);A=F||this.model.responseModel;if((F||this.model.responseModel)==="string"){G='"'+G+'"'}if(F){G="["+G+"]";A='Array of '+A+""}}else{if(F){G="["+JSON.stringify(swaggerUi.api.models[F].createJSONSample(),null,2)+"]";A='Array of '+swaggerUi.api.models[F].getMockSignature()}else{G=JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2);A=swaggerUi.api.models[this.model.responseModel].getMockSignature()}}if(A.indexOf("{")>-1){H=A.substring(0,A.indexOf("{"))+""}else{H=A}C={modelLabel:H,sampleJSON:G,isParam:false,signature:A};B=new i({model:C,tagName:"div"});$(".model-signature",this.$el).append(B.render().el);return this};y.prototype.template=function(){return Handlebars.templates.status_code};return y})(Backbone.View);k=(function(z){v(y,z);function y(){b=y.__super__.constructor.apply(this,arguments);return b}y.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(B,A){if(B.type.toLowerCase()==="array"||B.allowMultiple){return A.fn(this)}else{return A.inverse(this)}})};y.prototype.render=function(){var G,A,C,F,B,H,E,D;D=this.model.type||this.model.dataType;if(this.model.paramType==="body"){this.model.isBody=true}if(D.toLowerCase()==="file"){this.model.isFile=true}E=this.template();$(this.el).html(E(this.model));B={sampleJSON:this.model.sampleJSON,isParam:true,signature:this.model.signature};if(this.model.sampleJSON){H=new i({model:B,tagName:"div"});$(".model-signature",$(this.el)).append(H.render().el)}else{$(".model-signature",$(this.el)).html(this.model.signature)}A=false;if(this.model.isBody){A=true}G={isParam:A};G.consumes=this.model.consumes;if(A){C=new l({model:G});$(".parameter-content-type",$(this.el)).append(C.render().el)}else{F=new m({model:G});$(".response-content-type",$(this.el)).append(F.render().el)}return this};y.prototype.template=function(){if(this.model.isList){return Handlebars.templates.param_list}else{if(this.options.readOnly){if(this.model.required){return Handlebars.templates.param_readonly_required}else{return Handlebars.templates.param_readonly}}else{if(this.model.required){return Handlebars.templates.param_required}else{return Handlebars.templates.param}}}};return y})(Backbone.View);i=(function(z){v(y,z);function y(){a=y.__super__.constructor.apply(this,arguments);return a}y.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"};y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));this.switchToSnippet();$(".snippet-link",$(this.el)).removeClass("selected");$(".snippet",$(this.el)).hide();this.isParam=this.model.isParam;if(this.isParam){$(".notice",$(this.el)).text("Click to set as parameter value")}return this};y.prototype.template=function(){return Handlebars.templates.signature};y.prototype.switchToDescription=function(A){if(A!=null){A.preventDefault()}$(".snippet",$(this.el)).hide();$(".snippet-link",$(this.el)).removeClass("selected");$(".description",$(this.el)).toggle();return $(".description-link",$(this.el)).toggleClass("selected")};y.prototype.switchToSnippet=function(A){if(A!=null){A.preventDefault()}$(".description",$(this.el)).hide();$(".description-link",$(this.el)).removeClass("selected");$(".snippet",$(this.el)).toggle();return $(".snippet-link",$(this.el)).toggleClass("selected")};y.prototype.snippetToTextArea=function(A){var B;if(this.isParam){if(A!=null){A.preventDefault()}B=$("textarea",$(this.el.parentNode.parentNode.parentNode));if($.trim(B.val())===""){return B.val(this.model.sampleJSON)}}};return y})(Backbone.View);j=(function(y){v(z,y);function z(){x=z.__super__.constructor.apply(this,arguments);return x}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=contentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.content_type};return z})(Backbone.View);m=(function(y){v(z,y);function z(){w=z.__super__.constructor.apply(this,arguments);return w}z.prototype.initialize=function(){};z.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=responseContentType]",$(this.el)).text("Response Content Type");return this};z.prototype.template=function(){return Handlebars.templates.response_content_type};return z})(Backbone.View);l=(function(z){v(y,z);function y(){c=y.__super__.constructor.apply(this,arguments);return c}y.prototype.initialize=function(){};y.prototype.render=function(){var A;A=this.template();$(this.el).html(A(this.model));$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:");return this};y.prototype.template=function(){return Handlebars.templates.parameter_content_type};return y})(Backbone.View)}).call(this); \ No newline at end of file From 3dc7de6881fac75ee26d7d3ee187fdebb445bc73 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 18:19:09 -0700 Subject: [PATCH 11/54] Ported extensions for more Swagger 1.2 metadata, returns+errors as responseMessages, consumes+produces, and X-Forwarded-Proto for reverse-proxying from HTTPS to HTTP --- lib/class-helper.js | 2 +- lib/route-helper.js | 34 ++++++++++++++++++++++++++-------- lib/swagger.js | 14 ++++++++------ package.json | 4 ++-- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/lib/class-helper.js b/lib/class-helper.js index de3a0a7..e6d22dd 100644 --- a/lib/class-helper.js +++ b/lib/class-helper.js @@ -23,7 +23,7 @@ var classHelper = module.exports = { */ generateAPIDoc: function(aClass, opts) { return { - apiVersion: opts.version, + apiVersion: opts.version || '1', swaggerVersion: opts.swaggerVersion, basePath: opts.basePath, resourcePath: urlJoin('/', opts.resourcePath), diff --git a/lib/route-helper.js b/lib/route-helper.js index 263bbd2..8f8c10e 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -119,6 +119,16 @@ var routeHelper = module.exports = { // be removed. var accepts = routeHelper.convertAcceptsToSwagger(route, classDef); var returns = routeHelper.convertReturnsToSwagger(route, classDef); + var responseMessages = [ + { + code: 200, + message: 'Request was successful', + responseModel: returns.model || prepareDataType(returns.type) || 'void' + } + ]; + if (route.errors) { + responseMessages.push.apply(responseMessages, route.errors); + } debug('route %j', route); @@ -128,17 +138,19 @@ var routeHelper = module.exports = { // `items` and `format` fields. operations: [routeHelper.extendWithType({ method: routeHelper.convertVerb(route.verb), + deprecated: route.deprecated, // [rfeng] Swagger UI doesn't escape '.' for jQuery selector nickname: route.method.replace(/\./g, '_'), // Per the spec: // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#523-operation-object // This is the only object that may have a type of 'void'. type: returns.model || returns.type || 'void', - parameters: accepts, - // TODO(schoon) - We don't have descriptions for this yet. - responseMessages: [], summary: route.description, // TODO(schoon) - Excerpt? - notes: '' // TODO(schoon) - `description` metadata? + notes: route.notes, // TODO(schoon) - `description` metadata? + consumes: ['application/json', 'application/xml', 'text/xml'], + produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], + parameters: accepts, + responseMessages: responseMessages })] }; @@ -192,15 +204,21 @@ var routeHelper = module.exports = { } var out = { - paramType: paramType || type, name: name, - description: accepts.description, - type: accepts.type, required: !!accepts.required, + paramType: paramType || type, + type: accepts.type, + $ref: accepts.model, + items: accepts.items, + uniqueItems: accepts.uniqueItems, + format: accepts.format, + pattern: accepts.pattern, defaultValue: accepts.defaultValue, + enum: accepts.enum, minimum: accepts.minimum, maximum: accepts.maximum, - allowMultiple: false + allowMultiple: accepts.allowMultiple, + description: accepts.description }; out = routeHelper.extendWithType(out); diff --git a/lib/swagger.js b/lib/swagger.js index 2bea1a1..6084adb 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -100,7 +100,8 @@ function addRoute(app, uri, doc) { if (hasBasePath) { var headers = req.headers; var host = headers.Host || headers.host; - doc.basePath = req.protocol + '://' + host + initialPath; + var protocol = headers['x-forwarded-proto'] || headers['X-Forwarded-Proto'] || ctx.req.protocol + doc.basePath = protocol + '://' + host + initialPath; } res.status(200).send(doc); }); @@ -116,13 +117,14 @@ function generateResourceDoc(opts) { return { swaggerVersion: opts.swaggerVersion, apiVersion: opts.version, - apis: [], // See https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#513-info-object - info: opts.apiInfo + info: opts.apiInfo, // TODO Authorizations // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#514-authorizations-object - // TODO Produces/Consumes - // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#52-api-declaration + consumes: ['application/json', 'application/xml', 'text/xml'], + produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], + apis: [], + models: opts.models }; } @@ -135,7 +137,7 @@ function getVersion() { try { version = require(path.join(process.cwd(), 'package.json')).version; } catch(e) { - version = ''; + version = '1'; } return version; } diff --git a/package.json b/package.json index 05eb9fb..9184320 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/strongloop/loopback-explorer/issues" }, "devDependencies": { - "loopback": "1.x", + "loopback": "git+https://github.com/shelbys/loopback.git#loopback-v2", "mocha": "~1.20.1", "supertest": "~0.13.0", "chai": "~1.9.1" @@ -31,7 +31,7 @@ "url": "https://github.com/strongloop/loopback-explorer/blob/master/LICENSE" }, "dependencies": { - "swagger-ui": "~2.0.18", + "swagger-ui": "git+https://github.com/shelbys/swagger-ui.git", "debug": "~1.0.3", "lodash.clonedeep": "^2.4.1", "lodash.defaults": "^2.4.1", From 86d79584f93c6d25346359fd782e4969fd0b1cd7 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Fri, 4 Jul 2014 14:28:47 -0500 Subject: [PATCH 12/54] Load swagger ui from `swagger-ui` package instead. Added option `swaggerDistRoot` for specific file overrides. Conflicts: README.md example/simple.js index.js package.json public/css/screen.css public/images/logo_small.png public/index.html public/lib/loadSwaggerUI.js --- README.md | 13 + index.js | 6 +- public/css/screen.css | 1675 ----------------- ...L2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 29548 -> 0 bytes ...dpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 25388 -> 0 bytes ...evf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 23196 -> 0 bytes public/images/logo_small.png | Bin 770 -> 0 bytes public/images/throbber.gif | Bin 9257 -> 0 bytes public/lib/loadSwaggerUI.js | 4 +- 9 files changed, 18 insertions(+), 1680 deletions(-) delete mode 100644 public/css/screen.css delete mode 100644 public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff delete mode 100644 public/fonts/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff delete mode 100644 public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff delete mode 100644 public/images/logo_small.png delete mode 100644 public/images/throbber.gif diff --git a/README.md b/README.md index 882e104..469cc72 100644 --- a/README.md +++ b/README.md @@ -96,3 +96,16 @@ Options are passed to `explorer(app, options)`. > Default: Read from package.json > Sets your API version. If not present, will read from your app's package.json. +======= +> Set the base path for swagger resources. +> Default: `app.get('restAPIRoot')` or `/swagger/resources`. + +`swaggerDistRoot`: **String** + +> Set a path within your application for overriding Swagger UI files. + +> If present, will search `swaggerDistRoot` first when attempting to load Swagger UI, allowing +you to pick and choose overrides. + +> See [index.html](public/index.html), where you may want to begin your overrides. +> The rest of the UI is provided by [Swagger UI](https://github.com/wordnik/swagger-ui). diff --git a/index.js b/index.js index 5062627..55e5aae 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ - 'use strict'; +'use strict'; /*! * Adds dynamically-updated docs as /explorer */ @@ -8,7 +8,7 @@ var urlJoin = require('./lib/url-join'); var _defaults = require('lodash.defaults'); var express = require('express'); var swagger = require('./lib/swagger'); -var SWAGGER_UI_ROOT = path.join(__dirname, 'node_modules', +var SWAGGER_UI_ROOT = path.join(__dirname, 'node_modules', 'swagger-ui', 'dist'); var STATIC_ROOT = path.join(__dirname, 'public'); @@ -61,4 +61,4 @@ function explorer(loopbackApplication, options) { app.use(express.static(SWAGGER_UI_ROOT)); return app; -} +} \ No newline at end of file diff --git a/public/css/screen.css b/public/css/screen.css deleted file mode 100644 index 0b2ce15..0000000 --- a/public/css/screen.css +++ /dev/null @@ -1,1675 +0,0 @@ -/* FIXME move overrides only into loopbackStyles.css */ -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -caption, -th, -td { - text-align: left; - font-weight: normal; - vertical-align: middle; -} -q, -blockquote { - quotes: none; -} -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; - content: none; -} -a img { - border: none; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section, -summary { - display: block; -} - -h1 a, -h2 a, -h3 a, -h4 a, -h5 a, -h6 a { - text-decoration: none; -} -h1 a:hover, -h2 a:hover, -h3 a:hover, -h4 a:hover, -h5 a:hover, -h6 a:hover { - text-decoration: underline; -} -h1 span.divider, -h2 span.divider, -h3 span.divider, -h4 span.divider, -h5 span.divider, -h6 span.divider { - color: #aaaaaa; -} -h1 { - color: black; - font-size: 1.5em; - line-height: 1.3em; - padding: 10px 0 10px 0; - font-family: 'Ubuntu', sans-serif; - font-weight: bold; -} -h2 { - color: black; - font-size: 1.3em; - padding: 10px 0 10px 0; -} -h2 a { - color: black; -} -h2 span.sub { - font-size: 0.7em; - color: #999999; - font-style: italic; -} -h2 span.sub a { - color: #777777; -} -h3 { - color: black; - font-size: 1.1em; - padding: 10px 0 10px 0; -} -.heading_with_menu { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.heading_with_menu h1, -.heading_with_menu h2, -.heading_with_menu h3, -.heading_with_menu h4, -.heading_with_menu h5, -.heading_with_menu h6 { - display: block; - clear: none; - float: left; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - width: 60%; -} -.heading_with_menu ul { - display: block; - clear: none; - float: right; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - margin-top: 10px; -} -input.parameter { - width: 300px; - border: 1px solid #aaa; -} -.body-textarea { - width: 300px; - height: 100px; - border: 1px solid #aaa; -} -p { - line-height: 1.4em; - padding: 0 0 10px; - color: #333333; -} -ol { - margin: 0px 0 10px; - padding: 0 0 0 18px; - list-style-type: decimal; -} -ol li { - padding: 5px 0px; - font-size: 0.9em; - color: #333333; -} -.markdown h3 { - color: #547f00; -} -.markdown h4 { - color: #666666; -} -.markdown pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; - margin: 0 0 10px 0; -} -.markdown pre code { - line-height: 1.6em; -} -.markdown p code, -.markdown li code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #f0f0f0; - color: black; - padding: 1px 3px; -} -.markdown ol, -.markdown ul { - font-family: 'Ubuntu', sans-serif; - margin: 5px 0 10px; - padding: 0 0 0 18px; - list-style-type: disc; -} -.markdown ol li, -.markdown ul li { - padding: 3px 0px; - line-height: 1.4em; - color: #333333; -} -div.gist { - margin: 20px 0 25px 0 !important; -} -p.big, -div.big p { - font-size: 1em; - margin-bottom: 10px; -} -span.weak { - color: #666666; -} -span.blank, -span.empty { - color: #888888; - font-style: italic; -} -a { - color: #547f00; -} -b, -strong { - font-family: 'Ubuntu', sans-serif; - font-weight: bold; -} -.code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; -} -pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; -} -pre code { - line-height: 1.6em; -} -.required { - font-weight: bold; -} -table.fullwidth { - width: 100%; -} -table thead tr th { - padding: 5px; - font-size: 0.9em; - color: #666666; - border-bottom: 1px solid #999999; -} -table tbody tr.offset { - background-color: #f5f5f5; -} -table tbody tr td { - padding: 6px; - font-size: 0.9em; - border-bottom: 1px solid #cccccc; - vertical-align: top; - line-height: 1.3em; -} -table tbody tr:last-child td { - border-bottom: none; -} -table tbody tr.offset { - background-color: #f0f0f0; -} -form.form_box { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; - padding: 10px; -} -form.form_box label { - color: #0f6ab4 !important; -} -form.form_box input[type=submit] { - display: block; - padding: 10px; -} -form.form_box p { - font-size: 0.9em; - padding: 0 0 15px; - color: #7e7b6d; -} -form.form_box p a { - color: #646257; -} -form.form_box p strong { - color: black; -} -form.form_box p.weak { - font-size: 0.8em; -} -form.formtastic fieldset.inputs ol li p.inline-hints { - margin-left: 0; - font-style: italic; - font-size: 0.9em; - margin: 0; -} -form.formtastic fieldset.inputs ol li label { - display: block; - clear: both; - width: auto; - padding: 0 0 3px; - color: #666666; -} -form.formtastic fieldset.inputs ol li label abbr { - padding-left: 3px; - color: #888888; -} -form.formtastic fieldset.inputs ol li.required label { - color: black; -} -form.formtastic fieldset.inputs ol li.string input, -form.formtastic fieldset.inputs ol li.url input, -form.formtastic fieldset.inputs ol li.numeric input { - display: block; - padding: 4px; - width: auto; - clear: both; -} -form.formtastic fieldset.inputs ol li.string input.title, -form.formtastic fieldset.inputs ol li.url input.title, -form.formtastic fieldset.inputs ol li.numeric input.title { - font-size: 1.3em; -} -form.formtastic fieldset.inputs ol li.text textarea { - font-family: 'Ubuntu', sans-serif; - height: 250px; - padding: 4px; - display: block; - clear: both; -} -form.formtastic fieldset.inputs ol li.select select { - display: block; - clear: both; -} -form.formtastic fieldset.inputs ol li.boolean { - float: none; - clear: both; - overflow: hidden; - display: block; -} -form.formtastic fieldset.inputs ol li.boolean input { - display: block; - float: left; - clear: none; - margin: 0 5px 0 0; -} -form.formtastic fieldset.inputs ol li.boolean label { - display: block; - float: left; - clear: none; - margin: 0; - padding: 0; -} -form.formtastic fieldset.buttons { - margin: 0; - padding: 0; -} -form.fullwidth ol li.string input, -form.fullwidth ol li.url input, -form.fullwidth ol li.text textarea, -form.fullwidth ol li.numeric input { - width: 500px !important; -} -body { - padding-top: 60px; - font-family: 'Ubuntu', sans-serif; -} -body #content_message { - margin: 10px 15px; - font-style: italic; - color: #999999; -} -body #header { - background-color: #08592b; - position: fixed; - width: 100%; - top: 0; - padding: 14px; -} -body #header a#logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../images/logo_small.png) no-repeat left center; - padding: 20px 0 20px 60px; - color: white; -} -body #header form#api_selector { - display: block; - clear: none; - float: right; -} -body #header form#api_selector .input { - display: block; - clear: none; - float: left; - margin: 0 10px 0 0; -} -body #header form#api_selector .input input { - font-size: 0.9em; - padding: 3px; - margin: 0; -} -body #header form#api_selector .input input#input_baseUrl { - width: 400px; -} -body #header form#api_selector .input input#input_apiKey { - width: 200px; -} -body #header form#api_selector .input a#explore { - display: block; - text-decoration: none; - font-weight: bold; - padding: 6px 8px; - font-size: 0.9em; - color: white; - background-color: #7dbd33; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -o-border-radius: 4px; - -ms-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; -} -body #header form#api_selector .input a#explore:hover { - background-color: #808080; -} -body p#colophon { - margin: 0 15px 40px 15px; - padding: 10px 0; - font-size: 0.8em; - border-top: 1px solid #dddddd; - font-family: 'Ubuntu', sans-serif; - color: #999999; - font-style: italic; -} -body p#colophon a { - text-decoration: none; - color: #547f00; -} -body ul#resources { - font-family: 'Ubuntu', sans-serif; - font-size: 0.9em; -} -body ul#resources li.resource { - border-bottom: 1px solid #dddddd; -} -body ul#resources li.resource:last-child { - border-bottom: none; -} -body ul#resources li.resource div.heading { - border: 1px solid transparent; - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource div.heading h2 { - color: #999999; - padding-left: 0; - display: block; - clear: none; - float: left; - font-family: 'Ubuntu', sans-serif; - font-weight: bold; -} -body ul#resources li.resource div.heading h2 a { - color: #999999; -} -body ul#resources li.resource div.heading h2 a:hover { - color: black; -} -body ul#resources li.resource div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 14px 10px 0 0; -} -body ul#resources li.resource div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource div.heading ul.options li:first-child, -body ul#resources li.resource div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource div.heading ul.options li:last-child, -body ul#resources li.resource div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource div.heading ul.options li { - color: #666666; - font-size: 0.9em; -} -body ul#resources li.resource div.heading ul.options li a { - color: #aaaaaa; - text-decoration: none; -} -body ul#resources li.resource div.heading ul.options li a:hover { - text-decoration: underline; - color: black; -} -body ul#resources li.resource:hover div.heading h2 a, -body ul#resources li.resource.active div.heading h2 a { - color: black; -} -body ul#resources li.resource:hover div.heading ul.options li a, -body ul#resources li.resource.active div.heading ul.options li a { - color: #555555; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #e6f3f6; - border: 1px solid #bfe1e8; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #0085a1; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - border-right-color: #bfe1e8; - color: #0085a1; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { - color: #0085a1; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { - background-color: #e9f5f7; - border: 1px solid #bfe1e8; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { - color: #0085a1; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #66b6c7; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content .content-type div label { - clear: both; - display: block; - color: #0085a1; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #f4effa; - border: 1px solid #e3d8f3; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #9063cd; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - border-right-color: #e3d8f3; - color: #9063cd; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { - color: #9063cd; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { - background-color: #f6f2fb; - border: 1px solid #e3d8f3; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { - color: #9063cd; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #bca1e1; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content .content-type div label { - clear: both; - display: block; - color: #9063cd; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #ede7ee; - border: 1px solid #d1c2d6; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #470a59; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - border-right-color: #d1c2d6; - color: #470a59; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { - color: #470a59; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { - background-color: #efeaf1; - border: 1px solid #d1c2d6; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { - color: #470a59; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #916c9b; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content .content-type div label { - clear: both; - display: block; - color: #470a59; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #e6f9fb; - border: 1px solid #bff0f5; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #00c1d5; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - border-right-color: #bff0f5; - color: #00c1d5; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { - color: #00c1d5; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { - background-color: #e9fafb; - border: 1px solid #bff0f5; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { - color: #00c1d5; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #66dae6; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content .content-type div label { - clear: both; - display: block; - color: #00c1d5; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #fff2ec; - border: 1px solid #ffdfd0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #ff7f41; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - border-right-color: #ffdfd0; - color: #ff7f41; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { - color: #ff7f41; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { - background-color: #fff4ef; - border: 1px solid #ffdfd0; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { - color: #ff7f41; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #ffb28d; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content .content-type div label { - clear: both; - display: block; - color: #ff7f41; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - background-color: #fbede7; - border: 1px solid #f4d1c3; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span { - margin: 0; - padding: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #d4470f; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px 0; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path { - padding-left: 10px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a { - color: black; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a:hover { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:first-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.first { - padding-left: 0; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - border-right-color: #f4d1c3; - color: #d4470f; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { - color: #d4470f; - text-decoration: none; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:hover, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:active, -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a.active { - text-decoration: underline; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - background-color: #fbefeb; - border: 1px solid #f4d1c3; - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { - color: #d4470f; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content form input[type='text'].error { - outline: 2px solid #cc0000; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header img { - display: block; - clear: none; - float: right; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { - padding: 4px 0 0 10px; - color: #e5916f; - display: inline-block; - font-size: 0.9em; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content .content-type div label { - clear: both; - display: block; - color: #d4470f; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.model-signature { - font-family: 'Ubuntu', sans-serif; - font-size: 1em; - line-height: 1.5em; -} -.model-signature .description div { - font-size: 0.9em; - line-height: 1.5em; - margin-left: 1em; -} -.model-signature .description .strong { - font-weight: bold; - color: #000; - font-size: .9em; -} -.model-signature .description .stronger { - font-weight: bold; - color: #000; -} -.model-signature .signature-nav a { - text-decoration: none; - color: #AAA; -} -.model-signature pre { - font-size: .85em; - line-height: 1.2em; - overflow: auto; - max-height: 200px; - cursor: pointer; -} -.model-signature pre:hover { - background-color: #ffffdd; -} -.model-signature .snippet small { - font-size: 0.75em; -} -.model-signature .signature-container { - clear: both; -} -.model-signature .signature-nav a:hover { - text-decoration: underline; - color: black; -} -.model-signature .signature-nav .selected { - color: black; - text-decoration: none; -} -.model-signature ul.signature-nav { - display: block; - margin: 0; - padding: 0; -} -.model-signature ul.signature-nav li { - float: left; - margin: 0 5px 5px 0; - padding: 2px 5px 2px 0; - border-right: 1px solid #ddd; -} -.model-signature ul.signature-nav li:last-child { - padding-right: 0; - border-right: none; -} -.model-signature .propName { - font-weight: bold; -} -.model-signature .propType { - color: #5555aa; -} -.model-signature .propOptKey { - font-style: italic; -} -.model-signature .propOpt { - color: #555; -} -pre code { - background: none; -} -.content pre { - font-size: 12px; - margin-top: 5px; - padding: 5px; -} -.swagger-ui-wrap { - max-width: 960px; - margin-left: auto; - margin-right: auto; -} -.icon-btn { - cursor: pointer; -} -#message-bar { - min-height: 30px; - text-align: center; - padding-top: 10px; -} -.message-success { - color: #89BF04; -} -.message-fail { - color: #cc0000; -} \ No newline at end of file diff --git a/public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff b/public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff deleted file mode 100644 index 80a3fc2f1de9dce7aee6c899ba7912bddb826840..0000000000000000000000000000000000000000 G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DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff deleted file mode 100644 index 31bdbab9fd3a0ee35e17a0a4ea90651c1fbb3d39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25388 zcmb@t1yCeQ69&k_;x3EJ;)}bxySux)`>?n>EV4N4!s71k?(XjHgAB)e|NABG;^N{i zZX&9>Go!jXt1|1$uey6Y6vV~BK7oDwOlZLn|2ozee#n1o{*wOpCoZlk2L|?u@k59I zSJCU>GFDJwVE)j_e#kl>#V{h{($~b!$nis0{88dQ%1!QZ<-UcH%ZCnv^P>&Q-vu2E z*231y{6i-R2KMa{42-X>>QRZVC>KShtHND$`76Ehy3-Ukij-X z(OcTNdVc7V!N9;VKl-qoYa+w9F>|&D1EVhk1EUEA12fR{C(K2)bujt3R-5(1j)uR= zA;}Vjoss8J$j%H5OcwzR4D!QfM8C`=Hfu)*mydfIWqw>2|8XB| zad6b}k8A#(o8brtrjK*5;RyZ6zm6lNHorYHO$^PIO^6FtxWvJg%r4bNd1i&Vh z#F|ylMT3MA2V<5;2>|=6Z$m@#?}j)~;!r4_5PM94Kw1Q>?{%Moz~jlmOr4mon1`6> zm|iVdO%cqw2VA3$V*|qjlLIpY69ZEMql6=RaLK2k-#6dix~|>@mS~ZxkRU@L1qp-{ z33}kr;FtvoeqeKBzrVk}-@hll$GsCh3taneZ@&9)zWTixo(9Pwv-4{{8V&@3pka|& zFA0)6i5+#eDCX+PK8dqKHL;6ReC-ad0K>+hEweqt&(vMxZS#Ev4;1bp$v56XOH`g= zu5rGBi3Fk63vzXJgJ z6d=@1oM*I+nxHhzRPA&P8-ZYVp0%E2F{aaIIb8E=RHH(_-u(R84UgS^qs44B_T0z) za(z%SIWfa4&)7(aT|^60WRN!07%KG6x$4x}8e9F$T6O}W+QkMZF+;nEh~IfYA5MZkEj6->p8#q zb6IZ~D#K8`_T^_fN9X3{+r*=vOuXpk$ZB8ZFpDUu5PI;2BEx=u@pt8`2$$RA-?G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f$qI{*>rB4uIjVJlSm8Av* zy~NJTx}{prb)G~gs#-Lbq2t1|;I|&NSo*m6^oi#M9`(O4y2(3@JT%b#QV868$Wrpk zIITbqUC;Y0)&P6cL3iJDzZ0ZwoBJD1iemh(9!2yZwnlAwpE#W?$*^6v6unuDyMo z2I4o%5ROGKjda$cNDQ}0dbKj&az>;~9l3vXAV82n6>!RR&vkSli>|ZzVoG>$UDyO_ zPSV~DyC%3M{ampWmD|{J8EU=Bpw`;MkHzBZEW(#&?|ZupuP<)Pcovk8TouH}*kCHn zd~!XS9xRztsuQo0{_k?N?YLbCfUKTK7>vlQT*VJ&eJ~nm!+W$vnC9dvdek5ASC?U& zQMPCca8jCun$^4x@k)Un-yVCly*MU|8r>LQHBH$JJzYv&8yLAaeuD`bmYkpr7I>U) z5hRe9tXKL;tPz=30Y+vf=OZ&SQ_JACnJLfYrZdy3DB-rrPY*=f9_T)k4>Pq*DUuqn zO{;{+O(z!!m1%Tnxn*>!zHiqTu3YIjePokPqR|-^{uVE=kgm^xt(JVhxwdSzs`}3d;(+fkYl%{zMXgv z=R5ndIluDx(uG*sP=)smqFtU(--zp=B;QcQ+exUTKD2&h6;hes{6G+SycxADxQJKA z3Fg;|X~q_}ftzv)8;{4IT^w@auUH(=snX0m#2YsjGpNx@Ti`J zowhYws{eM3sSKY0tR>JY?YMZsW9rLKZH&&{iy5jgjO(gVAIs&t+l@M2BeFrRQ+}=N EKR)7<6951J diff --git a/public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff b/public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff deleted file mode 100644 index 8951646f79983a6eaed8d34e5e3c69b20dad6662..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23196 zcmce-1yo$i@;5q!0Kp-+LvVL@m*50<2=4B#!3pk=V8IE_;O_43?mjTUN6tOxzWe{y zTkn1At+(#1>bhy+PaVG)+Zfuv>5AV<>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OYQUQz^Hz6`CRITco1wEw?12rL(YDf-N7Mq_HMLV5s+K7r-0vOi!?B7tGs{s@lsxl zU!>dBZP2np&68^0<;Av#nbIPHq{ztx+{WxL%R@l&1IbAtkp`{N$?Ss-sDR0nP0oaC z9ERlM8h3OEhK)LPrZ>1q}7PI_|!>>%+ZUK6in(^W+VH(X^MwZ0$> z#EAAuTf`shstGn6#5v8LJ8N9}seX91H~DsuPZ#e*kgvrCM=iGT@|<1x9ql-UyY7$e zPV$h0_bbd$FwUwolC@-)o;L-(zCkPz)`*YJ_u1pA+WUb=y$PwJj zEg&nDCA-qD?3iy0=L);}%=VaUVP8vVg~t;efgzonI)36<$01+Q0k5{<0YWg)u-qkTv^q)%>+wnR?WmvMNhB)HjI9=t zq{!qP^ZLab#J7*zGT-#nL|_`5(#NAW1>7X9eQys-+-E7I~YyOo;JC6 z)Qr5!P(G!}|CG25Jg)THTw7qVF%mf5=zE}`^Ftj^rjuh}sZtW?`JJqx{Pc&Nx-(pQ zt`o-QH>%W?lueTEoKT_*HLol(74^J#^Hx$)y^CpH1!KRZ!;1t7aKt|?H!v;a~Pwg{}&2C6~ml71wr1GqTHBPQe^tsHUu}(or!a5y#9_3*!lB!PT znu90I2EwIc6|Ozuw#gx#u|NZNZ4P9fpDDpSK55HFYSzsS)4!V_7d#v=bT^H7tzkmF z^`--n9qMH3;l$=}Cv)vrc~iIZDU4-ig<<|i0Z|+G!T~DH6QMLUs!hoKOtCufO*Y#y3%~1 zQ1I{)&dN>6`KkD`v=4DU$hYfFHXCCb1`+Lo{!^(=4R03H#In*Ce=$@{KS0v2=$382 zfT47Pk`6j%ZG!yVb6$Wjc4_%NqgTSG%`B($dZqjpt9UQ?E#xN{D9_r+x*8m2#tU?DGAu4~{nF45~`duV0o S-dX3YgSL=e`i4v|>c0T&R%vqp diff --git a/public/images/logo_small.png b/public/images/logo_small.png deleted file mode 100644 index 5496a65579ae903d4008f9d268fac422ef9d3679..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 770 zcmV+d1O5DoP)K11rQipnJ)eVnTSzHNF zN8ab&RhE5cC$$4FI-PZXx$pga@8yN)KS}L2Us~^y$(x-xioWbnFcV+~b9ig=!ft8Q z0RD+rpA8910Smyc0GviVUOPGiY6YM@-r6Nn8S&~cxHl27$l)-R$1(!Xx045RDy;_& zeXkG{;_#i9rz0B6149#Ddj=KM6MV^rTD%ylzGdCBX<^=^@I0X3SCR7OMbn}sUKdeF zKO-flaJa%@kJ27@Rod?J9=+Qx5|=PtG8n> zy~9rIu}+48M}FW5Bbqw3t#po?c?kmG!FX32W(dOjzTb+U@64MzHItoeB!M0Jcd}|E z>ekW`<~FjR_ZVVJkF|_htH&v!({Oad?xax?0K0sLwBY%nr46DpCmIIaa?@|Y&?n0q z@kJlMy`pE2HtEgASNd~xNzt$Kn7w#^Fy5oi`e$bUE*+f>Vk5z7=-2pj68afrqli$_ zvqe##5V?a)QU_-s9+s?mJYT5m`MQDRH4cYs^L1lCW;Dua5Ln9lG0BC@9DJQHA(}y&Z}$apb{kU zbezR}b^|O%6i+$BFsT3zqAe8wg9`vfiRp#{)z2bsJw`vBQL7Bt!IexM3$Hsf0tHK3 z+R=x{lR$K`s;7__?ASPW=3?*xgCpGaiadSEpoi0pw-_V#OXM8Ap{4qlG08x0ig9IY z3Ijqh(t1_=g#jocuqyJO=729e9OSiNDSrhR0Gc5G)(QGH?*IS*07*qoM6N<$f<~fU A82|tP diff --git a/public/images/throbber.gif b/public/images/throbber.gif deleted file mode 100644 index 06393889242fb3ea9e0205fa84369ec7bb66d15a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9257 zcmd^^X;@R|x`tQg5wbE8AV3mAn1TjmQ&en2CK8~ENEH<+P_)pZ24y2E+7O0>K^a6u zQ3;5MiU^7p6*M3qDk!2=YEcHMQ>nzEYP;R`e2C@r+U+?#XaC*&gKPcB#k$`o&;7mu zYNhYYXe|Uo84#4ZIko#rcU5K8*yFL{qT47O&^5f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>7h;0YlUFDvN`iNGu&5HQ5^e>6x?&JSc4V$6_I1jJ4vnCVbkU`Gz=Uy#~OI( zlL-$UAE$pVCsD_rICM#Q!ltzcqDphp5L|ZrqUm>=H%x!RjMrF#*?BN2shvUg=H;)& zy~_xWl*k$~9Hl6PIq({dELPE-r4*YNs7?5{>dlC`EcK~lPKB_8V)G@H)UZFF8$tXT z@^raW#Hq4OJGFL2Aye|HU&_NL%dYans6?ltqEBz`Q|m=@Zh4=-p2r;}q(Nbsk$fUI zP|(Ns2>MDvZi1H7<55frlQn#%?`WY3g`+fRuC#UJx%#d!zxEu3=}zF514S=6f@?~$ zeuSB=6E7r3ya|; z@K7M3VBrls6c{M*M_{AB_fVjgQ|F(FuK(@=1eWeVMSpLglllqV6Rg-L_46;?^IskS z)x6|SR1^gGl6amWjkb1dX}^8DumNXNmhsfxKA#;bBBIZE@0gma5yQY(FX>|N~Y^mgq`xc zdxOf6r{9u#_e0gV3(fdBTdV2Sc4SN5ZmP?cB4?KR Date: Mon, 4 Aug 2014 19:44:12 -0700 Subject: [PATCH 13/54] Corrected issues with merge of 2.x changes --- index.js | 4 +- public/css/screen.css | 1675 ++++++++++ ...L2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 0 -> 29548 bytes ...dpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 0 -> 25388 bytes ...evf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff | Bin 0 -> 23196 bytes public/images/explorer_icons.png | Bin 5763 -> 0 bytes public/images/logo_small.png | Bin 0 -> 2681 bytes public/images/pet_store_api.png | Bin 824 -> 0 bytes public/images/throbber.gif | Bin 0 -> 9257 bytes public/images/wordnik_api.png | Bin 980 -> 0 bytes public/index.html | 2 +- public/lib/loadSwaggerUI.js | 4 +- public/lib/shred.bundle.js | 2765 ----------------- public/lib/shred/content.js | 193 -- public/lib/swagger-oauth.js | 218 -- public/o2c.html | 15 - 16 files changed, 1680 insertions(+), 3196 deletions(-) create mode 100644 public/css/screen.css create mode 100644 public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff create mode 100644 public/fonts/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff create mode 100644 public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff delete mode 100644 public/images/explorer_icons.png create mode 100644 public/images/logo_small.png delete mode 100644 public/images/pet_store_api.png create mode 100644 public/images/throbber.gif delete mode 100644 public/images/wordnik_api.png delete mode 100644 public/lib/shred.bundle.js delete mode 100644 public/lib/shred/content.js delete mode 100644 public/lib/swagger-oauth.js delete mode 100644 public/o2c.html diff --git a/index.js b/index.js index 55e5aae..c27a48e 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -'use strict'; + 'use strict'; /*! * Adds dynamically-updated docs as /explorer */ @@ -8,7 +8,7 @@ var urlJoin = require('./lib/url-join'); var _defaults = require('lodash.defaults'); var express = require('express'); var swagger = require('./lib/swagger'); -var SWAGGER_UI_ROOT = path.join(__dirname, 'node_modules', +var SWAGGER_UI_ROOT = path.join(__dirname, 'node_modules', 'swagger-ui', 'dist'); var STATIC_ROOT = path.join(__dirname, 'public'); diff --git a/public/css/screen.css b/public/css/screen.css new file mode 100644 index 0000000..4a81758 --- /dev/null +++ b/public/css/screen.css @@ -0,0 +1,1675 @@ +/* FIXME move overrides only into loopbackStyles.css */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +caption, +th, +td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +q, +blockquote { + quotes: none; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; + content: none; +} +a img { + border: none; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section, +summary { + display: block; +} + +h1 a, +h2 a, +h3 a, +h4 a, +h5 a, +h6 a { + text-decoration: none; +} +h1 a:hover, +h2 a:hover, +h3 a:hover, +h4 a:hover, +h5 a:hover, +h6 a:hover { + text-decoration: underline; +} +h1 span.divider, +h2 span.divider, +h3 span.divider, +h4 span.divider, +h5 span.divider, +h6 span.divider { + color: #aaaaaa; +} +h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: 'Ubuntu', sans-serif; + font-weight: bold; +} +h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +h2 a { + color: black; +} +h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +h2 span.sub a { + color: #777777; +} +h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.heading_with_menu h1, +.heading_with_menu h2, +.heading_with_menu h3, +.heading_with_menu h4, +.heading_with_menu h5, +.heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.markdown h3 { + color: #547f00; +} +.markdown h4 { + color: #666666; +} +.markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.markdown pre code { + line-height: 1.6em; +} +.markdown p code, +.markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.markdown ol, +.markdown ul { + font-family: 'Ubuntu', sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.markdown ol li, +.markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +div.gist { + margin: 20px 0 25px 0 !important; +} +p.big, +div.big p { + font-size: 1em; + margin-bottom: 10px; +} +span.weak { + color: #666666; +} +span.blank, +span.empty { + color: #888888; + font-style: italic; +} +a { + color: #547f00; +} +b, +strong { + font-family: 'Ubuntu', sans-serif; + font-weight: bold; +} +.code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +pre code { + line-height: 1.6em; +} +.required { + font-weight: bold; +} +table.fullwidth { + width: 100%; +} +table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +table tbody tr.offset { + background-color: #f5f5f5; +} +table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +table tbody tr:last-child td { + border-bottom: none; +} +table tbody tr.offset { + background-color: #f0f0f0; +} +form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +form.form_box label { + color: #0f6ab4 !important; +} +form.form_box input[type=submit] { + display: block; + padding: 10px; +} +form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +form.form_box p a { + color: #646257; +} +form.form_box p strong { + color: black; +} +form.form_box p.weak { + font-size: 0.8em; +} +form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +form.formtastic fieldset.inputs ol li.required label { + color: black; +} +form.formtastic fieldset.inputs ol li.string input, +form.formtastic fieldset.inputs ol li.url input, +form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +form.formtastic fieldset.inputs ol li.string input.title, +form.formtastic fieldset.inputs ol li.url input.title, +form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +form.formtastic fieldset.inputs ol li.text textarea { + font-family: 'Ubuntu', sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +form.fullwidth ol li.string input, +form.fullwidth ol li.url input, +form.fullwidth ol li.text textarea, +form.fullwidth ol li.numeric input { + width: 500px !important; +} +body { + padding-top: 60px; + font-family: 'Ubuntu', sans-serif; +} +body #content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +body #header { + background-color: #08592b; + position: fixed; + width: 100%; + top: 0; + padding: 14px; +} +body #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo_small.png) no-repeat left center; + padding: 20px 0 20px 60px; + color: white; +} +body #header form#api_selector { + display: block; + clear: none; + float: right; +} +body #header form#api_selector .input { + display: block; + clear: none; + float: left; + margin: 0 10px 0 0; +} +body #header form#api_selector .input input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +body #header form#api_selector .input input#input_baseUrl { + width: 400px; +} +body #header form#api_selector .input input#input_apiKey { + width: 200px; +} +body #header form#api_selector .input a#explore { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #7dbd33; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +body #header form#api_selector .input a#explore:hover { + background-color: #808080; +} +body p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: 'Ubuntu', sans-serif; + color: #999999; + font-style: italic; +} +body p#colophon a { + text-decoration: none; + color: #547f00; +} +body ul#resources { + font-family: 'Ubuntu', sans-serif; + font-size: 0.9em; +} +body ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +body ul#resources li.resource:last-child { + border-bottom: none; +} +body ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: 'Ubuntu', sans-serif; + font-weight: bold; +} +body ul#resources li.resource div.heading h2 a { + color: #999999; +} +body ul#resources li.resource div.heading h2 a:hover { + color: black; +} +body ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +body ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource div.heading ul.options li:first-child, +body ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource div.heading ul.options li:last-child, +body ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource div.heading ul.options li { + color: #666666; + font-size: 0.9em; +} +body ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +body ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +body ul#resources li.resource:hover div.heading h2 a, +body ul#resources li.resource.active div.heading h2 a { + color: black; +} +body ul#resources li.resource:hover div.heading ul.options li a, +body ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #e6f3f6; + border: 1px solid #bfe1e8; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #0085a1; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right-color: #bfe1e8; + color: #0085a1; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0085a1; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #e9f5f7; + border: 1px solid #bfe1e8; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0085a1; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #66b6c7; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content .content-type div label { + clear: both; + display: block; + color: #0085a1; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #f4effa; + border: 1px solid #e3d8f3; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #9063cd; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right-color: #e3d8f3; + color: #9063cd; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #9063cd; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #f6f2fb; + border: 1px solid #e3d8f3; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #9063cd; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #bca1e1; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content .content-type div label { + clear: both; + display: block; + color: #9063cd; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #ede7ee; + border: 1px solid #d1c2d6; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #470a59; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right-color: #d1c2d6; + color: #470a59; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #470a59; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #efeaf1; + border: 1px solid #d1c2d6; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #470a59; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #916c9b; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content .content-type div label { + clear: both; + display: block; + color: #470a59; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #e6f9fb; + border: 1px solid #bff0f5; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #00c1d5; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right-color: #bff0f5; + color: #00c1d5; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #00c1d5; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #e9fafb; + border: 1px solid #bff0f5; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #00c1d5; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #66dae6; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content .content-type div label { + clear: both; + display: block; + color: #00c1d5; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #fff2ec; + border: 1px solid #ffdfd0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ff7f41; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right-color: #ffdfd0; + color: #ff7f41; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ff7f41; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fff4ef; + border: 1px solid #ffdfd0; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ff7f41; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #ffb28d; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content .content-type div label { + clear: both; + display: block; + color: #ff7f41; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #fbede7; + border: 1px solid #f4d1c3; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span { + margin: 0; + padding: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #d4470f; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path { + padding-left: 10px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a { + color: black; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a:hover { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:first-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.first { + padding-left: 0; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right-color: #f4d1c3; + color: #d4470f; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #d4470f; + text-decoration: none; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:hover, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:active, +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a.active { + text-decoration: underline; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #fbefeb; + border: 1px solid #f4d1c3; + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #d4470f; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content form input[type='text'].error { + outline: 2px solid #cc0000; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header img { + display: block; + clear: none; + float: right; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + padding: 4px 0 0 10px; + color: #e5916f; + display: inline-block; + font-size: 0.9em; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content .content-type div label { + clear: both; + display: block; + color: #d4470f; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.model-signature { + font-family: 'Ubuntu', sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.model-signature pre:hover { + background-color: #ffffdd; +} +.model-signature .snippet small { + font-size: 0.75em; +} +.model-signature .signature-container { + clear: both; +} +.model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.model-signature ul.signature-nav { + display: block; + margin: 0; + padding: 0; +} +.model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.model-signature .propName { + font-weight: bold; +} +.model-signature .propType { + color: #5555aa; +} +.model-signature .propOptKey { + font-style: italic; +} +.model-signature .propOpt { + color: #555; +} +pre code { + background: none; +} +.content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-ui-wrap { + max-width: 960px; + margin-left: auto; + margin-right: auto; +} +.icon-btn { + cursor: pointer; +} +#message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} +.message-success { + color: #89BF04; +} +.message-fail { + color: #cc0000; +} \ No newline at end of file diff --git a/public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff b/public/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff new file mode 100644 index 0000000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6IffLO3LdcAZYWl9Si6vvxL-qU.woff b/public/fonts/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff new file mode 100644 index 0000000000000000000000000000000000000000..31bdbab9fd3a0ee35e17a0a4ea90651c1fbb3d39 GIT binary patch literal 25388 zcmb@t1yCeQ69&k_;x3EJ;)}bxySux)`>?n>EV4N4!s71k?(XjHgAB)e|NABG;^N{i zZX&9>Go!jXt1|1$uey6Y6vV~BK7oDwOlZLn|2ozee#n1o{*wOpCoZlk2L|?u@k59I zSJCU>GFDJwVE)j_e#kl>#V{h{($~b!$nis0{88dQ%1!QZ<-UcH%ZCnv^P>&Q-vu2E z*231y{6i-R2KMa{42-X>>QRZVC>KShtHND$`76Ehy3-Ukij-X z(OcTNdVc7V!N9;VKl-qoYa+w9F>|&D1EVhk1EUEA12fR{C(K2)bujt3R-5(1j)uR= zA;}Vjoss8J$j%H5OcwzR4D!QfM8C`=Hfu)*mydfIWqw>2|8XB| zad6b}k8A#(o8brtrjK*5;RyZ6zm6lNHorYHO$^PIO^6FtxWvJg%r4bNd1i&Vh z#F|ylMT3MA2V<5;2>|=6Z$m@#?}j)~;!r4_5PM94Kw1Q>?{%Moz~jlmOr4mon1`6> zm|iVdO%cqw2VA3$V*|qjlLIpY69ZEMql6=RaLK2k-#6dix~|>@mS~ZxkRU@L1qp-{ z33}kr;FtvoeqeKBzrVk}-@hll$GsCh3taneZ@&9)zWTixo(9Pwv-4{{8V&@3pka|& zFA0)6i5+#eDCX+PK8dqKHL;6ReC-ad0K>+hEweqt&(vMxZS#Ev4;1bp$v56XOH`g= zu5rGBi3Fk63vzXJgJ z6d=@1oM*I+nxHhzRPA&P8-ZYVp0%E2F{aaIIb8E=RHH(_-u(R84UgS^qs44B_T0z) za(z%SIWfa4&)7(aT|^60WRN!07%KG6x$4x}8e9F$T6O}W+QkMZF+;nEh~IfYA5MZkEj6->p8#q zb6IZ~D#K8`_T^_fN9X3{+r*=vOuXpk$ZB8ZFpD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{JeD({7by_eop~J$x_ju|0HuK90SQf$qI{*>rB4uIjVJlSm8Av* zy~NJTx}{prb)G~gs#-Lbq2t1|;I|&NSo*m6^oi#M9`(O4y2(3@JT%b#QV868$Wrpk zIITbqUC;Y0)&P6cL3iJDzZ0ZwoBJD1iemh(9!2yZwnlAwpE#W?$*^6v6unuDyMo z2I4o%5ROGKjda$cNDQ}0dbKj&az>;~9l3vXAV82n6>!RR&vkSli>|ZzVoG>$UDyO_ zPSV~DyC%3M{ampWmD|{J8EU=Bpw`;MkHzBZEW(#&?|ZupuP<)Pcovk8TouH}*kCHn zd~!XS9xRztsuQo0{_k?N?YLbCfUKTK7>vlQT*VJ&eJ~nm!+W$vnC9dvdek5ASC?U& zQMPCca8jCun$^4x@k)Un-yVCly*MU|8r>LQHBH$JJzYv&8yLAaeuD`bmYkpr7I>U) z5hRe9tXKL;tPz=30Y+vf=OZ&SQ_JACnJLfYrZdy3DB-rrPY*=f9_T)k4>Pq*DUuqn zO{;{+O(z!!m1%Tnxn*>!zHiqTu3YIjePokPqR|-^{uVE=kgm^xt(JVhxwdSzs`}3d;(+fkYl%{zMXgv z=R5ndIluDx(uG*sP=)smqFtU(--zp=B;QcQ+exUTKD2&h6;hes{6G+SycxADxQJKA z3Fg;|X~q_}ftzv)8;{4IT^w@auUH(=snX0m#2YsjGpNx@Ti`J zowhYws{eM3sSKY0tR>JY?YMZsW9rLKZH&&{iy5jgjO(gVAIs&t+l@M2BeFrRQ+}=N EKR)7<6951J literal 0 HcmV?d00001 diff --git a/public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff b/public/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff new file mode 100644 index 0000000000000000000000000000000000000000..8951646f79983a6eaed8d34e5e3c69b20dad6662 GIT binary patch literal 23196 zcmce-1yo$i@;5q!0Kp-+LvVL@m*50<2=4B#!3pk=V8IE_;O_43?mjTUN6tOxzWe{y zTkn1At+(#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nM<$Hj{;KUy&XO#>JCgqmGv#NA-1B%700000NkvXXu0mjfr2aL@ literal 0 HcmV?d00001 diff --git a/public/images/pet_store_api.png b/public/images/pet_store_api.png deleted file mode 100644 index f9f9cd4aeb35a108c4b2f1dddb59977d56c595d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 824 zcmV-81IPS{P)n=Rd;8mVwQNY4k4xJQ%YT}s;WA7;r!W@XgqjG_4og} z8w>{OB9REiMa8-B85td+y}bji^~2KA`Md4j-u{zw=H%Da@83%_8qEnl9k1WK;pWX- zb-lg)pQYAreK@>)*5Clqni{IZVYGG+NY67Bp-^bn;L{Nbh44I6CIK+n7p8#U?;fCA zYMFcy%UEjup4fgnli%NyzSe*@419QuU9lJ|T$?f9w?HIQ$RwEJGK7^!y7LhxIgVJp z9c!kB{0aydM1epU1NJ=h(}2X?Y{qn70yEN$dwm~favs=VbQ+T?!AvSl{P~PE zS&zsJbTQttne>kdM4$jBhLMFy@I1)3u-4cAzrY*l!o9eK^w%+jqY!oi(Ri8sMauvK zwnCP#%3hEH#FtNqq{iT(?=_JA_8XC>5Y8Y@!wmxKb|A87ZbpHA`+%v~0pt{5Nko1L zLKR^25YExt1lH7L1{t{|P z@n)yHyZf~3>LZ@#&CNw1rA#OlY^|)UJQKUrlKKO&x%wPhH}6&e0000K^a6u zQ3;5MiU^7p6*M3qDk!2=YEcHMQ>nzEYP;R`e2C@r+U+?#XaC*&gKPcB#k$`o&;7mu zYNhYYXe|Uo84#4ZIko#rcU5K8*yFL{qT47O&^5fZH$ zVZ@%(l~vVHjnm;H@KL8@r%yUHoo;rbHI_4lIH(_nsTT>S2`DFOD~uCb9_dF4`#QgI zy7ldMcLs+A_s%|e1pRPrbX-tpeNP!9(IpMFTce`t_5U%lP99z%&i6`1d~ zWeM!Rxc50<+d$e^9LT`?B+aMK~apR zHm?q;p<7{wN2g|I^aGlSws;VP84j(z%aQwvAWv83Z$}p(% zZ^?2;gxg(ey_`V5J7{;!o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$^x92-m_ 
    - + \ No newline at end of file diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index 23b2f8e..ec05c09 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -4,8 +4,8 @@ /*global SwaggerUi, log, ApiKeyAuthorization, hljs, window, $ */ $(function() { $.getJSON('config.json', function(config) { - log(config); - loadSwaggerUi(config); + log(config); + loadSwaggerUi(config); }); var accessToken; diff --git a/public/lib/shred.bundle.js b/public/lib/shred.bundle.js deleted file mode 100644 index 74d0816..0000000 --- a/public/lib/shred.bundle.js +++ /dev/null @@ -1,2765 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - var y = cwd || '.'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -require.define("path", function (require, module, exports, __dirname, __filename) { - function filter (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - if (fn(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length; i >= 0; i--) { - var last = parts[i]; - if (last == '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Regex to split a filename into [*, dir, basename, ext] -// posix version -var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { -var resolvedPath = '', - resolvedAbsolute = false; - -for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) - ? arguments[i] - : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string' || !path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; -} - -// At this point the path should be resolved to a full absolute path, but -// handle relative paths to be safe (might happen when process.cwd() fails) - -// Normalize the path -resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { -var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.slice(-1) === '/'; - -// Normalize the path -path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - return p && typeof p === 'string'; - }).join('/')); -}; - - -exports.dirname = function(path) { - var dir = splitPathRe.exec(path)[1] || ''; - var isWindows = false; - if (!dir) { - // No dirname - return '.'; - } else if (dir.length === 1 || - (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { - // It is just a slash or a drive letter with a slash - return dir; - } else { - // It is a full dirname, strip trailing slash - return dir.substring(0, dir.length - 1); - } -}; - - -exports.basename = function(path, ext) { - var f = splitPathRe.exec(path)[2] || ''; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPathRe.exec(path)[3] || ''; -}; - -}); - -require.define("/shred.js", function (require, module, exports, __dirname, __filename) { - // Shred is an HTTP client library intended to simplify the use of Node's -// built-in HTTP library. In particular, we wanted to make it easier to interact -// with HTTP-based APIs. -// -// See the [examples](./examples.html) for more details. - -// Ax is a nice logging library we wrote. You can use any logger, providing it -// has `info`, `warn`, `debug`, and `error` methods that take a string. -var Ax = require("ax") - , CookieJarLib = require( "cookiejar" ) - , CookieJar = CookieJarLib.CookieJar -; - -// Shred takes some options, including a logger and request defaults. - -var Shred = function(options) { - options = (options||{}); - this.agent = options.agent; - this.defaults = options.defaults||{}; - this.log = options.logger||(new Ax({ level: "info" })); - this._sharedCookieJar = new CookieJar(); - this.logCurl = options.logCurl || false; -}; - -// Most of the real work is done in the request and reponse classes. - -Shred.Request = require("./shred/request"); -Shred.Response = require("./shred/response"); - -// The `request` method kicks off a new request, instantiating a new `Request` -// object and passing along whatever default options we were given. - -Shred.prototype = { - request: function(options) { - options.logger = this.log; - options.logCurl = options.logCurl || this.logCurl; - options.cookieJar = ( 'cookieJar' in options ) ? options.cookieJar : this._sharedCookieJar; // let them set cookieJar = null - options.agent = options.agent || this.agent; - // fill in default options - for (var key in this.defaults) { - if (this.defaults.hasOwnProperty(key) && !options[key]) { - options[key] = this.defaults[key] - } - } - return new Shred.Request(options); - } -}; - -// Define a bunch of convenience methods so that you don't have to include -// a `method` property in your request options. - -"get put post delete".split(" ").forEach(function(method) { - Shred.prototype[method] = function(options) { - options.method = method; - return this.request(options); - }; -}); - - -module.exports = Shred; - -}); - -require.define("/node_modules/ax/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"./lib/ax.js"} -}); - -require.define("/node_modules/ax/lib/ax.js", function (require, module, exports, __dirname, __filename) { - var inspect = require("util").inspect - , fs = require("fs") -; - - -// this is a quick-and-dirty logger. there are other nicer loggers out there -// but the ones i found were also somewhat involved. this one has a Ruby -// logger type interface -// -// we can easily replace this, provide the info, debug, etc. methods are the -// same. or, we can change Haiku to use a more standard node.js interface - -var format = function(level,message) { - var debug = (level=="debug"||level=="error"); - if (!message) { return message.toString(); } - if (typeof(message) == "object") { - if (message instanceof Error && debug) { - return message.stack; - } else { - return inspect(message); - } - } else { - return message.toString(); - } -}; - -var noOp = function(message) { return this; } -var makeLogger = function(level,fn) { - return function(message) { - this.stream.write(this.format(level, message)+"\n"); - return this; - } -}; - -var Logger = function(options) { - var logger = this; - var options = options||{}; - - // Default options - options.level = options.level || "info"; - options.timestamp = options.timestamp || true; - options.prefix = options.prefix || ""; - logger.options = options; - - // Allows a prefix to be added to the message. - // - // var logger = new Ax({ module: 'Haiku' }) - // logger.warn('this is going to be awesome!'); - // //=> Haiku: this is going to be awesome! - // - if (logger.options.module){ - logger.options.prefix = logger.options.module; - } - - // Write to stderr or a file - if (logger.options.file){ - logger.stream = fs.createWriteStream(logger.options.file, {"flags": "a"}); - } else { - if(process.title === "node") - logger.stream = process.stderr; - else if(process.title === "browser") - logger.stream = function () { - // Work around weird console context issue: http://code.google.com/p/chromium/issues/detail?id=48662 - return console[logger.options.level].apply(console, arguments); - }; - } - - switch(logger.options.level){ - case 'debug': - ['debug', 'info', 'warn'].forEach(function (level) { - logger[level] = Logger.writer(level); - }); - case 'info': - ['info', 'warn'].forEach(function (level) { - logger[level] = Logger.writer(level); - }); - case 'warn': - logger.warn = Logger.writer('warn'); - } -} - -// Used to define logger methods -Logger.writer = function(level){ - return function(message){ - var logger = this; - - if(process.title === "node") - logger.stream.write(logger.format(level, message) + '\n'); - else if(process.title === "browser") - logger.stream(logger.format(level, message) + '\n'); - - }; -} - - -Logger.prototype = { - info: function(){}, - debug: function(){}, - warn: function(){}, - error: Logger.writer('error'), - format: function(level, message){ - if (! message) return ''; - - var logger = this - , prefix = logger.options.prefix - , timestamp = logger.options.timestamp ? " " + (new Date().toISOString()) : "" - ; - - return (prefix + timestamp + ": " + message); - } -}; - -module.exports = Logger; - -}); - -require.define("util", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("fs", function (require, module, exports, __dirname, __filename) { - // nothing to see here... no file methods for the browser - -}); - -require.define("/node_modules/cookiejar/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"cookiejar.js"} -}); - -require.define("/node_modules/cookiejar/cookiejar.js", function (require, module, exports, __dirname, __filename) { - exports.CookieAccessInfo=CookieAccessInfo=function CookieAccessInfo(domain,path,secure,script) { - if(this instanceof CookieAccessInfo) { - this.domain=domain||undefined; - this.path=path||"/"; - this.secure=!!secure; - this.script=!!script; - return this; - } - else { - return new CookieAccessInfo(domain,path,secure,script) - } -} - -exports.Cookie=Cookie=function Cookie(cookiestr) { - if(cookiestr instanceof Cookie) { - return cookiestr; - } - else { - if(this instanceof Cookie) { - this.name = null; - this.value = null; - this.expiration_date = Infinity; - this.path = "/"; - this.domain = null; - this.secure = false; //how to define? - this.noscript = false; //httponly - if(cookiestr) { - this.parse(cookiestr) - } - return this; - } - return new Cookie(cookiestr) - } -} - -Cookie.prototype.toString = function toString() { - var str=[this.name+"="+this.value]; - if(this.expiration_date !== Infinity) { - str.push("expires="+(new Date(this.expiration_date)).toGMTString()); - } - if(this.domain) { - str.push("domain="+this.domain); - } - if(this.path) { - str.push("path="+this.path); - } - if(this.secure) { - str.push("secure"); - } - if(this.noscript) { - str.push("httponly"); - } - return str.join("; "); -} - -Cookie.prototype.toValueString = function toValueString() { - return this.name+"="+this.value; -} - -var cookie_str_splitter=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g -Cookie.prototype.parse = function parse(str) { - if(this instanceof Cookie) { - var parts=str.split(";") - , pair=parts[0].match(/([^=]+)=((?:.|\n)*)/) - , key=pair[1] - , value=pair[2]; - this.name = key; - this.value = value; - - for(var i=1;i ", request.method.toUpperCase(), - request.url].join(" ") - return [ summary, "- Headers:", headers].join("\n"); -}; - -Request.prototype.format_headers = function () { - var array = [] - var headers = this._headers - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - var value = headers[key] - array.push("\t" + key + ": " + value); - } - } - return array.join("\n"); -}; - -// Allow chainable 'on's: shred.get({ ... }).on( ... ). You can pass in a -// single function, a pair (event, function), or a hash: -// { event: function, event: function } -Request.prototype.on = function (eventOrHash, listener) { - var emitter = this.emitter; - // Pass in a single argument as a function then make it the default response handler - if (arguments.length === 1 && typeof(eventOrHash) === 'function') { - emitter.on('response', eventOrHash); - } else if (arguments.length === 1 && typeof(eventOrHash) === 'object') { - for (var key in eventOrHash) { - if (eventOrHash.hasOwnProperty(key)) { - emitter.on(key, eventOrHash[key]); - } - } - } else { - emitter.on(eventOrHash, listener); - } - return this; -}; - -// Add in the header methods. Again, these ensure we don't get the same header -// multiple times with different case conventions. -HeaderMixins.gettersAndSetters(Request); - -// `processOptions` is called from the constructor to handle all the work -// associated with making sure we do our best to ensure we have a valid request. - -var processOptions = function(request,options) { - - request.log.debug("Processing request options .."); - - // We'll use `request.emitter` to manage the `on` event handlers. - request.emitter = (new Emitter); - - request.agent = options.agent; - - // Set up the handlers ... - if (options.on) { - for (var key in options.on) { - if (options.on.hasOwnProperty(key)) { - request.emitter.on(key, options.on[key]); - } - } - } - - // Make sure we were give a URL or a host - if (!options.url && !options.host) { - request.emitter.emit("request_error", - new Error("No url or url options (host, port, etc.)")); - return; - } - - // Allow for the [use of a proxy](http://www.jmarshall.com/easy/http/#proxies). - - if (options.url) { - if (options.proxy) { - request.url = options.proxy; - request.path = options.url; - } else { - request.url = options.url; - } - } - - // Set the remaining options. - request.query = options.query||options.parameters||request.query ; - request.method = options.method; - request.setHeader("user-agent",options.agent||"Shred"); - request.setHeaders(options.headers); - - if (request.cookieJar) { - var cookies = request.cookieJar.getCookies( CookieAccessInfo( request.host, request.path ) ); - if (cookies.length) { - var cookieString = request.getHeader('cookie')||''; - for (var cookieIndex = 0; cookieIndex < cookies.length; ++cookieIndex) { - if ( cookieString.length && cookieString[ cookieString.length - 1 ] != ';' ) - { - cookieString += ';'; - } - cookieString += cookies[ cookieIndex ].name + '=' + cookies[ cookieIndex ].value + ';'; - } - request.setHeader("cookie", cookieString); - } - } - - // The content entity can be set either using the `body` or `content` attributes. - if (options.body||options.content) { - request.content = options.body||options.content; - } - request.timeout = options.timeout; - -}; - -// `createRequest` is also called by the constructor, after `processOptions`. -// This actually makes the request and processes the response, so `createRequest` -// is a bit of a misnomer. - -var createRequest = function(request) { - var timeout ; - - request.log.debug("Creating request .."); - request.log.debug(request); - - var reqParams = { - host: request.host, - port: request.port, - method: request.method, - path: request.path + (request.query ? '?'+request.query : ""), - headers: request.getHeaders(), - // Node's HTTP/S modules will ignore this, but we are using the - // browserify-http module in the browser for both HTTP and HTTPS, and this - // is how you differentiate the two. - scheme: request.scheme, - // Use a provided agent. 'Undefined' is the default, which uses a global - // agent. - agent: request.agent - }; - - if (request.logCurl) { - logCurl(request); - } - - var http = request.scheme == "http" ? HTTP : HTTPS; - - // Set up the real request using the selected library. The request won't be - // sent until we call `.end()`. - request._raw = http.request(reqParams, function(response) { - request.log.debug("Received response .."); - - // We haven't timed out and we have a response, so make sure we clear the - // timeout so it doesn't fire while we're processing the response. - clearTimeout(timeout); - - // Construct a Shred `Response` object from the response. This will stream - // the response, thus the need for the callback. We can access the response - // entity safely once we're in the callback. - response = new Response(response, request, function(response) { - - // Set up some event magic. The precedence is given first to - // status-specific handlers, then to responses for a given event, and then - // finally to the more general `response` handler. In the last case, we - // need to first make sure we're not dealing with a a redirect. - var emit = function(event) { - var emitter = request.emitter; - var textStatus = STATUS_CODES[response.status] ? STATUS_CODES[response.status].toLowerCase() : null; - if (emitter.listeners(response.status).length > 0 || emitter.listeners(textStatus).length > 0) { - emitter.emit(response.status, response); - emitter.emit(textStatus, response); - } else { - if (emitter.listeners(event).length>0) { - emitter.emit(event, response); - } else if (!response.isRedirect) { - emitter.emit("response", response); - //console.warn("Request has no event listener for status code " + response.status); - } - } - }; - - // Next, check for a redirect. We simply repeat the request with the URL - // given in the `Location` header. We fire a `redirect` event. - if (response.isRedirect) { - request.log.debug("Redirecting to " - + response.getHeader("Location")); - request.url = response.getHeader("Location"); - emit("redirect"); - createRequest(request); - - // Okay, it's not a redirect. Is it an error of some kind? - } else if (response.isError) { - emit("error"); - } else { - // It looks like we're good shape. Trigger the `success` event. - emit("success"); - } - }); - }); - - // We're still setting up the request. Next, we're going to handle error cases - // where we have no response. We don't emit an error event because that event - // takes a response. We don't response handlers to have to check for a null - // value. However, we [should introduce a different event - // type](https://github.com/spire-io/shred/issues/3) for this type of error. - request._raw.on("error", function(error) { - request.emitter.emit("request_error", error); - }); - - request._raw.on("socket", function(socket) { - request.emitter.emit("socket", socket); - }); - - // TCP timeouts should also trigger the "response_error" event. - request._raw.on('socket', function () { - request._raw.socket.on('timeout', function () { - // This should trigger the "error" event on the raw request, which will - // trigger the "response_error" on the shred request. - request._raw.abort(); - }); - }); - - - // We're almost there. Next, we need to write the request entity to the - // underlying request object. - if (request.content) { - request.log.debug("Streaming body: '" + - request.content.data.slice(0,59) + "' ... "); - request._raw.write(request.content.data); - } - - // Finally, we need to set up the timeout. We do this last so that we don't - // start the clock ticking until the last possible moment. - if (request.timeout) { - timeout = setTimeout(function() { - request.log.debug("Timeout fired, aborting request ..."); - request._raw.abort(); - request.emitter.emit("timeout", request); - },request.timeout); - } - - // The `.end()` method will cause the request to fire. Technically, it might - // have already sent the headers and body. - request.log.debug("Sending request ..."); - request._raw.end(); -}; - -// Logs the curl command for the request. -var logCurl = function (req) { - var headers = req.getHeaders(); - var headerString = ""; - - for (var key in headers) { - headerString += '-H "' + key + ": " + headers[key] + '" '; - } - - var bodyString = "" - - if (req.content) { - bodyString += "-d '" + req.content.body + "' "; - } - - var query = req.query ? '?' + req.query : ""; - - console.log("curl " + - "-X " + req.method.toUpperCase() + " " + - req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " + - headerString + - bodyString - ); -}; - - -module.exports = Request; - -}); - -require.define("http", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("https", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("/shred/parseUri.js", function (require, module, exports, __dirname, __filename) { - // parseUri 1.2.2 -// (c) Steven Levithan -// MIT License - -function parseUri (str) { - var o = parseUri.options, - m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), - uri = {}, - i = 14; - - while (i--) uri[o.key[i]] = m[i] || ""; - - uri[o.q.name] = {}; - uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { - if ($1) uri[o.q.name][$1] = $2; - }); - - return uri; -}; - -parseUri.options = { - strictMode: false, - key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], - q: { - name: "queryKey", - parser: /(?:^|&)([^&=]*)=?([^&]*)/g - }, - parser: { - strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, - loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ - } -}; - -module.exports = parseUri; - -}); - -require.define("events", function (require, module, exports, __dirname, __filename) { - if (!process.EventEmitter) process.EventEmitter = function () {}; - -var EventEmitter = exports.EventEmitter = process.EventEmitter; -var isArray = typeof Array.isArray === 'function' - ? Array.isArray - : function (xs) { - return Object.toString.call(xs) === '[object Array]' - } -; - -// By default EventEmitters will print a warning if more than -// 10 listeners are added to it. This is a useful default which -// helps finding memory leaks. -// -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -var defaultMaxListeners = 10; -EventEmitter.prototype.setMaxListeners = function(n) { - if (!this._events) this._events = {}; - this._events.maxListeners = n; -}; - - -EventEmitter.prototype.emit = function(type) { - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events || !this._events.error || - (isArray(this._events.error) && !this._events.error.length)) - { - if (arguments[1] instanceof Error) { - throw arguments[1]; // Unhandled 'error' event - } else { - throw new Error("Uncaught, unspecified 'error' event."); - } - return false; - } - } - - if (!this._events) return false; - var handler = this._events[type]; - if (!handler) return false; - - if (typeof handler == 'function') { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - var args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - return true; - - } else if (isArray(handler)) { - var args = Array.prototype.slice.call(arguments, 1); - - var listeners = handler.slice(); - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - return true; - - } else { - return false; - } -}; - -// EventEmitter is defined in src/node_events.cc -// EventEmitter.prototype.emit() is also defined there. -EventEmitter.prototype.addListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('addListener only takes instances of Function'); - } - - if (!this._events) this._events = {}; - - // To avoid recursion in the case that type == "newListeners"! Before - // adding it to the listeners, first emit "newListeners". - this.emit('newListener', type, listener); - - if (!this._events[type]) { - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - } else if (isArray(this._events[type])) { - - // Check for listener leak - if (!this._events[type].warned) { - var m; - if (this._events.maxListeners !== undefined) { - m = this._events.maxListeners; - } else { - m = defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - console.trace(); - } - } - - // If we've already got an array, just append. - this._events[type].push(listener); - } else { - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - var self = this; - self.on(type, function g() { - self.removeListener(type, g); - listener.apply(this, arguments); - }); - - return this; -}; - -EventEmitter.prototype.removeListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('removeListener only takes instances of Function'); - } - - // does not use listeners(), so no side effect of creating _events[type] - if (!this._events || !this._events[type]) return this; - - var list = this._events[type]; - - if (isArray(list)) { - var i = list.indexOf(listener); - if (i < 0) return this; - list.splice(i, 1); - if (list.length == 0) - delete this._events[type]; - } else if (this._events[type] === listener) { - delete this._events[type]; - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - // does not use listeners(), so no side effect of creating _events[type] - if (type && this._events && this._events[type]) this._events[type] = null; - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - if (!this._events) this._events = {}; - if (!this._events[type]) this._events[type] = []; - if (!isArray(this._events[type])) { - this._events[type] = [this._events[type]]; - } - return this._events[type]; -}; - -}); - -require.define("/node_modules/sprintf/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"./lib/sprintf"} -}); - -require.define("/node_modules/sprintf/lib/sprintf.js", function (require, module, exports, __dirname, __filename) { - /** -sprintf() for JavaScript 0.7-beta1 -http://www.diveintojavascript.com/projects/javascript-sprintf - -Copyright (c) Alexandru Marasteanu -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of sprintf() for JavaScript nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Changelog: -2010.11.07 - 0.7-beta1-node - - converted it to a node.js compatible module - -2010.09.06 - 0.7-beta1 - - features: vsprintf, support for named placeholders - - enhancements: format cache, reduced global namespace pollution - -2010.05.22 - 0.6: - - reverted to 0.4 and fixed the bug regarding the sign of the number 0 - Note: - Thanks to Raphael Pigulla (http://www.n3rd.org/) - who warned me about a bug in 0.5, I discovered that the last update was - a regress. I appologize for that. - -2010.05.09 - 0.5: - - bug fix: 0 is now preceeded with a + sign - - bug fix: the sign was not at the right position on padded results (Kamal Abdali) - - switched from GPL to BSD license - -2007.10.21 - 0.4: - - unit test and patch (David Baird) - -2007.09.17 - 0.3: - - bug fix: no longer throws exception on empty paramenters (Hans Pufal) - -2007.09.11 - 0.2: - - feature: added argument swapping - -2007.04.03 - 0.1: - - initial release -**/ - -var sprintf = (function() { - function get_type(variable) { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - function str_repeat(input, multiplier) { - for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */} - return output.join(''); - } - - var str_format = function() { - if (!str_format.cache.hasOwnProperty(arguments[0])) { - str_format.cache[arguments[0]] = str_format.parse(arguments[0]); - } - return str_format.format.call(null, str_format.cache[arguments[0]], arguments); - }; - - str_format.format = function(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output.push(parse_tree[i]); - } - else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw(sprintf('[sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } - else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]]; - } - else { // positional argument (implicit) - arg = argv[cursor++]; - } - - if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw(sprintf('[sprintf] expecting number but found %s', get_type(arg))); - } - switch (match[8]) { - case 'b': arg = arg.toString(2); break; - case 'c': arg = String.fromCharCode(arg); break; - case 'd': arg = parseInt(arg, 10); break; - case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; - case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; - case 'o': arg = arg.toString(8); break; - case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; - case 'u': arg = Math.abs(arg); break; - case 'x': arg = arg.toString(16); break; - case 'X': arg = arg.toString(16).toUpperCase(); break; - } - arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); - pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - String(arg).length; - pad = match[6] ? str_repeat(pad_character, pad_length) : ''; - output.push(match[5] ? arg + pad : pad + arg); - } - } - return output.join(''); - }; - - str_format.cache = {}; - - str_format.parse = function(fmt) { - var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; - while (_fmt) { - if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { - parse_tree.push(match[0]); - } - else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { - parse_tree.push('%'); - } - else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], replacement_field = match[2], field_match = []; - if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else { - throw('[sprintf] huh?'); - } - } - } - else { - throw('[sprintf] huh?'); - } - match[2] = field_list; - } - else { - arg_names |= 2; - } - if (arg_names === 3) { - throw('[sprintf] mixing positional and named placeholders is not (yet) supported'); - } - parse_tree.push(match); - } - else { - throw('[sprintf] huh?'); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - return str_format; -})(); - -var vsprintf = function(fmt, argv) { - argv.unshift(fmt); - return sprintf.apply(null, argv); -}; - -exports.sprintf = sprintf; -exports.vsprintf = vsprintf; -}); - -require.define("/shred/response.js", function (require, module, exports, __dirname, __filename) { - // The `Response object` encapsulates a Node.js HTTP response. - -var Content = require("./content") - , HeaderMixins = require("./mixins/headers") - , CookieJarLib = require( "cookiejar" ) - , Cookie = CookieJarLib.Cookie -; - -// Browser doesn't have zlib. -var zlib = null; -try { - zlib = require('zlib'); -} catch (e) { - console.warn("no zlib library"); -} - -// Iconv doesn't work in browser -var Iconv = null; -try { - Iconv = require('iconv-lite'); -} catch (e) { - console.warn("no iconv library"); -} - -// Construct a `Response` object. You should never have to do this directly. The -// `Request` object handles this, getting the raw response object and passing it -// in here, along with the request. The callback allows us to stream the response -// and then use the callback to let the request know when it's ready. -var Response = function(raw, request, callback) { - var response = this; - this._raw = raw; - - // The `._setHeaders` method is "private"; you can't otherwise set headers on - // the response. - this._setHeaders.call(this,raw.headers); - - // store any cookies - if (request.cookieJar && this.getHeader('set-cookie')) { - var cookieStrings = this.getHeader('set-cookie'); - var cookieObjs = [] - , cookie; - - for (var i = 0; i < cookieStrings.length; i++) { - var cookieString = cookieStrings[i]; - if (!cookieString) { - continue; - } - - if (!cookieString.match(/domain\=/i)) { - cookieString += '; domain=' + request.host; - } - - if (!cookieString.match(/path\=/i)) { - cookieString += '; path=' + request.path; - } - - try { - cookie = new Cookie(cookieString); - if (cookie) { - cookieObjs.push(cookie); - } - } catch (e) { - console.warn("Tried to set bad cookie: " + cookieString); - } - } - - request.cookieJar.setCookies(cookieObjs); - } - - this.request = request; - this.client = request.client; - this.log = this.request.log; - - // Stream the response content entity and fire the callback when we're done. - // Store the incoming data in a array of Buffers which we concatinate into one - // buffer at the end. We need to use buffers instead of strings here in order - // to preserve binary data. - var chunkBuffers = []; - var dataLength = 0; - raw.on("data", function(chunk) { - chunkBuffers.push(chunk); - dataLength += chunk.length; - }); - raw.on("end", function() { - var body; - if (typeof Buffer === 'undefined') { - // Just concatinate into a string - body = chunkBuffers.join(''); - } else { - // Initialize new buffer and add the chunks one-at-a-time. - body = new Buffer(dataLength); - for (var i = 0, pos = 0; i < chunkBuffers.length; i++) { - chunkBuffers[i].copy(body, pos); - pos += chunkBuffers[i].length; - } - } - - var setBodyAndFinish = function (body) { - response._body = new Content({ - body: body, - type: response.getHeader("Content-Type") - }); - callback(response); - } - - if (zlib && response.getHeader("Content-Encoding") === 'gzip'){ - zlib.gunzip(body, function (err, gunzippedBody) { - if (Iconv && response.request.encoding){ - body = Iconv.fromEncoding(gunzippedBody,response.request.encoding); - } else { - body = gunzippedBody.toString(); - } - setBodyAndFinish(body); - }) - } - else{ - if (response.request.encoding){ - body = Iconv.fromEncoding(body,response.request.encoding); - } - setBodyAndFinish(body); - } - }); -}; - -// The `Response` object can be pretty overwhelming to view using the built-in -// Node.js inspect method. We want to make it a bit more manageable. This -// probably goes [too far in the other -// direction](https://github.com/spire-io/shred/issues/2). - -Response.prototype = { - inspect: function() { - var response = this; - var headers = this.format_headers(); - var summary = [" ", response.status].join(" ") - return [ summary, "- Headers:", headers].join("\n"); - }, - format_headers: function () { - var array = [] - var headers = this._headers - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - var value = headers[key] - array.push("\t" + key + ": " + value); - } - } - return array.join("\n"); - } -}; - -// `Response` object properties, all of which are read-only: -Object.defineProperties(Response.prototype, { - -// - **status**. The HTTP status code for the response. - status: { - get: function() { return this._raw.statusCode; }, - enumerable: true - }, - -// - **content**. The HTTP content entity, if any. Provided as a [content -// object](./content.html), which will attempt to convert the entity based upon -// the `content-type` header. The converted value is available as -// `content.data`. The original raw content entity is available as -// `content.body`. - body: { - get: function() { return this._body; } - }, - content: { - get: function() { return this.body; }, - enumerable: true - }, - -// - **isRedirect**. Is the response a redirect? These are responses with 3xx -// status and a `Location` header. - isRedirect: { - get: function() { - return (this.status>299 - &&this.status<400 - &&this.getHeader("Location")); - }, - enumerable: true - }, - -// - **isError**. Is the response an error? These are responses with status of -// 400 or greater. - isError: { - get: function() { - return (this.status === 0 || this.status > 399) - }, - enumerable: true - } -}); - -// Add in the [getters for accessing the normalized headers](./headers.js). -HeaderMixins.getters(Response); -HeaderMixins.privateSetters(Response); - -// Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes -// getAllResponseHeaders() to return {} if the response is a CORS request. -// xhr.getHeader still works correctly. -var getHeader = Response.prototype.getHeader; -Response.prototype.getHeader = function (name) { - return (getHeader.call(this,name) || - (typeof this._raw.getHeader === 'function' && this._raw.getHeader(name))); -}; - -module.exports = Response; - -}); - -require.define("/shred/content.js", function (require, module, exports, __dirname, __filename) { - -// The purpose of the `Content` object is to abstract away the data conversions -// to and from raw content entities as strings. For example, you want to be able -// to pass in a Javascript object and have it be automatically converted into a -// JSON string if the `content-type` is set to a JSON-based media type. -// Conversely, you want to be able to transparently get back a Javascript object -// in the response if the `content-type` is a JSON-based media-type. - -// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). - -// The `Content` constructor takes an options object, which *must* have either a -// `body` or `data` property and *may* have a `type` property indicating the -// media type. If there is no `type` attribute, a default will be inferred. -var Content = function(options) { - this.body = options.body; - this.data = options.data; - this.type = options.type; -}; - -Content.prototype = { - // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. - // - // toString: function() { return this.body; } - // - // Commented out, but I've forgotten why. :/ -}; - - -// `Content` objects have the following attributes: -Object.defineProperties(Content.prototype,{ - -// - **type**. Typically accessed as `content.type`, reflects the `content-type` -// header associated with the request or response. If not passed as an options -// to the constructor or set explicitly, it will infer the type the `data` -// attribute, if possible, and, failing that, will default to `text/plain`. - type: { - get: function() { - if (this._type) { - return this._type; - } else { - if (this._data) { - switch(typeof this._data) { - case "string": return "text/plain"; - case "object": return "application/json"; - } - } - } - return "text/plain"; - }, - set: function(value) { - this._type = value; - return this; - }, - enumerable: true - }, - -// - **data**. Typically accessed as `content.data`, reflects the content entity -// converted into Javascript data. This can be a string, if the `type` is, say, -// `text/plain`, but can also be a Javascript object. The conversion applied is -// based on the `processor` attribute. The `data` attribute can also be set -// directly, in which case the conversion will be done the other way, to infer -// the `body` attribute. - data: { - get: function() { - if (this._body) { - return this.processor.parser(this._body); - } else { - return this._data; - } - }, - set: function(data) { - if (this._body&&data) Errors.setDataWithBody(this); - this._data = data; - return this; - }, - enumerable: true - }, - -// - **body**. Typically accessed as `content.body`, reflects the content entity -// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the -// `data` attribute, the `body` attribute will be inferred and vice-versa. If -// you attempt to set both, an exception is raised. - body: { - get: function() { - if (this._data) { - return this.processor.stringify(this._data); - } else { - return this.processor.stringify(this._body); - } - }, - set: function(body) { - if (this._data&&body) Errors.setBodyWithData(this); - this._body = body; - return this; - }, - enumerable: true - }, - -// - **processor**. The functions that will be used to convert to/from `data` and -// `body` attributes. You can add processors. The two that are built-in are for -// `text/plain`, which is basically an identity transformation and -// `application/json` and other JSON-based media types (including custom media -// types with `+json`). You can add your own processors. See below. - processor: { - get: function() { - var processor = Content.processors[this.type]; - if (processor) { - return processor; - } else { - // Return the first processor that matches any part of the - // content type. ex: application/vnd.foobar.baz+json will match json. - var main = this.type.split(";")[0]; - var parts = main.split(/\+|\//); - for (var i=0, l=parts.length; i < l; i++) { - processor = Content.processors[parts[i]] - } - return processor || {parser:identity,stringify:toString}; - } - }, - enumerable: true - }, - -// - **length**. Typically accessed as `content.length`, returns the length in -// bytes of the raw content entity. - length: { - get: function() { - if (typeof Buffer !== 'undefined') { - return Buffer.byteLength(this.body); - } - return this.body.length; - } - } -}); - -Content.processors = {}; - -// The `registerProcessor` function allows you to add your own processors to -// convert content entities. Each processor consists of a Javascript object with -// two properties: -// - **parser**. The function used to parse a raw content entity and convert it -// into a Javascript data type. -// - **stringify**. The function used to convert a Javascript data type into a -// raw content entity. -Content.registerProcessor = function(types,processor) { - -// You can pass an array of types that will trigger this processor, or just one. -// We determine the array via duck-typing here. - if (types.forEach) { - types.forEach(function(type) { - Content.processors[type] = processor; - }); - } else { - // If you didn't pass an array, we just use what you pass in. - Content.processors[types] = processor; - } -}; - -// Register the identity processor, which is used for text-based media types. -var identity = function(x) { return x; } - , toString = function(x) { return x.toString(); } -Content.registerProcessor( - ["text/html","text/plain","text"], - { parser: identity, stringify: toString }); - -// Register the JSON processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/json; charset=utf-8","application/json","json"], - { - parser: function(string) { - return JSON.parse(string); - }, - stringify: function(data) { - return JSON.stringify(data); }}); - -// Error functions are defined separately here in an attempt to make the code -// easier to read. -var Errors = { - setDataWithBody: function(object) { - throw new Error("Attempt to set data attribute of a content object " + - "when the body attributes was already set."); - }, - setBodyWithData: function(object) { - throw new Error("Attempt to set body attribute of a content object " + - "when the data attributes was already set."); - } -} -module.exports = Content; - -}); - -require.define("/shred/mixins/headers.js", function (require, module, exports, __dirname, __filename) { - // The header mixins allow you to add HTTP header support to any object. This -// might seem pointless: why not simply use a hash? The main reason is that, per -// the [HTTP spec](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), -// headers are case-insensitive. So, for example, `content-type` is the same as -// `CONTENT-TYPE` which is the same as `Content-Type`. Since there is no way to -// overload the index operator in Javascript, using a hash to represent the -// headers means it's possible to have two conflicting values for a single -// header. -// -// The solution to this is to provide explicit methods to set or get headers. -// This also has the benefit of allowing us to introduce additional variations, -// including snake case, which we automatically convert to what Matthew King has -// dubbed "corset case" - the hyphen-separated names with initial caps: -// `Content-Type`. We use corset-case just in case we're dealing with servers -// that haven't properly implemented the spec. - -// Convert headers to corset-case. **Example:** `CONTENT-TYPE` will be converted -// to `Content-Type`. - -var corsetCase = function(string) { - return string.toLowerCase() - //.replace("_","-") - .replace(/(^|-)(\w)/g, - function(s) { return s.toUpperCase(); }); -}; - -// We suspect that `initializeHeaders` was once more complicated ... -var initializeHeaders = function(object) { - return {}; -}; - -// Access the `_headers` property using lazy initialization. **Warning:** If you -// mix this into an object that is using the `_headers` property already, you're -// going to have trouble. -var $H = function(object) { - return object._headers||(object._headers=initializeHeaders(object)); -}; - -// Hide the implementations as private functions, separate from how we expose them. - -// The "real" `getHeader` function: get the header after normalizing the name. -var getHeader = function(object,name) { - return $H(object)[corsetCase(name)]; -}; - -// The "real" `getHeader` function: get one or more headers, or all of them -// if you don't ask for any specifics. -var getHeaders = function(object,names) { - var keys = (names && names.length>0) ? names : Object.keys($H(object)); - var hash = keys.reduce(function(hash,key) { - hash[key] = getHeader(object,key); - return hash; - },{}); - // Freeze the resulting hash so you don't mistakenly think you're modifying - // the real headers. - Object.freeze(hash); - return hash; -}; - -// The "real" `setHeader` function: set a header, after normalizing the name. -var setHeader = function(object,name,value) { - $H(object)[corsetCase(name)] = value; - return object; -}; - -// The "real" `setHeaders` function: set multiple headers based on a hash. -var setHeaders = function(object,hash) { - for( var key in hash ) { setHeader(object,key,hash[key]); }; - return this; -}; - -// Here's where we actually bind the functionality to an object. These mixins work by -// exposing mixin functions. Each function mixes in a specific batch of features. -module.exports = { - - // Add getters. - getters: function(constructor) { - constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; - constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; - }, - // Add setters but as "private" methods. - privateSetters: function(constructor) { - constructor.prototype._setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype._setHeaders = function(hash) { return setHeaders(this,hash); }; - }, - // Add setters. - setters: function(constructor) { - constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; - }, - // Add both getters and setters. - gettersAndSetters: function(constructor) { - constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; - constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; - constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; - }, -}; - -}); - -require.define("/node_modules/iconv-lite/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {} -}); - -require.define("/node_modules/iconv-lite/index.js", function (require, module, exports, __dirname, __filename) { - // Module exports -var iconv = module.exports = { - toEncoding: function(str, encoding) { - return iconv.getCodec(encoding).toEncoding(str); - }, - fromEncoding: function(buf, encoding) { - return iconv.getCodec(encoding).fromEncoding(buf); - }, - - defaultCharUnicode: '�', - defaultCharSingleByte: '?', - - // Get correct codec for given encoding. - getCodec: function(encoding) { - var enc = encoding || "utf8"; - var codecOptions = undefined; - while (1) { - if (getType(enc) === "String") - enc = enc.replace(/[- ]/g, "").toLowerCase(); - var codec = iconv.encodings[enc]; - var type = getType(codec); - if (type === "String") { - // Link to other encoding. - codecOptions = {originalEncoding: enc}; - enc = codec; - } - else if (type === "Object" && codec.type != undefined) { - // Options for other encoding. - codecOptions = codec; - enc = codec.type; - } - else if (type === "Function") - // Codec itself. - return codec(codecOptions); - else - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - }, - - // Define basic encodings - encodings: { - internal: function(options) { - return { - toEncoding: function(str) { - return new Buffer(ensureString(str), options.originalEncoding); - }, - fromEncoding: function(buf) { - return ensureBuffer(buf).toString(options.originalEncoding); - } - }; - }, - utf8: "internal", - ucs2: "internal", - binary: "internal", - ascii: "internal", - base64: "internal", - - // Codepage single-byte encodings. - singlebyte: function(options) { - // Prepare chars if needed - if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256)) - throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (options.chars.length === 128) - options.chars = asciiString + options.chars; - - if (!options.charsBuf) { - options.charsBuf = new Buffer(options.chars, 'ucs2'); - } - - if (!options.revCharsBuf) { - options.revCharsBuf = new Buffer(65536); - var defChar = iconv.defaultCharSingleByte.charCodeAt(0); - for (var i = 0; i < options.revCharsBuf.length; i++) - options.revCharsBuf[i] = defChar; - for (var i = 0; i < options.chars.length; i++) - options.revCharsBuf[options.chars.charCodeAt(i)] = i; - } - - return { - toEncoding: function(str) { - str = ensureString(str); - - var buf = new Buffer(str.length); - var revCharsBuf = options.revCharsBuf; - for (var i = 0; i < str.length; i++) - buf[i] = revCharsBuf[str.charCodeAt(i)]; - - return buf; - }, - fromEncoding: function(buf) { - buf = ensureBuffer(buf); - - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var charsBuf = options.charsBuf; - var newBuf = new Buffer(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0, _len = buf.length; i < _len; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = charsBuf[idx1]; - newBuf[idx2+1] = charsBuf[idx1+1]; - } - return newBuf.toString('ucs2'); - } - }; - }, - - // Codepage double-byte encodings. - table: function(options) { - var table = options.table, key, revCharsTable = options.revCharsTable; - if (!table) { - throw new Error("Encoding '" + options.type +"' has incorect 'table' option"); - } - if(!revCharsTable) { - revCharsTable = options.revCharsTable = {}; - for (key in table) { - revCharsTable[table[key]] = parseInt(key); - } - } - - return { - toEncoding: function(str) { - str = ensureString(str); - var strLen = str.length; - var bufLen = strLen; - for (var i = 0; i < strLen; i++) - if (str.charCodeAt(i) >> 7) - bufLen++; - - var newBuf = new Buffer(bufLen), gbkcode, unicode, - defaultChar = revCharsTable[iconv.defaultCharUnicode.charCodeAt(0)]; - - for (var i = 0, j = 0; i < strLen; i++) { - unicode = str.charCodeAt(i); - if (unicode >> 7) { - gbkcode = revCharsTable[unicode] || defaultChar; - newBuf[j++] = gbkcode >> 8; //high byte; - newBuf[j++] = gbkcode & 0xFF; //low byte - } else {//ascii - newBuf[j++] = unicode; - } - } - return newBuf; - }, - fromEncoding: function(buf) { - buf = ensureBuffer(buf); - var bufLen = buf.length, strLen = 0; - for (var i = 0; i < bufLen; i++) { - strLen++; - if (buf[i] & 0x80) //the high bit is 1, so this byte is gbkcode's high byte.skip next byte - i++; - } - var newBuf = new Buffer(strLen*2), unicode, gbkcode, - defaultChar = iconv.defaultCharUnicode.charCodeAt(0); - - for (var i = 0, j = 0; i < bufLen; i++, j+=2) { - gbkcode = buf[i]; - if (gbkcode & 0x80) { - gbkcode = (gbkcode << 8) + buf[++i]; - unicode = table[gbkcode] || defaultChar; - } else { - unicode = gbkcode; - } - newBuf[j] = unicode & 0xFF; //low byte - newBuf[j+1] = unicode >> 8; //high byte - } - return newBuf.toString('ucs2'); - } - } - } - } -}; - -// Add aliases to convert functions -iconv.encode = iconv.toEncoding; -iconv.decode = iconv.fromEncoding; - -// Load other encodings from files in /encodings dir. -var encodingsDir = __dirname+"/encodings/", - fs = require('fs'); -fs.readdirSync(encodingsDir).forEach(function(file) { - if(fs.statSync(encodingsDir + file).isDirectory()) return; - var encodings = require(encodingsDir + file) - for (var key in encodings) - iconv.encodings[key] = encodings[key] -}); - -// Utilities -var asciiString = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ - ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f'; - -var ensureBuffer = function(buf) { - buf = buf || new Buffer(0); - return (buf instanceof Buffer) ? buf : new Buffer(buf.toString(), "utf8"); -} - -var ensureString = function(str) { - str = str || ""; - return (str instanceof String) ? str : str.toString((str instanceof Buffer) ? 'utf8' : undefined); -} - -var getType = function(obj) { - return Object.prototype.toString.call(obj).slice(8, -1); -} - - -}); - -require.define("/node_modules/http-browserify/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"index.js","browserify":"browser.js"} -}); - -require.define("/node_modules/http-browserify/browser.js", function (require, module, exports, __dirname, __filename) { - var http = module.exports; -var EventEmitter = require('events').EventEmitter; -var Request = require('./lib/request'); - -http.request = function (params, cb) { - if (!params) params = {}; - if (!params.host) params.host = window.location.host.split(':')[0]; - if (!params.port) params.port = window.location.port; - - var req = new Request(new xhrHttp, params); - if (cb) req.on('response', cb); - return req; -}; - -http.get = function (params, cb) { - params.method = 'GET'; - var req = http.request(params, cb); - req.end(); - return req; -}; - -var xhrHttp = (function () { - if (typeof window === 'undefined') { - throw new Error('no window object present'); - } - else if (window.XMLHttpRequest) { - return window.XMLHttpRequest; - } - else if (window.ActiveXObject) { - var axs = [ - 'Msxml2.XMLHTTP.6.0', - 'Msxml2.XMLHTTP.3.0', - 'Microsoft.XMLHTTP' - ]; - for (var i = 0; i < axs.length; i++) { - try { - var ax = new(window.ActiveXObject)(axs[i]); - return function () { - if (ax) { - var ax_ = ax; - ax = null; - return ax_; - } - else { - return new(window.ActiveXObject)(axs[i]); - } - }; - } - catch (e) {} - } - throw new Error('ajax not supported in this browser') - } - else { - throw new Error('ajax not supported in this browser'); - } -})(); - -http.STATUS_CODES = { - 100 : 'Continue', - 101 : 'Switching Protocols', - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 - 200 : 'OK', - 201 : 'Created', - 202 : 'Accepted', - 203 : 'Non-Authoritative Information', - 204 : 'No Content', - 205 : 'Reset Content', - 206 : 'Partial Content', - 207 : 'Multi-Status', // RFC 4918 - 300 : 'Multiple Choices', - 301 : 'Moved Permanently', - 302 : 'Moved Temporarily', - 303 : 'See Other', - 304 : 'Not Modified', - 305 : 'Use Proxy', - 307 : 'Temporary Redirect', - 400 : 'Bad Request', - 401 : 'Unauthorized', - 402 : 'Payment Required', - 403 : 'Forbidden', - 404 : 'Not Found', - 405 : 'Method Not Allowed', - 406 : 'Not Acceptable', - 407 : 'Proxy Authentication Required', - 408 : 'Request Time-out', - 409 : 'Conflict', - 410 : 'Gone', - 411 : 'Length Required', - 412 : 'Precondition Failed', - 413 : 'Request Entity Too Large', - 414 : 'Request-URI Too Large', - 415 : 'Unsupported Media Type', - 416 : 'Requested Range Not Satisfiable', - 417 : 'Expectation Failed', - 418 : 'I\'m a teapot', // RFC 2324 - 422 : 'Unprocessable Entity', // RFC 4918 - 423 : 'Locked', // RFC 4918 - 424 : 'Failed Dependency', // RFC 4918 - 425 : 'Unordered Collection', // RFC 4918 - 426 : 'Upgrade Required', // RFC 2817 - 500 : 'Internal Server Error', - 501 : 'Not Implemented', - 502 : 'Bad Gateway', - 503 : 'Service Unavailable', - 504 : 'Gateway Time-out', - 505 : 'HTTP Version not supported', - 506 : 'Variant Also Negotiates', // RFC 2295 - 507 : 'Insufficient Storage', // RFC 4918 - 509 : 'Bandwidth Limit Exceeded', - 510 : 'Not Extended' // RFC 2774 -}; - -}); - -require.define("/node_modules/http-browserify/lib/request.js", function (require, module, exports, __dirname, __filename) { - var EventEmitter = require('events').EventEmitter; -var Response = require('./response'); -var isSafeHeader = require('./isSafeHeader'); - -var Request = module.exports = function (xhr, params) { - var self = this; - self.xhr = xhr; - self.body = ''; - - var uri = params.host + ':' + params.port + (params.path || '/'); - - xhr.open( - params.method || 'GET', - (params.scheme || 'http') + '://' + uri, - true - ); - - if (params.headers) { - Object.keys(params.headers).forEach(function (key) { - if (!isSafeHeader(key)) return; - var value = params.headers[key]; - if (Array.isArray(value)) { - value.forEach(function (v) { - xhr.setRequestHeader(key, v); - }); - } - else xhr.setRequestHeader(key, value) - }); - } - - var res = new Response(xhr); - res.on('ready', function () { - self.emit('response', res); - }); - - xhr.onreadystatechange = function () { - res.handle(xhr); - }; -}; - -Request.prototype = new EventEmitter; - -Request.prototype.setHeader = function (key, value) { - if ((Array.isArray && Array.isArray(value)) - || value instanceof Array) { - for (var i = 0; i < value.length; i++) { - this.xhr.setRequestHeader(key, value[i]); - } - } - else { - this.xhr.setRequestHeader(key, value); - } -}; - -Request.prototype.write = function (s) { - this.body += s; -}; - -Request.prototype.end = function (s) { - if (s !== undefined) this.write(s); - this.xhr.send(this.body); -}; - -}); - -require.define("/node_modules/http-browserify/lib/response.js", function (require, module, exports, __dirname, __filename) { - var EventEmitter = require('events').EventEmitter; -var isSafeHeader = require('./isSafeHeader'); - -var Response = module.exports = function (xhr) { - this.xhr = xhr; - this.offset = 0; -}; - -Response.prototype = new EventEmitter; - -var capable = { - streaming : true, - status2 : true -}; - -function parseHeaders (xhr) { - var lines = xhr.getAllResponseHeaders().split(/\r?\n/); - var headers = {}; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (line === '') continue; - - var m = line.match(/^([^:]+):\s*(.*)/); - if (m) { - var key = m[1].toLowerCase(), value = m[2]; - - if (headers[key] !== undefined) { - if ((Array.isArray && Array.isArray(headers[key])) - || headers[key] instanceof Array) { - headers[key].push(value); - } - else { - headers[key] = [ headers[key], value ]; - } - } - else { - headers[key] = value; - } - } - else { - headers[line] = true; - } - } - return headers; -} - -Response.prototype.getHeader = function (key) { - var header = this.headers ? this.headers[key.toLowerCase()] : null; - if (header) return header; - - // Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes - // getAllResponseHeaders() to return {} if the response is a CORS request. - // xhr.getHeader still works correctly. - if (isSafeHeader(key)) { - return this.xhr.getResponseHeader(key); - } - return null; -}; - -Response.prototype.handle = function () { - var xhr = this.xhr; - if (xhr.readyState === 2 && capable.status2) { - try { - this.statusCode = xhr.status; - this.headers = parseHeaders(xhr); - } - catch (err) { - capable.status2 = false; - } - - if (capable.status2) { - this.emit('ready'); - } - } - else if (capable.streaming && xhr.readyState === 3) { - try { - if (!this.statusCode) { - this.statusCode = xhr.status; - this.headers = parseHeaders(xhr); - this.emit('ready'); - } - } - catch (err) {} - - try { - this.write(); - } - catch (err) { - capable.streaming = false; - } - } - else if (xhr.readyState === 4) { - if (!this.statusCode) { - this.statusCode = xhr.status; - this.emit('ready'); - } - this.write(); - - if (xhr.error) { - this.emit('error', xhr.responseText); - } - else this.emit('end'); - } -}; - -Response.prototype.write = function () { - var xhr = this.xhr; - if (xhr.responseText.length > this.offset) { - this.emit('data', xhr.responseText.slice(this.offset)); - this.offset = xhr.responseText.length; - } -}; - -}); - -require.define("/node_modules/http-browserify/lib/isSafeHeader.js", function (require, module, exports, __dirname, __filename) { - // Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html -var unsafeHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "cookie", - "cookie2", - "content-transfer-encoding", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "set-cookie", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -module.exports = function (headerName) { - if (!headerName) return false; - return (unsafeHeaders.indexOf(headerName.toLowerCase()) === -1) -}; - -}); - -require.alias("http-browserify", "/node_modules/http"); - -require.alias("http-browserify", "/node_modules/https"); \ No newline at end of file diff --git a/public/lib/shred/content.js b/public/lib/shred/content.js deleted file mode 100644 index b8051fe..0000000 --- a/public/lib/shred/content.js +++ /dev/null @@ -1,193 +0,0 @@ - -// The purpose of the `Content` object is to abstract away the data conversions -// to and from raw content entities as strings. For example, you want to be able -// to pass in a Javascript object and have it be automatically converted into a -// JSON string if the `content-type` is set to a JSON-based media type. -// Conversely, you want to be able to transparently get back a Javascript object -// in the response if the `content-type` is a JSON-based media-type. - -// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). - -// The `Content` constructor takes an options object, which *must* have either a -// `body` or `data` property and *may* have a `type` property indicating the -// media type. If there is no `type` attribute, a default will be inferred. -var Content = function(options) { - this.body = options.body; - this.data = options.data; - this.type = options.type; -}; - -Content.prototype = { - // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. - // - // toString: function() { return this.body; } - // - // Commented out, but I've forgotten why. :/ -}; - - -// `Content` objects have the following attributes: -Object.defineProperties(Content.prototype,{ - -// - **type**. Typically accessed as `content.type`, reflects the `content-type` -// header associated with the request or response. If not passed as an options -// to the constructor or set explicitly, it will infer the type the `data` -// attribute, if possible, and, failing that, will default to `text/plain`. - type: { - get: function() { - if (this._type) { - return this._type; - } else { - if (this._data) { - switch(typeof this._data) { - case "string": return "text/plain"; - case "object": return "application/json"; - } - } - } - return "text/plain"; - }, - set: function(value) { - this._type = value; - return this; - }, - enumerable: true - }, - -// - **data**. Typically accessed as `content.data`, reflects the content entity -// converted into Javascript data. This can be a string, if the `type` is, say, -// `text/plain`, but can also be a Javascript object. The conversion applied is -// based on the `processor` attribute. The `data` attribute can also be set -// directly, in which case the conversion will be done the other way, to infer -// the `body` attribute. - data: { - get: function() { - if (this._body) { - return this.processor.parser(this._body); - } else { - return this._data; - } - }, - set: function(data) { - if (this._body&&data) Errors.setDataWithBody(this); - this._data = data; - return this; - }, - enumerable: true - }, - -// - **body**. Typically accessed as `content.body`, reflects the content entity -// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the -// `data` attribute, the `body` attribute will be inferred and vice-versa. If -// you attempt to set both, an exception is raised. - body: { - get: function() { - if (this._data) { - return this.processor.stringify(this._data); - } else { - return this._body.toString(); - } - }, - set: function(body) { - if (this._data&&body) Errors.setBodyWithData(this); - this._body = body; - return this; - }, - enumerable: true - }, - -// - **processor**. The functions that will be used to convert to/from `data` and -// `body` attributes. You can add processors. The two that are built-in are for -// `text/plain`, which is basically an identity transformation and -// `application/json` and other JSON-based media types (including custom media -// types with `+json`). You can add your own processors. See below. - processor: { - get: function() { - var processor = Content.processors[this.type]; - if (processor) { - return processor; - } else { - // Return the first processor that matches any part of the - // content type. ex: application/vnd.foobar.baz+json will match json. - var main = this.type.split(";")[0]; - var parts = main.split(/\+|\//); - for (var i=0, l=parts.length; i < l; i++) { - processor = Content.processors[parts[i]] - } - return processor || {parser:identity,stringify:toString}; - } - }, - enumerable: true - }, - -// - **length**. Typically accessed as `content.length`, returns the length in -// bytes of the raw content entity. - length: { - get: function() { - if (typeof Buffer !== 'undefined') { - return Buffer.byteLength(this.body); - } - return this.body.length; - } - } -}); - -Content.processors = {}; - -// The `registerProcessor` function allows you to add your own processors to -// convert content entities. Each processor consists of a Javascript object with -// two properties: -// - **parser**. The function used to parse a raw content entity and convert it -// into a Javascript data type. -// - **stringify**. The function used to convert a Javascript data type into a -// raw content entity. -Content.registerProcessor = function(types,processor) { - -// You can pass an array of types that will trigger this processor, or just one. -// We determine the array via duck-typing here. - if (types.forEach) { - types.forEach(function(type) { - Content.processors[type] = processor; - }); - } else { - // If you didn't pass an array, we just use what you pass in. - Content.processors[types] = processor; - } -}; - -// Register the identity processor, which is used for text-based media types. -var identity = function(x) { return x; } - , toString = function(x) { return x.toString(); } -Content.registerProcessor( - ["text/html","text/plain","text"], - { parser: identity, stringify: toString }); - -// Register the JSON processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/json; charset=utf-8","application/json","json"], - { - parser: function(string) { - return JSON.parse(string); - }, - stringify: function(data) { - return JSON.stringify(data); }}); - -var qs = require('querystring'); -// Register the post processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/x-www-form-urlencoded"], - { parser : qs.parse, stringify : qs.stringify }); - -// Error functions are defined separately here in an attempt to make the code -// easier to read. -var Errors = { - setDataWithBody: function(object) { - throw new Error("Attempt to set data attribute of a content object " + - "when the body attributes was already set."); - }, - setBodyWithData: function(object) { - throw new Error("Attempt to set body attribute of a content object " + - "when the data attributes was already set."); - } -} -module.exports = Content; \ No newline at end of file diff --git a/public/lib/swagger-oauth.js b/public/lib/swagger-oauth.js deleted file mode 100644 index 19777eb..0000000 --- a/public/lib/swagger-oauth.js +++ /dev/null @@ -1,218 +0,0 @@ -var appName; -var popupMask; -var popupDialog; -var clientId; -var realm; - -function handleLogin() { - var scopes = []; - - if(window.swaggerUi.api.authSchemes - && window.swaggerUi.api.authSchemes.oauth2 - && window.swaggerUi.api.authSchemes.oauth2.scopes) { - scopes = window.swaggerUi.api.authSchemes.oauth2.scopes; - } - - if(window.swaggerUi.api - && window.swaggerUi.api.info) { - appName = window.swaggerUi.api.info.title; - } - - if(popupDialog.length > 0) - popupDialog = popupDialog.last(); - else { - popupDialog = $( - [ - '
    ', - '
    Select OAuth2.0 Scopes
    ', - '
    ', - '

    Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.', - 'Learn how to use', - '

    ', - '

    ' + appName + ' API requires the following scopes. Select which ones you want to grant to Swagger UI.

    ', - '
      ', - '
    ', - '

    ', - '
    ', - '
    ', - '
    '].join('')); - $(document.body).append(popupDialog); - - popup = popupDialog.find('ul.api-popup-scopes').empty(); - for (i = 0; i < scopes.length; i ++) { - scope = scopes[i]; - str = '
  • ' + '
  • '; - popup.append(str); - } - - - var $win = $(window), - dw = $win.width(), - dh = $win.height(), - st = $win.scrollTop(), - dlgWd = popupDialog.outerWidth(), - dlgHt = popupDialog.outerHeight(), - top = (dh -dlgHt)/2 + st, - left = (dw - dlgWd)/2; - - popupDialog.css({ - top: (top < 0? 0 : top) + 'px', - left: (left < 0? 0 : left) + 'px' - }); - - popupDialog.find('button.api-popup-cancel').click(function() { - popupMask.hide(); - popupDialog.hide(); - }); - popupDialog.find('button.api-popup-authbtn').click(function() { - popupMask.hide(); - popupDialog.hide(); - - var authSchemes = window.swaggerUi.api.authSchemes; - var location = window.location; - var locationUrl = location.protocol + '//' + location.host + location.pathname; - var redirectUrl = locationUrl.replace("index.html","").concat("/o2c.html").replace("//o2c.html","/o2c.html"); - var url = null; - - var p = window.swaggerUi.api.authSchemes; - for (var key in p) { - if (p.hasOwnProperty(key)) { - var o = p[key].grantTypes; - for(var t in o) { - if(o.hasOwnProperty(t) && t === 'implicit') { - var dets = o[t]; - url = dets.loginEndpoint.url + "?response_type=token"; - window.swaggerUi.tokenName = dets.tokenName; - } - } - } - } - var scopes = []; - var scopeForUrl=''; - var o = $('.api-popup-scopes').find('input:checked'); - - for(var k =0; k < o.length; k++) { - scopes.push($(o[k]).attr("scope")); - if(k > 0){ - scopeForUrl+=' '; - } - scopeForUrl+=$(o[k]).attr("scope"); - } - - window.enabledScopes=scopes; - - - url += '&redirect_uri=' + encodeURIComponent(redirectUrl); - url += '&realm=' + encodeURIComponent(realm); - url += '&client_id=' + encodeURIComponent(clientId); - url += '&scope=' + encodeURIComponent(scopeForUrl); - - window.open(url); - }); - } - popupMask.show(); - popupDialog.show(); - return; -} - - -function handleLogout() { - for(key in window.authorizations.authz){ - window.authorizations.remove(key) - } - window.enabledScopes = null; - $('.api-ic.ic-on').addClass('ic-off'); - $('.api-ic.ic-on').removeClass('ic-on'); - - // set the info box - $('.api-ic.ic-warning').addClass('ic-error'); - $('.api-ic.ic-warning').removeClass('ic-warning'); -} - -function initOAuth(opts) { - var o = (opts||{}); - var errors = []; - - appName = (o.appName||errors.push("missing appName")); - popupMask = (o.popupMask||$('#api-common-mask')); - popupDialog = (o.popupDialog||$('.api-popup-dialog')); - clientId = (o.clientId||errors.push("missing client id")); - realm = (o.realm||errors.push("missing realm")); - - if(errors.length > 0){ - log("auth unable initialize oauth: " + errors); - return; - } - - $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); - $('.api-ic').click(function(s) { - if($(s.target).hasClass('ic-off')) - handleLogin(); - else { - handleLogout(); - } - false; - }); -} - -function onOAuthComplete(token) { - if(token) { - if(token.error) { - var checkbox = $('input[type=checkbox],.secured') - checkbox.each(function(pos){ - checkbox[pos].checked = false; - }); - alert(token.error); - } - else { - var b = token[window.swaggerUi.tokenName]; - if(b){ - // if all roles are satisfied - var o = null; - $.each($('.auth #api_information_panel'), function(k, v) { - var children = v; - if(children && children.childNodes) { - var requiredScopes = []; - $.each((children.childNodes), function (k1, v1){ - var inner = v1.innerHTML; - if(inner) - requiredScopes.push(inner); - }); - var diff = []; - for(var i=0; i < requiredScopes.length; i++) { - var s = requiredScopes[i]; - if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) { - diff.push(s); - } - } - if(diff.length > 0){ - o = v.parentNode; - $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off'); - $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on'); - - // sorry, not all scopes are satisfied - $(o).find('.api-ic').addClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - else { - o = v.parentNode; - $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on'); - $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off'); - - // all scopes are satisfied - $(o).find('.api-ic').addClass('ic-info'); - $(o).find('.api-ic').removeClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - } - }); - - window.authorizations.add("key", new ApiKeyAuthorization("Authorization", "Bearer " + b, "header")); - } - } - } -} \ No newline at end of file diff --git a/public/o2c.html b/public/o2c.html deleted file mode 100644 index d32d130..0000000 --- a/public/o2c.html +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file From 24d77f027dfd732d2d605111e40064ecdb85de35 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 19:56:58 -0700 Subject: [PATCH 14/54] Corrected issues with merge of 2.x changes --- .gitignore | 2 ++ LoopBackExplorer.iml | 10 ---------- index.js | 2 +- public/css/loopbackStyles.css | 2 +- public/index.html | 2 +- public/lib/loadSwaggerUI.js | 5 ++--- 6 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 LoopBackExplorer.iml diff --git a/.gitignore b/.gitignore index 79ec346..3e5ac87 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ results npm-debug.log node_modules + +LoopBackExplorer.iml diff --git a/LoopBackExplorer.iml b/LoopBackExplorer.iml deleted file mode 100644 index 284429d..0000000 --- a/LoopBackExplorer.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/index.js b/index.js index c27a48e..5062627 100644 --- a/index.js +++ b/index.js @@ -61,4 +61,4 @@ function explorer(loopbackApplication, options) { app.use(express.static(SWAGGER_UI_ROOT)); return app; -} \ No newline at end of file +} diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 7a0d08a..34c1b89 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -23,4 +23,4 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. -*/ +*/ \ No newline at end of file diff --git a/public/index.html b/public/index.html index afd0d5e..e5b6ff6 100644 --- a/public/index.html +++ b/public/index.html @@ -44,4 +44,4 @@
     
    - \ No newline at end of file + diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index ec05c09..08a690f 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -4,8 +4,8 @@ /*global SwaggerUi, log, ApiKeyAuthorization, hljs, window, $ */ $(function() { $.getJSON('config.json', function(config) { - log(config); - loadSwaggerUi(config); + log(config); + loadSwaggerUi(config); }); var accessToken; @@ -61,4 +61,3 @@ $(function() { } } }); - From ae8858c66b65230884722d45aec43d86ba9eb716 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 20:02:00 -0700 Subject: [PATCH 15/54] Corrected issues with merge of 2.x changes --- README.md | 13 ------------- public/css/loopbackStyles.css | 2 +- public/css/screen.css | 2 +- public/lib/loadSwaggerUI.js | 1 + 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 469cc72..882e104 100644 --- a/README.md +++ b/README.md @@ -96,16 +96,3 @@ Options are passed to `explorer(app, options)`. > Default: Read from package.json > Sets your API version. If not present, will read from your app's package.json. -======= -> Set the base path for swagger resources. -> Default: `app.get('restAPIRoot')` or `/swagger/resources`. - -`swaggerDistRoot`: **String** - -> Set a path within your application for overriding Swagger UI files. - -> If present, will search `swaggerDistRoot` first when attempting to load Swagger UI, allowing -you to pick and choose overrides. - -> See [index.html](public/index.html), where you may want to begin your overrides. -> The rest of the UI is provided by [Swagger UI](https://github.com/wordnik/swagger-ui). diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 34c1b89..7a0d08a 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -23,4 +23,4 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. -*/ \ No newline at end of file +*/ diff --git a/public/css/screen.css b/public/css/screen.css index 4a81758..b8731a7 100644 --- a/public/css/screen.css +++ b/public/css/screen.css @@ -1672,4 +1672,4 @@ pre code { } .message-fail { color: #cc0000; -} \ No newline at end of file +} diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index 08a690f..23b2f8e 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -61,3 +61,4 @@ $(function() { } } }); + From 9693150c8be3e7b1ef1d4bfbf6e97accc586c3ed Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 20:04:41 -0700 Subject: [PATCH 16/54] Corrected issues with merge of 2.x changes --- public/css/loopbackStyles.css | 2 +- public/lib/loadSwaggerUI.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 7a0d08a..34c1b89 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -23,4 +23,4 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. -*/ +*/ \ No newline at end of file diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index 23b2f8e..08a690f 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -61,4 +61,3 @@ $(function() { } } }); - From 1a96d840351de6f4307819d4de60c80b1d9a984b Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 20:09:07 -0700 Subject: [PATCH 17/54] Corrected issues with merge of 2.x changes --- public/css/loopbackStyles.css | 3 ++- public/lib/loadSwaggerUI.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 34c1b89..8065c59 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -23,4 +23,5 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. -*/ \ No newline at end of file +*/ + diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index 08a690f..241d335 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -61,3 +61,5 @@ $(function() { } } }); + + From c6754baf838ee6c8e8b34e8864158f70ea4a82f7 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 4 Aug 2014 20:29:32 -0700 Subject: [PATCH 18/54] Ported prepareDataType() from old strong-remoting:ext/swagger.js --- lib/route-helper.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lib/route-helper.js b/lib/route-helper.js index 8f8c10e..0ab0d1b 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -113,6 +113,40 @@ var routeHelper = module.exports = { * See https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#523-operation-object */ routeToAPIDoc: function routeToAPIDoc(route, classDef) { + /** + * Converts from an sl-remoting data type to a Swagger dataType. + */ + function prepareDataType(type) { + if (!type) { + return 'void'; + } + + if(Array.isArray(type)) { + return 'array'; // todo items support + } + + // TODO(schoon) - Add support for complex dataTypes, "models", etc. + switch (type) { + case 'Array': + return 'array'; + case 'Boolean': + return 'boolean'; + case 'buffer': + return 'byte'; + case 'Date': + return 'date'; + case 'number': + case 'Number': + return 'double'; + case 'Object': + return 'object'; + case 'String': + return 'string'; + } + + return type; + } + var returnDesc; // Some parameters need to be altered; eventually most of this should From cf3e6161ef4cb7549c444977254932453ba3a06e Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 6 Aug 2014 00:19:15 -0700 Subject: [PATCH 19/54] Corrected default for consumes+produces --- lib/swagger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swagger.js b/lib/swagger.js index 9c995db..ab7bfaf 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -27,8 +27,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) { basePath: loopbackApplication.get('restApiRoot') || '/api', resourcePath: 'resources', // Default consumes/produces to application/json - consumes: ['application/json'], - produces: ['application/json'], + consumes: ['application/json', 'application/xml', 'text/xml'], + produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], version: getVersion() }); From 1eddcade096db4e608120dd6d799c14024229ba5 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 6 Aug 2014 00:20:15 -0700 Subject: [PATCH 20/54] Corrected generateModelDefinition() to scan for model references in remote returns and errors --- lib/model-helper.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index e36ce6f..f32a412 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -18,6 +18,18 @@ var modelHelper = module.exports = { * @return {Object} Associated model definition. */ generateModelDefinition: function generateModelDefinition(modelClass, definitions) { + var processType = function(app, modelName, out) { + if (modelName) { + if (modelName.indexOf('[') == 0) { + modelName = modelName.replace(/[\[\]]/g, ''); + } + var model = app.models[modelName]; + if (model) { + generateModelDefinition(model, out); + } + } + } + var def = modelClass.definition; var name = def.name; var out = definitions || {}; @@ -27,7 +39,7 @@ var modelHelper = module.exports = { } var required = []; // Don't modify original properties. - var properties = _cloneDeep(def.properties); + var properties = _cloneDeep(def.rawProperties); // Iterate through each property in the model definition. // Types may be defined as constructors (e.g. String, Date, etc.), @@ -72,6 +84,23 @@ var modelHelper = module.exports = { generateModelDefinition(rel.modelThrough, out); } } + + var remotes = modelClass.sharedClass.methods(); + for (var remoteIdx in remotes) { + var remote = remotes[remoteIdx]; + var returns = remote.returns; + if (returns) { + for (var returnIdx in returns) { + processType(modelClass.app, returns[returnIdx].type, out); + } + } + var errors = remote.errors; + if (errors) { + for (var errorIdx in errors) { + processType(modelClass.app, errors[errorIdx].responseModel, out); + } + } + } return out; }, From 5ef5baee069d121ce797cf4f068061a328dc4097 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 6 Aug 2014 00:21:48 -0700 Subject: [PATCH 21/54] Corrected prepareDataType() to handle collections and nesting, and changed to always and only use responseMessages --- lib/route-helper.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/route-helper.js b/lib/route-helper.js index 0ab0d1b..5ee9832 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -122,7 +122,22 @@ var routeHelper = module.exports = { } if(Array.isArray(type)) { - return 'array'; // todo items support + if (type.length > 0) { + if (typeof type[0] === 'string') { + return '[' + type[0] + ']'; + } else if (typeof type[0] === 'function') { + return '[' + type[0].name + ']'; + } else if (typeof type[0] === 'object') { + if (typeof type[0].type === 'function') { + return '[' + type[0].type.name + ']'; + } else { + return '[' + type[0].type + ']'; + } + } else { + return '[' + type + ']'; + } + } + return 'array'; } // TODO(schoon) - Add support for complex dataTypes, "models", etc. @@ -175,10 +190,6 @@ var routeHelper = module.exports = { deprecated: route.deprecated, // [rfeng] Swagger UI doesn't escape '.' for jQuery selector nickname: route.method.replace(/\./g, '_'), - // Per the spec: - // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#523-operation-object - // This is the only object that may have a type of 'void'. - type: returns.model || returns.type || 'void', summary: route.description, // TODO(schoon) - Excerpt? notes: route.notes, // TODO(schoon) - `description` metadata? consumes: ['application/json', 'application/xml', 'text/xml'], From 820c51fa7ac4f9391e8525f8046a73e5f8307f1b Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 6 Aug 2014 00:31:34 -0700 Subject: [PATCH 22/54] Corrected generateModelDefinition() to scan for model references nested in other models --- lib/model-helper.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/model-helper.js b/lib/model-helper.js index f32a412..b9b51e5 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -57,6 +57,10 @@ var modelHelper = module.exports = { // Eke a type out of the constructors we were passed. prop = modelHelper.LDLPropToSwaggerDataType(prop); + processType(modelClass.app, prop.type, out); + if (prop.items) { + processType(modelClass.app, prop.items.type, out); + } // Required props sit in a per-model array. if (prop.required || (prop.id && !prop.generated)) { From 76057a2ba9da8321c33f093473f94298a21222a8 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 6 Aug 2014 23:52:59 -0700 Subject: [PATCH 23/54] Changed to possibly pull model description from ctor.settings --- lib/class-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/class-helper.js b/lib/class-helper.js index 0aab3b4..573c3f5 100644 --- a/lib/class-helper.js +++ b/lib/class-helper.js @@ -43,7 +43,7 @@ var classHelper = module.exports = { generateResourceDocAPIEntry: function(aClass) { return { path: aClass.http.path, - description: aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description + description: aClass.ctor.settings.description || aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description }; } }; From a4ab8023dcfaa911d515bf6fa6eeb113f5281eb7 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Thu, 7 Aug 2014 13:07:36 -0700 Subject: [PATCH 24/54] Removed branch-lock for loopback --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70b4807..78e24d3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/strongloop/loopback-explorer/issues" }, "devDependencies": { - "loopback": "git+https://github.com/shelbys/loopback.git#loopback-v2", + "loopback": "git+https://github.com/shelbys/loopback.git", "mocha": "~1.20.1", "supertest": "~0.13.0", "chai": "~1.9.1" From 464e37c1c9989988a6b76c63c91de2d4ab9ee9bb Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 25 Aug 2014 20:06:31 -0700 Subject: [PATCH 25/54] Changed addRoute() to honor X-Forwarded-Host --- lib/swagger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swagger.js b/lib/swagger.js index ab7bfaf..ef9a1dc 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -100,7 +100,7 @@ function addRoute(app, uri, doc, opts) { // know that header at the time the data is built. if (hasBasePath) { var headers = req.headers; - var host = headers.Host || headers.host; + var host = headers['x-forwarded-host'] || headers['X-Forwarded-Host'] || headers.Host || headers.host; var protocol = headers['x-forwarded-proto'] || headers['X-Forwarded-Proto'] || opts.protocol || req.protocol doc.basePath = protocol + '://' + host + initialPath; } From 240898e7a5bf2d276ed1c7f50c8077452b75ad6d Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 17 Sep 2014 19:02:39 -0700 Subject: [PATCH 26/54] Added support for scanning accepts params for Model references --- lib/model-helper.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/model-helper.js b/lib/model-helper.js index b9b51e5..9574135 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -92,6 +92,12 @@ var modelHelper = module.exports = { var remotes = modelClass.sharedClass.methods(); for (var remoteIdx in remotes) { var remote = remotes[remoteIdx]; + var accepts = remote.accepts; + if (accepts) { + for (var acceptIdx in accepts) { + processType(modelClass.app, accepts[acceptIdx].type, out); + } + } var returns = remote.returns; if (returns) { for (var returnIdx in returns) { From 2d6f7aebe80a0484b3458eff7e1a7c26b6479463 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Mon, 29 Sep 2014 19:43:56 -0700 Subject: [PATCH 27/54] Added padding to content well in order to counteract changes in SwaggerUI --- public/css/loopbackStyles.css | 5 +++ public/index.html | 70 ++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 8065c59..c59ad58 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -21,6 +21,11 @@ bottom: -30px; } +.contentWell { + padding-left: 30px; + padding-right: 30px; +} + /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. */ diff --git a/public/index.html b/public/index.html index e5b6ff6..cae33f7 100644 --- a/public/index.html +++ b/public/index.html @@ -1,47 +1,49 @@ - StrongLoop API Explorer - - - - - - - - - - - - - - - - - + StrongLoop API Explorer + + + + + + + + + + + + + + + + + - - + + - - + + -
     
    -
    +
    +
     
    +
    +
    From 7f4e8b3f877a7902a406ddadf2899cc2e3a8cfb8 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Tue, 7 Oct 2014 15:27:49 -0700 Subject: [PATCH 28/54] Corrected merge issues --- lib/model-helper.js | 49 ++++++++++++++++++++++----------------- lib/route-helper.js | 2 +- test/route-helper.test.js | 8 +++---- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 07c0fc4..875e697 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -19,7 +19,7 @@ var modelHelper = module.exports = { */ generateModelDefinition: function generateModelDefinition(modelClass, definitions) { var processType = function(app, modelName, referencedModels) { - if (modelName) { + if (app && modelName) { if (modelName.indexOf('[') == 0) { modelName = modelName.replace(/[\[\]]/g, ''); } @@ -41,7 +41,7 @@ var modelHelper = module.exports = { } var required = []; // Don't modify original properties. - var properties = _cloneDeep(def.rawProperties); + var properties = _cloneDeep(def.rawProperties || def.properties); var referencedModels = []; // Add models from settings @@ -72,9 +72,9 @@ var modelHelper = module.exports = { // Eke a type out of the constructors we were passed. prop = modelHelper.LDLPropToSwaggerDataType(prop); - processType(modelClass.app, prop.type, out); + processType(modelClass.app, prop.type, referencedModels); if (prop.items) { - processType(modelClass.app, prop.items.type, out); + processType(modelClass.app, prop.items.type, referencedModels); } // Required props sit in a per-model array. @@ -125,25 +125,27 @@ var modelHelper = module.exports = { } } - var remotes = modelClass.sharedClass.methods(); - for (var remoteIdx in remotes) { - var remote = remotes[remoteIdx]; - var accepts = remote.accepts; - if (accepts) { - for (var acceptIdx in accepts) { - processType(modelClass.app, accepts[acceptIdx].type, referencedModels); + if (modelClass.sharedClass) { + var remotes = modelClass.sharedClass.methods(); + for (var remoteIdx in remotes) { + var remote = remotes[remoteIdx]; + var accepts = remote.accepts; + if (accepts) { + for (var acceptIdx in accepts) { + processType(modelClass.app, accepts[acceptIdx].type, referencedModels); + } } - } - var returns = remote.returns; - if (returns) { - for (var returnIdx in returns) { - processType(modelClass.app, returns[returnIdx].type, referencedModels); + var returns = remote.returns; + if (returns) { + for (var returnIdx in returns) { + processType(modelClass.app, returns[returnIdx].type, referencedModels); + } } - } - var errors = remote.errors; - if (errors) { - for (var errorIdx in errors) { - processType(modelClass.app, errors[errorIdx].responseModel, referencedModels); + var errors = remote.errors; + if (errors) { + for (var errorIdx in errors) { + processType(modelClass.app, errors[errorIdx].responseModel, referencedModels); + } } } } @@ -181,6 +183,11 @@ var modelHelper = module.exports = { // Swagger spec. // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#431-primitives LDLPropToSwaggerDataType: function LDLPropToSwaggerDataType(prop) { + if (typeof prop === 'string') { + prop = { + type: prop + } + } var out = _cloneDeep(prop); out.type = modelHelper.getPropType(out.type); diff --git a/lib/route-helper.js b/lib/route-helper.js index 5ee9832..941a480 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -147,7 +147,7 @@ var routeHelper = module.exports = { case 'Boolean': return 'boolean'; case 'buffer': - return 'byte'; + return 'string'; case 'Date': return 'date'; case 'number': diff --git a/test/route-helper.test.js b/test/route-helper.test.js index 396007c..f033b39 100644 --- a/test/route-helper.test.js +++ b/test/route-helper.test.js @@ -13,7 +13,7 @@ describe('route-helper', function() { { arg: 'avg', type: 'number' } ] }); - expect(doc.operations[0].type).to.equal('object'); + expect(doc.operations[0].responseMessages[0].responseModel).to.equal('object'); }); it('converts path params when they exist in the route name', function() { @@ -60,8 +60,7 @@ describe('route-helper', function() { ] }); var opDoc = doc.operations[0]; - expect(opDoc.type).to.equal('array'); - expect(opDoc.items).to.eql({type: 'customType'}); + expect(opDoc.responseMessages[0].responseModel).to.equal('[customType]'); }); it('correctly converts return types (format)', function() { @@ -71,8 +70,7 @@ describe('route-helper', function() { ] }); var opDoc = doc.operations[0]; - expect(opDoc.type).to.equal('string'); - expect(opDoc.format).to.equal('byte'); + expect(opDoc.responseMessages[0].responseModel).to.equal('string'); }); }); From fd30b2d151af8fe4fa782e017722a7c816e7476d Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Tue, 7 Oct 2014 16:52:27 -0700 Subject: [PATCH 29/54] Protected against non-Model generation requests --- lib/model-helper.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 875e697..2b85101 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -24,10 +24,8 @@ var modelHelper = module.exports = { modelName = modelName.replace(/[\[\]]/g, ''); } var model = app.models[modelName]; - if (model) { - if (referencedModels.indexOf(model) === -1) { - referencedModels.push(model); - } + if (model && referencedModels.indexOf(model) === -1) { + referencedModels.push(model); } } } @@ -49,7 +47,7 @@ var modelHelper = module.exports = { for (var m in def.settings.models) { var model = modelClass[m]; if (typeof model === 'function' && model.modelName) { - if (referencedModels.indexOf(model) === -1) { + if (model && referencedModels.indexOf(model) === -1) { referencedModels.push(model); } } @@ -113,15 +111,11 @@ var modelHelper = module.exports = { // Generate model definitions for related models for (var r in modelClass.relations) { var rel = modelClass.relations[r]; - if (rel.modelTo){ - if (referencedModels.indexOf(rel.modelTo) === -1) { - referencedModels.push(rel.modelTo); - } + if (rel.modelTo && referencedModels.indexOf(rel.modelTo) === -1) { + referencedModels.push(rel.modelTo); } - if (rel.modelThrough) { - if (referencedModels.indexOf(rel.modelThrough) === -1) { - referencedModels.push(rel.modelThrough); - } + if (rel.modelThrough && referencedModels.indexOf(rel.modelThrough) === -1) { + referencedModels.push(rel.modelThrough); } } @@ -151,7 +145,9 @@ var modelHelper = module.exports = { } for (var i = 0, n = referencedModels.length; i < n; i++) { - generateModelDefinition(referencedModels[i], out); + if (referencedModels[i].definition) { + generateModelDefinition(referencedModels[i], out); + } } return out; }, @@ -161,7 +157,7 @@ var modelHelper = module.exports = { * get a string type. * @param {*} propType Prop type description. * @return {String} Prop type string. - */ + */ getPropType: function getPropType(propType) { if (typeof propType === 'function') { // See https://github.com/strongloop/loopback-explorer/issues/32 @@ -174,7 +170,7 @@ var modelHelper = module.exports = { }, isHiddenProperty: function(definition, propName) { - return definition.settings && + return definition.settings && Array.isArray(definition.settings.hidden) && definition.settings.hidden.indexOf(propName) !== -1; }, From 657f5e21196476091543da0d6b12a0caaf6b357e Mon Sep 17 00:00:00 2001 From: Jake Ayala Date: Tue, 28 Oct 2014 19:21:47 -0700 Subject: [PATCH 30/54] added reference to settings for additional properties --- lib/model-helper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 2b85101..945eeb5 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -105,7 +105,8 @@ var modelHelper = module.exports = { out[name] = { id: name, properties: properties, - required: required + required: required, + additionalProperties: def.settings.additionalProperties }; // Generate model definitions for related models From 4a40f18251681aeda9be6877c6d6d6f413503c27 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Fri, 7 Nov 2014 20:47:20 -0800 Subject: [PATCH 31/54] Added support for public in order to hide operations from Swagger --- lib/swagger.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/swagger.js b/lib/swagger.js index 96bc163..c2c1103 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -66,7 +66,9 @@ function Swagger(loopbackApplication, swaggerApp, opts) { return item.name === className; })[0]; - routeHelper.addRouteToAPIDeclaration(route, classDef, doc); + if (route.public) { + routeHelper.addRouteToAPIDeclaration(route, classDef, doc); + } }); /** From 5fcc411c0677ab192cca4e057f7cac77aee6881c Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Fri, 9 Jan 2015 21:52:57 -0800 Subject: [PATCH 32/54] Corrected handling for absent settings.additionalProperties --- lib/model-helper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 945eeb5..d02eb9a 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -105,9 +105,11 @@ var modelHelper = module.exports = { out[name] = { id: name, properties: properties, - required: required, - additionalProperties: def.settings.additionalProperties + required: required }; + if (def.settings && typeof def.settings.additionalProperties != 'undefined') { + out[name].additionalProperties = def.settings.additionalProperties; + } // Generate model definitions for related models for (var r in modelClass.relations) { From 3bd1e4440d75fd4bad61e16bf33bb151376607d9 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Fri, 9 Jan 2015 21:53:37 -0800 Subject: [PATCH 33/54] Corrected handling of type for operation, including containers --- lib/route-helper.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/route-helper.js b/lib/route-helper.js index 941a480..8f73fb8 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -187,9 +187,10 @@ var routeHelper = module.exports = { // `items` and `format` fields. operations: [routeHelper.extendWithType({ method: routeHelper.convertVerb(route.verb), - deprecated: route.deprecated, // [rfeng] Swagger UI doesn't escape '.' for jQuery selector nickname: route.method.replace(/\./g, '_'), + deprecated: route.deprecated, + type: returns.model || returns.type || 'void', summary: route.description, // TODO(schoon) - Excerpt? notes: route.notes, // TODO(schoon) - `description` metadata? consumes: ['application/json', 'application/xml', 'text/xml'], @@ -295,6 +296,22 @@ var routeHelper = module.exports = { Object.keys(typeDesc).forEach(function(key){ obj[key] = typeDesc[key]; }); + + //Ensure brief properties are first + if (typeof obj === 'object') { + var keysToSink = ['authorizations', 'consumes', 'notes', 'produces', + 'parameters', 'responseMessages', 'summary']; + var outKeys = Object.keys(obj); + for (var outKeyIdx in outKeys) { + var outKey = outKeys[outKeyIdx]; + if (keysToSink.indexOf(outKey) != -1) { + var outValue = obj[outKey]; + delete obj[outKey]; + obj[outKey] = outValue; + } + } + } + return obj; } }; From 3ca1f45a77e640e23a830c48ad2f8a0ceaa236a8 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Sat, 7 Feb 2015 14:40:15 -0800 Subject: [PATCH 34/54] Added event emission for swaggerResources to support customization --- lib/swagger.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/swagger.js b/lib/swagger.js index c2c1103..4c80d64 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -77,6 +77,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) { * information about them. */ addRoute(swaggerApp, opts.resourcePath, resourceDoc, opts); + + loopbackApplication.emit('swaggerResources', resourceDoc); } /** From 5902425f529a7d181211177c38df8513c974926b Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Sat, 7 Feb 2015 22:58:30 -0800 Subject: [PATCH 35/54] Changed Swagger() to omit resources with no content --- lib/swagger.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/swagger.js b/lib/swagger.js index 4c80d64..16ffec1 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -45,7 +45,17 @@ function Swagger(loopbackApplication, swaggerApp, opts) { // A class is an endpoint root; e.g. /users, /products, and so on. classes.forEach(function (aClass) { var doc = apiDocs[aClass.name] = classHelper.generateAPIDoc(aClass, opts); - resourceDoc.apis.push(classHelper.generateResourceDocAPIEntry(aClass)); + var hasPublic = false; + var methods = aClass.methods() + for (var methodKey in methods) { + hasPublic = methods[methodKey].public; + if (hasPublic) { + break; + } + } + if (hasPublic) { + resourceDoc.apis.push(classHelper.generateResourceDocAPIEntry(aClass)); + } // Add the getter for this doc. var docPath = urlJoin(opts.resourcePath, aClass.http.path); From 24146313ec0fc7f85b20bf91bab908c0e6fdb4ce Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Sat, 7 Feb 2015 22:59:00 -0800 Subject: [PATCH 36/54] Changed Swagger() to omit resources with no content --- lib/swagger.js | 12 +++++++++++- package.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/swagger.js b/lib/swagger.js index 4c80d64..16ffec1 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -45,7 +45,17 @@ function Swagger(loopbackApplication, swaggerApp, opts) { // A class is an endpoint root; e.g. /users, /products, and so on. classes.forEach(function (aClass) { var doc = apiDocs[aClass.name] = classHelper.generateAPIDoc(aClass, opts); - resourceDoc.apis.push(classHelper.generateResourceDocAPIEntry(aClass)); + var hasPublic = false; + var methods = aClass.methods() + for (var methodKey in methods) { + hasPublic = methods[methodKey].public; + if (hasPublic) { + break; + } + } + if (hasPublic) { + resourceDoc.apis.push(classHelper.generateResourceDocAPIEntry(aClass)); + } // Add the getter for this doc. var docPath = urlJoin(opts.resourcePath, aClass.http.path); diff --git a/package.json b/package.json index 51d36ec..e2556b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.2.11", + "version": "1.2.12", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { From 27e5895aa589863170d4eaf376ec1be31dd40c1a Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Thu, 26 Mar 2015 22:23:24 -0700 Subject: [PATCH 37/54] add $ref and remove type for models --- lib/model-helper.js | 6 ++++++ test/model-helper.test.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index d02eb9a..e5b2877 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -5,6 +5,7 @@ */ var _cloneDeep = require('lodash.clonedeep'); var translateDataTypeKeys = require('./translate-data-type-keys'); +var TYPES_PRIMITIVE = ['array', 'boolean', 'integer', 'number', 'null', 'object', 'string']; /** * Export the modelHelper singleton. @@ -83,6 +84,11 @@ var modelHelper = module.exports = { // Change mismatched keys. prop = translateDataTypeKeys(prop); + if (TYPES_PRIMITIVE.indexOf(prop.type) === -1 ){ + prop.$ref = prop.type; + delete prop.type; + } + // Assign this back to the properties object. properties[key] = prop; diff --git a/test/model-helper.test.js b/test/model-helper.test.js index 98fd4b1..bc8e1b7 100644 --- a/test/model-helper.test.js +++ b/test/model-helper.test.js @@ -118,7 +118,7 @@ describe('model-helper', function() { address: Address }); var prop = def.properties.address; - expect(prop).to.eql({ type: 'Address' }); + expect(prop).to.eql({ $ref: 'Address' }); }); }); From 022403eadc41d0697a223df2eab926e9511b032d Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Thu, 26 Mar 2015 22:33:12 -0700 Subject: [PATCH 38/54] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2556b8..707673a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.2.12", + "version": "1.2.13", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { From 772a48773d98a5d9a3db98be92aca0b1e3ee6f89 Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Wed, 1 Apr 2015 17:47:57 -0700 Subject: [PATCH 39/54] remove required from sub-schema --- lib/model-helper.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/model-helper.js b/lib/model-helper.js index e5b2877..7aede9e 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -81,6 +81,10 @@ var modelHelper = module.exports = { required.push(key); } + if (prop.hasOwnProperty('required')){ + delete prop.required; + } + // Change mismatched keys. prop = translateDataTypeKeys(prop); From b9df4b670625f45e37f652f3452e06d22e9c966c Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Thu, 2 Apr 2015 16:29:09 -0700 Subject: [PATCH 40/54] remove id fields from required array --- lib/model-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 7aede9e..2e8e5fe 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -77,7 +77,7 @@ var modelHelper = module.exports = { } // Required props sit in a per-model array. - if (prop.required || (prop.id && !prop.generated)) { + if (prop.required) { required.push(key); } From e22b826bca81e7fdb4b5a3cc63a06f6ad8082f6c Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Sun, 5 Apr 2015 16:51:15 -0700 Subject: [PATCH 41/54] fix resource listing and remove id from each property --- lib/model-helper.js | 7 +++---- lib/swagger.js | 8 +++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 2e8e5fe..ec1fea7 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -81,10 +81,6 @@ var modelHelper = module.exports = { required.push(key); } - if (prop.hasOwnProperty('required')){ - delete prop.required; - } - // Change mismatched keys. prop = translateDataTypeKeys(prop); @@ -93,6 +89,9 @@ var modelHelper = module.exports = { delete prop.type; } + delete prop.required; + delete prop.id; + // Assign this back to the properties object. properties[key] = prop; diff --git a/lib/swagger.js b/lib/swagger.js index 16ffec1..83afe11 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -12,6 +12,7 @@ var urlJoin = require('./url-join'); var _defaults = require('lodash.defaults'); var classHelper = require('./class-helper'); var routeHelper = require('./route-helper'); +var _cloneDeep = require('lodash.clonedeep'); /** * Create a remotable Swagger module for plugging into `RemoteObjects`. @@ -129,11 +130,16 @@ function addRoute(app, uri, doc, opts) { * @return {Object} Resource doc. */ function generateResourceDoc(opts) { + var apiInfo = _cloneDeep(opts.apiInfo); + for (var property in apiInfo) { + property = Array.isArray(property) ? property.join('') : property; + } + return { swaggerVersion: opts.swaggerVersion, apiVersion: opts.version, // See https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#513-info-object - info: opts.apiInfo, + info: apiInfo, // TODO Authorizations // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#514-authorizations-object consumes: ['application/json', 'application/xml', 'text/xml'], From 1dbc9cf1136d832878c9d9132ecba2fdf7f1ea6c Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Sun, 5 Apr 2015 17:04:30 -0700 Subject: [PATCH 42/54] propertyName, not property --- lib/swagger.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/swagger.js b/lib/swagger.js index 83afe11..553cddb 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -131,8 +131,9 @@ function addRoute(app, uri, doc, opts) { */ function generateResourceDoc(opts) { var apiInfo = _cloneDeep(opts.apiInfo); - for (var property in apiInfo) { - property = Array.isArray(property) ? property.join('') : property; + for (var propertyName in apiInfo) { + var property = apiInfo[propertyName]; + apiInfo[propertyName] = Array.isArray(property) ? property.join('') : property; } return { From b9001a3130209a18512114f3a7da9ee616ce454e Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Mon, 6 Apr 2015 17:00:32 -0700 Subject: [PATCH 43/54] Uri id and $ref, join description --- lib/model-helper.js | 36 +++++++++++++++++++++++++++--------- test/model-helper.test.js | 5 +++-- test/swagger.test.js | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index ec1fea7..9919516 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -5,7 +5,7 @@ */ var _cloneDeep = require('lodash.clonedeep'); var translateDataTypeKeys = require('./translate-data-type-keys'); -var TYPES_PRIMITIVE = ['array', 'boolean', 'integer', 'number', 'null', 'object', 'string']; +var TYPES_PRIMITIVE = ['array', 'boolean', 'integer', 'number', 'null', 'object', 'string', 'any']; /** * Export the modelHelper singleton. @@ -29,10 +29,18 @@ var modelHelper = module.exports = { referencedModels.push(model); } } - } + }; + + var convertTypeTo$Ref = function convertTypeTo$Ref(prop, modelUri){ + if (prop.type && TYPES_PRIMITIVE.indexOf(prop.type) === -1 ){ + prop.$ref = modelUri + '/definitions/' + prop.type; + delete prop.type; + } + }; var def = modelClass.definition; var name = def.name; + var modelUri = 'https://strongloop.com/loopback/' + name + '#'; var out = definitions || {}; if (out[name]) { // The model is already included @@ -74,24 +82,26 @@ var modelHelper = module.exports = { processType(modelClass.app, prop.type, referencedModels); if (prop.items) { processType(modelClass.app, prop.items.type, referencedModels); + convertTypeTo$Ref(prop.items, modelUri); } // Required props sit in a per-model array. - if (prop.required) { + if (prop.required || (prop.id && !prop.generated)) { required.push(key); } // Change mismatched keys. prop = translateDataTypeKeys(prop); - if (TYPES_PRIMITIVE.indexOf(prop.type) === -1 ){ - prop.$ref = prop.type; - delete prop.type; - } + convertTypeTo$Ref(prop, modelUri); delete prop.required; delete prop.id; + if (prop.description) { + prop.description = Array.isArray(prop.description) ? prop.description.join('') : prop.description; + } + // Assign this back to the properties object. properties[key] = prop; @@ -112,11 +122,19 @@ var modelHelper = module.exports = { }); out[name] = { - id: name, + id: modelUri, + $schema: 'http://json-schema.org/draft-04/schema#', properties: properties, required: required }; - if (def.settings && typeof def.settings.additionalProperties != 'undefined') { + + if (def.description){ + out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; + } + + if (def.settings && typeof def.settings.strict != 'undefined') { + out[name].additionalProperties = !def.settings.strict; + } else if (def.settings && typeof def.settings.additionalProperties != 'undefined') { out[name].additionalProperties = def.settings.additionalProperties; } diff --git a/test/model-helper.test.js b/test/model-helper.test.js index bc8e1b7..60efbcf 100644 --- a/test/model-helper.test.js +++ b/test/model-helper.test.js @@ -15,6 +15,7 @@ describe('model-helper', function() { buf: Buffer // {type: 'string', format: 'byte'} }); var props = def.properties; + console.log(props.str); expect(props.str).to.eql({ type: 'string' }); expect(props.num).to.eql({ type: 'number', format: 'double' }); expect(props.date).eql({ type: 'string', format: 'date' }); @@ -111,14 +112,14 @@ describe('model-helper', function() { expect(prop).to.eql({ type: 'array', items: { type: 'any' } }); }); - it('converts Model type', function() { + it('converts Model type to $ref', function() { var Address = loopback.createModel('Address', {street: String}); var def = buildSwaggerModels({ str: String, address: Address }); var prop = def.properties.address; - expect(prop).to.eql({ $ref: 'Address' }); + expect(prop).to.eql({ $ref: 'https://strongloop.com/loopback/testModel#/definitions/Address' }); }); }); diff --git a/test/swagger.test.js b/test/swagger.test.js index 1cd0a5b..ea13d77 100644 --- a/test/swagger.test.js +++ b/test/swagger.test.js @@ -91,7 +91,7 @@ describe('swagger definition', function() { getReq.end(function(err, res) { if (err) return done(err); var data = res.body.models.product; - expect(data.id).to.equal('product'); + expect(data.id).to.equal('https://strongloop.com/loopback/product#'); expect(data.required.sort()).to.eql(['aNum', 'foo'].sort()); expect(data.properties.foo.type).to.equal('string'); expect(data.properties.bar.type).to.equal('string'); From 3f8c3b7c04947ccbf9ae1bc06edc3dcf07f36b7c Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Mon, 6 Apr 2015 19:57:57 -0700 Subject: [PATCH 44/54] back out changes of id to URI --- lib/model-helper.js | 12 +++++------- test/model-helper.test.js | 3 +-- test/swagger.test.js | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 9919516..1268941 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -31,16 +31,15 @@ var modelHelper = module.exports = { } }; - var convertTypeTo$Ref = function convertTypeTo$Ref(prop, modelUri){ + var convertTypeTo$Ref = function convertTypeTo$Ref(prop){ if (prop.type && TYPES_PRIMITIVE.indexOf(prop.type) === -1 ){ - prop.$ref = modelUri + '/definitions/' + prop.type; + prop.$ref = prop.type; delete prop.type; } }; var def = modelClass.definition; var name = def.name; - var modelUri = 'https://strongloop.com/loopback/' + name + '#'; var out = definitions || {}; if (out[name]) { // The model is already included @@ -82,7 +81,7 @@ var modelHelper = module.exports = { processType(modelClass.app, prop.type, referencedModels); if (prop.items) { processType(modelClass.app, prop.items.type, referencedModels); - convertTypeTo$Ref(prop.items, modelUri); + convertTypeTo$Ref(prop.items); } // Required props sit in a per-model array. @@ -93,7 +92,7 @@ var modelHelper = module.exports = { // Change mismatched keys. prop = translateDataTypeKeys(prop); - convertTypeTo$Ref(prop, modelUri); + convertTypeTo$Ref(prop); delete prop.required; delete prop.id; @@ -122,8 +121,7 @@ var modelHelper = module.exports = { }); out[name] = { - id: modelUri, - $schema: 'http://json-schema.org/draft-04/schema#', + id: name, properties: properties, required: required }; diff --git a/test/model-helper.test.js b/test/model-helper.test.js index 60efbcf..031bc22 100644 --- a/test/model-helper.test.js +++ b/test/model-helper.test.js @@ -15,7 +15,6 @@ describe('model-helper', function() { buf: Buffer // {type: 'string', format: 'byte'} }); var props = def.properties; - console.log(props.str); expect(props.str).to.eql({ type: 'string' }); expect(props.num).to.eql({ type: 'number', format: 'double' }); expect(props.date).eql({ type: 'string', format: 'date' }); @@ -119,7 +118,7 @@ describe('model-helper', function() { address: Address }); var prop = def.properties.address; - expect(prop).to.eql({ $ref: 'https://strongloop.com/loopback/testModel#/definitions/Address' }); + expect(prop).to.eql({ $ref: 'Address' }); }); }); diff --git a/test/swagger.test.js b/test/swagger.test.js index ea13d77..1cd0a5b 100644 --- a/test/swagger.test.js +++ b/test/swagger.test.js @@ -91,7 +91,7 @@ describe('swagger definition', function() { getReq.end(function(err, res) { if (err) return done(err); var data = res.body.models.product; - expect(data.id).to.equal('https://strongloop.com/loopback/product#'); + expect(data.id).to.equal('product'); expect(data.required.sort()).to.eql(['aNum', 'foo'].sort()); expect(data.properties.foo.type).to.equal('string'); expect(data.properties.bar.type).to.equal('string'); From a91eb2fb04356aae9349f5958e302ff625b27af0 Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Tue, 7 Apr 2015 11:21:12 -0700 Subject: [PATCH 45/54] Convert array to string for summary, note, and description. Fix additionalProperties --- lib/class-helper.js | 3 ++- lib/model-helper.js | 11 +++++++---- lib/route-helper.js | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/class-helper.js b/lib/class-helper.js index 573c3f5..e060d98 100644 --- a/lib/class-helper.js +++ b/lib/class-helper.js @@ -41,9 +41,10 @@ var classHelper = module.exports = { * @return {Object} API declaration reference. */ generateResourceDocAPIEntry: function(aClass) { + var description = aClass.ctor.settings.description || aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description; return { path: aClass.http.path, - description: aClass.ctor.settings.description || aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description + description: Array.isArray(description) ? description.join('') : description }; } }; diff --git a/lib/model-helper.js b/lib/model-helper.js index 1268941..4ea2eb9 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -130,10 +130,13 @@ var modelHelper = module.exports = { out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; } - if (def.settings && typeof def.settings.strict != 'undefined') { - out[name].additionalProperties = !def.settings.strict; - } else if (def.settings && typeof def.settings.additionalProperties != 'undefined') { - out[name].additionalProperties = def.settings.additionalProperties; + if (def.settings){ + var strict = def.settings.strict; + var additionalProperties = def.settings.additionalProperties; + var notAllowAdditionalProperties = strict || (additionalProperties !== true); + if (notAllowAdditionalProperties){ + out[name].additionalProperties = !notAllowAdditionalProperties; + } } // Generate model definitions for related models diff --git a/lib/route-helper.js b/lib/route-helper.js index 8f73fb8..c615d93 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -191,8 +191,8 @@ var routeHelper = module.exports = { nickname: route.method.replace(/\./g, '_'), deprecated: route.deprecated, type: returns.model || returns.type || 'void', - summary: route.description, // TODO(schoon) - Excerpt? - notes: route.notes, // TODO(schoon) - `description` metadata? + summary: Array.isArray(route.description) ? route.description.join('') : route.description, // TODO(schoon) - Excerpt? + notes: Array.isArray(route.notes) ? route.notes.join('') : route.notes, // TODO(schoon) - `description` metadata? consumes: ['application/json', 'application/xml', 'text/xml'], produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], parameters: accepts, @@ -264,7 +264,7 @@ var routeHelper = module.exports = { minimum: accepts.minimum, maximum: accepts.maximum, allowMultiple: accepts.allowMultiple, - description: accepts.description + description: Array.isArray(accepts.description) ? accepts.description.join('') : accepts.description }; out = routeHelper.extendWithType(out); From e93d87375bd06ecb41d797e782ad62cc45d95296 Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Tue, 7 Apr 2015 11:30:54 -0700 Subject: [PATCH 46/54] float additionalProperties and description to top --- lib/model-helper.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 4ea2eb9..b4a4bc4 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -121,15 +121,9 @@ var modelHelper = module.exports = { }); out[name] = { - id: name, - properties: properties, - required: required + id: name }; - if (def.description){ - out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; - } - if (def.settings){ var strict = def.settings.strict; var additionalProperties = def.settings.additionalProperties; @@ -139,6 +133,13 @@ var modelHelper = module.exports = { } } + if (def.description){ + out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; + } + + out[name].properties = properties; + out[name].required = required; + // Generate model definitions for related models for (var r in modelClass.relations) { var rel = modelClass.relations[r]; @@ -243,7 +244,4 @@ var modelHelper = module.exports = { } return out; } -}; - - - +}; \ No newline at end of file From c001bd6b0177827673d53250cf751881a17a910a Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Tue, 7 Apr 2015 15:53:56 -0700 Subject: [PATCH 47/54] add more tests --- test/class-helper.test.js | 47 +++++++++++++++++++++++++++++++++++++++ test/model-helper.test.js | 30 +++++++++++++++++++++++++ test/route-helper.test.js | 29 ++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 test/class-helper.test.js diff --git a/test/class-helper.test.js b/test/class-helper.test.js new file mode 100644 index 0000000..63e88cb --- /dev/null +++ b/test/class-helper.test.js @@ -0,0 +1,47 @@ +/** + * Created by ytang on 4/7/15. + */ +var classHelper = require('../lib/class-helper'); +var loopback = require('loopback'); +var expect = require('chai').expect; + +describe('class-helper', function() { + describe('#generateResourceDocAPIEntry', function() { + describe('when ctor.settings.description is an array of string', function() { + it('should return description as a string', function() { + var aClass = { + ctor: { + settings: { + description: ['1','2','3'] + } + }, + http:{ + path: 'path' + } + }; + + var result = classHelper.generateResourceDocAPIEntry(aClass); + expect(result.description).to.eql('123'); + }); + }); + + describe('when ctor.sharedCtor.description is an array of string', function() { + it('should return description as a string', function() { + var aClass = { + ctor: { + settings: {}, + sharedCtor: { + description: ['1','2','3'] + } + }, + http:{ + path: 'path' + } + }; + + var result = classHelper.generateResourceDocAPIEntry(aClass); + expect(result.description).to.eql('123'); + }); + }); + }); +}); \ No newline at end of file diff --git a/test/model-helper.test.js b/test/model-helper.test.js index 031bc22..4b6b57a 100644 --- a/test/model-helper.test.js +++ b/test/model-helper.test.js @@ -192,6 +192,36 @@ describe('model-helper', function() { expect(def.properties).to.have.property('visibleProperty'); }); }); + + describe('#generateModelDefinition', function(){ + it('should convert top level array description to string', function(){ + var model = {}; + model.definition = { + name: 'test', + description: ['1','2','3'], + properties: {} + }; + var models = {}; + modelHelper.generateModelDefinition(model, models); + expect(models.test.description).to.equal('123'); + }); + + it('should convert property level array description to string', function(){ + var model = {}; + model.definition = { + name: 'test', + properties: { + prop1: { + type: 'string', + description: ['1','2','3'] + } + } + }; + var models = {}; + modelHelper.generateModelDefinition(model, models); + expect(models.test.properties.prop1.description).to.equal('123'); + }); + }); }); // Simulates the format of a remoting class. diff --git a/test/route-helper.test.js b/test/route-helper.test.js index f033b39..addd737 100644 --- a/test/route-helper.test.js +++ b/test/route-helper.test.js @@ -73,6 +73,35 @@ describe('route-helper', function() { expect(opDoc.responseMessages[0].responseModel).to.equal('string'); }); + describe('#acceptToParameter', function(){ + it('should return function that converts accepts.description from array of string to string', function(){ + var f = routeHelper.acceptToParameter({verb: 'get', path: 'path'}); + var result = f({description: ['1','2','3']}); + expect(result.description).to.eql('123'); + }); + }); + + describe('#routeToAPIDoc', function(){ + it('should convert route.description from array fo string to string', function(){ + var result = routeHelper.routeToAPIDoc({ + method: 'someMethod', + verb: 'get', + path: 'path', + description:['1','2','3'] + }); + expect(result.operations[0].summary).to.eql('123'); + }); + + it('should convert route.notes from array fo string to string', function(){ + var result = routeHelper.routeToAPIDoc({ + method: 'someMethod', + verb: 'get', + path: 'path', + notes:['1','2','3'] + }); + expect(result.operations[0].notes).to.eql('123'); + }); + }); }); // Easy wrapper around createRoute From 7af616b21aaf57f16611736c62a3849e59f7e644 Mon Sep 17 00:00:00 2001 From: Ying Tang Date: Wed, 8 Apr 2015 17:03:22 -0700 Subject: [PATCH 48/54] review comments --- lib/model-helper.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index b4a4bc4..733ab66 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -97,7 +97,7 @@ var modelHelper = module.exports = { delete prop.required; delete prop.id; - if (prop.description) { + if (prop.description){ prop.description = Array.isArray(prop.description) ? prop.description.join('') : prop.description; } @@ -120,26 +120,27 @@ var modelHelper = module.exports = { } }); - out[name] = { - id: name - }; - + var additionalProperties = undefined; if (def.settings){ var strict = def.settings.strict; - var additionalProperties = def.settings.additionalProperties; + additionalProperties = def.settings.additionalProperties; var notAllowAdditionalProperties = strict || (additionalProperties !== true); if (notAllowAdditionalProperties){ - out[name].additionalProperties = !notAllowAdditionalProperties; + additionalProperties = false; } } + out[name] = { + id: name, + additionalProperties: additionalProperties, + properties: properties, + required: required + }; + if (def.description){ out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; } - out[name].properties = properties; - out[name].required = required; - // Generate model definitions for related models for (var r in modelClass.relations) { var rel = modelClass.relations[r]; From 1bf7c27a56e3857703d22f8cf5e5ca8ca2957f68 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Thu, 2 Jul 2015 11:03:27 -0700 Subject: [PATCH 49/54] Merge remote-tracking branch 'upstream/master' into validate_param_enum --- .gitignore | 3 + CHANGES.md | 313 +++++++++++++++++++ CONTRIBUTING.md | 2 +- README.md | 21 +- example/simple.js | 4 +- index.js | 22 +- lib/class-helper.js | 14 +- lib/model-helper.js | 106 ++++--- lib/route-helper.js | 109 ++++--- lib/swagger.js | 120 +++++-- lib/translate-data-type-keys.js | 3 +- lib/type-converter.js | 14 + package.json | 18 +- public/css/loopbackStyles.css | 11 + public/index.html | 43 ++- public/lib/loadSwaggerUI.js | 29 +- test/class-helper.test.js | 50 ++- test/explorer.test.js | 84 ++++- test/fixtures/dummy-swagger-ui/index.html | 1 + test/fixtures/dummy-swagger-ui/swagger-ui.js | 1 + test/model-helper.test.js | 85 +++-- test/route-helper.test.js | 174 ++++++++++- test/swagger.test.js | 301 +++++++++++++++++- 23 files changed, 1309 insertions(+), 219 deletions(-) create mode 100644 CHANGES.md create mode 100644 lib/type-converter.js create mode 100644 test/fixtures/dummy-swagger-ui/index.html create mode 100644 test/fixtures/dummy-swagger-ui/swagger-ui.js diff --git a/.gitignore b/.gitignore index 3e5ac87..5e487e2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ lib-cov *.out *.pid *.gz +.idea +*.iml +*.tgz .idea pids diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..62327b5 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,313 @@ +2015-02-23, Version 1.7.1 +========================= + + * Remove unused external font "Droid Sans". (Miroslav Bajtoš) + + +2015-02-17, Version 1.7.0 +========================= + + * Made API doc of class use the http.path of the class if available, or the name of the class as a fallback (gandrianakis) + + +2015-01-09, Version 1.6.4 +========================= + + * Prevent double slash in the resource URLs (Miroslav Bajtoš) + + * Allow `uiDirs` to be defined as a String (Simon Ho) + + * Save accessToken in localStorage. Fixes #47 (Samuel Reed) + + +2015-01-06, Version 1.6.3 +========================= + + * Fix bad CLA URL in CONTRIBUTING.md (Ryan Graham) + + * Add X-UA-Compatible tag (Nick Van Dyck) + + +2014-12-12, Version 1.6.2 +========================= + + * Move 200 response to `type` on the operation object. See #75. (Samuel Reed) + + +2014-12-08, Version 1.6.1 +========================= + + * Use full lodash instead of lodash components (Ryan Graham) + + +2014-12-02, Version 1.6.0 +========================= + + * Remove model name from nickname, swagger spec understands op context. (Samuel Reed) + + +2014-11-29, Version 1.5.2 +========================= + + * model-helper: ignore unknown property types (Miroslav Bajtoš) + + +2014-10-24, Version 1.5.1 +========================= + + + +2014-10-24, Version 1.5.0 +========================= + + * Add an option `uiDirs` (Miroslav Bajtoš) + + * swagger: honour X-Forwarded-Proto header (Miroslav Bajtoš) + + +2014-10-21, Version 1.4.0 +========================= + + * Bump version (Raymond Feng) + + * Add integration tests for included models (Miroslav Bajtoš) + + * route-helper: add `responseMessages` (Miroslav Bajtoš) + + * model-helper: support anonymous object types (Miroslav Bajtoš) + + * swagger: include models from accepts/returns args (Miroslav Bajtoš) + + * loopbackStyles: improve spacing in small window (Miroslav Bajtoš) + + * swagger: Deprecate `opts.swaggerVersion` (Miroslav Bajtoš) + + * swagger: use X-Forwarded-Host for basePath (Miroslav Bajtoš) + + * example: use PersistedModel instead of Model (Miroslav Bajtoš) + + * models: include model's `description` (Miroslav Bajtoš) + + * Refactor conversion of data types (Miroslav Bajtoš) + + * Move `convertText` to `typeConverter` (Miroslav Bajtoš) + + * Add support for `context` and `res` param types (Krishna Raman) + + * package: update devDependencies (Miroslav Bajtoš) + + * gitignore: add .idea, *.tgz, *.iml (Miroslav Bajtoš) + + * Support multi-line array `description` and `notes` (Miroslav Bajtoš) + + * Use `1.0.0` as the default app version. (Miroslav Bajtoš) + + * Extend `consumes` and `produces` metadata (Miroslav Bajtoš) + + * route-helper: include `notes` and `deprecated` (Miroslav Bajtoš) + + * Pull model description from ctor.settings first (Shelby Sanders) + + +2014-10-08, Version 1.3.0 +========================= + + * swagger: allow cross-origin requests (Miroslav Bajtoš) + + * Sort endpoints by letter. (Samuel Reed) + + * Add syntax highlighting styles & highlight threshold. (Samuel Reed) + + * Add contribution guidelines (Ryan Graham) + + +2014-09-22, Version 1.2.11 +========================== + + * Bump version (Raymond Feng) + + * Fix how the array of models is iterated (Raymond Feng) + + +2014-09-05, Version 1.2.10 +========================== + + * Bump version (Raymond Feng) + + * Make sure nested/referenced models in array are mapped to swagger (Clark Wang) + + * Make sure nested/referenced models are mapped to swagger (Raymond Feng) + + +2014-08-15, Version 1.2.9 +========================= + + * Bump version (Raymond Feng) + + * Newest Swagger UI requires application/x-www-form-urlencoded. (Samuel Reed) + + * Use `dist` property from swagger-ui package. (Samuel Reed) + + * Fixed undefined modelClass when using polymorphic relations (Navid Nikpour) + + +2014-08-08, Version 1.2.8 +========================= + + * Bump version (Raymond Feng) + + * Fix the type name for a property if model class is used (Raymond Feng) + + +2014-08-04, Version 1.2.7 +========================= + + * Bump version (Raymond Feng) + + * Set up default consumes/produces media types (Raymond Feng) + + * Fix the default opts (Raymond Feng) + + * Add required swagger 1.2 items property for property type array (Ritchie Martori) + + * Allow passing a custom protocol. (Samuel Reed) + + +2014-07-29, Version 1.2.6 +========================= + + * Bump version (Raymond Feng) + + * res.send deprecated - updated to res.status (Geoffroy) + + * Remove hidden properties from definition. (Samuel Reed) + + +2014-07-25, Version 1.2.5 +========================= + + * Bump version (Raymond Feng) + + * Ensure models from relations are included (Raymond Feng) + + +2014-07-22, Version 1.2.4 +========================= + + * model-helper: handle arrays with undefined items (Miroslav Bajtoš) + + +2014-07-22, Version 1.2.3 +========================= + + * model-helper: handle array types with no item type (Miroslav Bajtoš) + + +2014-07-20, Version 1.2.2 +========================= + + * Bump version (Raymond Feng) + + * Properly convert complex return types. (Samuel Reed) + + +2014-07-18, Version 1.2.1 +========================= + + * Bump version (Raymond Feng) + + * Fix up loopback.rest() model definition hack. (Samuel Reed) + + +2014-07-14, Version 1.2.0 +========================= + + * Bump version and update deps (Raymond Feng) + + * s/accessToken/access_token in authorization key name (Samuel Reed) + + * Fix resources if the explorer is at a deep path. (Samuel Reed) + + * Fix debug namespace, express version. (Samuel Reed) + + * Remove forgotten TODO. (Samuel Reed) + + * Simplify `accepts` and `returns` hacks. (Samuel Reed) + + * More consise type tests (Samuel Reed) + + * Remove preMiddleware. (Samuel Reed) + + * Remove swagger.test.js license (Samuel Reed) + + * Remove peerDependencies, use express directly. (Samuel Reed) + + * Add url-join so path.join() doesn't break windows (Samuel Reed) + + * Rename translateKeys to translateDataTypeKeys. (Samuel Reed) + + * Refactor route-helper & add tests. (Samuel Reed) + + * LDL to Swagger fixes & extensions. (Samuel Reed) + + * Use express routes instead of modifying remoting. (Samuel Reed) + + * Fix missing strong-remoting devDependency. (Samuel Reed) + + * Restore existing styles. (Samuel Reed) + + * Allow easy setting of accessToken in explorer UI. (Samuel Reed) + + * Refactor key translations between LDL & Swagger. (Samuel Reed) + + * Refactoring swagger 1.2 rework. (Samuel Reed) + + * Make sure body parameter is shown. (Raymond Feng) + + * Some swagger 1.2 migration cleanup. (Samuel Reed) + + * Fix api resource path and type ref to models. (Raymond Feng) + + * Swagger 1.2 compatability. Moved strong-remoting/ext/swagger to this module. (Samuel Reed) + + * Load swagger ui from `swagger-ui` package instead. (Samuel Reed) + + +2014-05-28, Version 1.1.1 +========================= + + * package.json: add support for loopback 2.x (Miroslav Bajtoš) + + * Make sure X-Powered-By header is disabled (Alex Pica) + + * Fix license url (Raymond Feng) + + * Update to dual MIT/StrongLoop license (Raymond Feng) + + +2014-01-14, Version 1.1.0 +========================= + + * Bump up loopback min version to 1.5 (Miroslav Bajtoš) + + * Use `app.get('restApiRoot')` as default basePath (Miroslav Bajtoš) + + * Replace strong-remoting ext/swagger with app.docs (Miroslav Bajtoš) + + +2014-01-13, Version 1.0.2 +========================= + + * Bump version (Raymond Feng) + + * README: mount REST at /api in the sample code (Miroslav Bajtos) + + * Reorder middleware to fix unit-test failures. (Miroslav Bajtos) + + * Fix loading of loopback dependencies. (Miroslav Bajtos) + + +2013-12-04, Version 1.0.1 +========================= + + * First release! diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed649b0..f170f19 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Contributing to `loopback-explorer` is easy. In a few simple steps: * Adhere to code style outlined in the [Google C++ Style Guide][] and [Google Javascript Style Guide][]. - * Sign the [Contributor License Agreement](https://cla.strongloop.com/strongloop/loopback-explorer) + * Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-explorer) * Submit a pull request through Github. diff --git a/README.md b/README.md index 882e104..9ef49eb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ app.listen(port); ## Advanced Usage -Many aspects of the explorer are configurable. +Many aspects of the explorer are configurable. See [options](#options) for a description of these options: @@ -34,7 +34,10 @@ See [options](#options) for a description of these options: app.use('/explorer', loopback.basicAuth('user', 'password')); app.use('/explorer', explorer(app, { basePath: '/custom-api-root', - swaggerDistRoot: '/swagger', + uiDirs: [ + path.resolve(__dirname, 'public'), + path.resolve(__dirname, 'node_modules', 'swagger-ui') + ] apiInfo: { 'title': 'My API', 'description': 'Explorer example app.' @@ -67,27 +70,27 @@ Options are passed to `explorer(app, options)`. > and thus needs to report its endpoints as `https`, even though incoming traffic is auto-detected > as `http`. -`swaggerDistRoot`: **String** +`uiDirs`: **Array of Strings** -> Sets a path within your application for overriding Swagger UI files. +> Sets a list of paths within your application for overriding Swagger UI files. -> If present, will search `swaggerDistRoot` first when attempting to load Swagger UI, allowing -> you to pick and choose overrides to the interface. Use this to style your explorer or -> add additional functionality. +> If present, will search `uiDirs` first when attempting to load Swagger UI, +> allowing you to pick and choose overrides to the interface. Use this to +> style your explorer or add additional functionality. > See [index.html](public/index.html), where you may want to begin your overrides. > The rest of the UI is provided by [Swagger UI](https://github.com/wordnik/swagger-ui). `apiInfo`: **Object** -> Additional information about your API. See the +> Additional information about your API. See the > [spec](https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#513-info-object). `resourcePath`: **String** > Default: `'resources'` -> Sets a different path for the +> Sets a different path for the > [resource listing](https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#51-resource-listing). > You generally shouldn't have to change this. diff --git a/example/simple.js b/example/simple.js index 3705ca5..70937cd 100644 --- a/example/simple.js +++ b/example/simple.js @@ -3,7 +3,7 @@ var app = loopback(); var explorer = require('../'); var port = 3000; -var Product = loopback.Model.extend('product', { +var Product = loopback.PersistedModel.extend('product', { foo: {type: 'string', required: true}, bar: 'string', aNum: {type: 'number', min: 1, max: 10, required: true, default: 5} @@ -14,6 +14,6 @@ app.model(Product); var apiPath = '/api'; app.use('/explorer', explorer(app, {basePath: apiPath})); app.use(apiPath, loopback.rest()); -console.log('Explorer mounted at localhost:' + port + '/explorer'); +console.log('Explorer mounted at http://localhost:' + port + '/explorer'); app.listen(port); diff --git a/index.js b/index.js index 6c5e003..6048c3a 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ var url = require('url'); var path = require('path'); var urlJoin = require('./lib/url-join'); -var _defaults = require('lodash.defaults'); +var _defaults = require('lodash').defaults; var express = require('express'); var swagger = require('./lib/swagger'); var SWAGGER_UI_ROOT = require('swagger-ui').dist; @@ -47,15 +47,29 @@ function explorer(loopbackApplication, options) { }); }); - // Allow specifying a static file root for swagger files. Any files in - // that folder will override those in the swagger-ui distribution. - // In this way one could e.g. make changes to index.html without having + // Allow specifying a static file roots for swagger files. Any files in + // these folders will override those in the swagger-ui distribution. + // In this way one could e.g. make changes to index.html without having // to worry about constantly pulling in JS updates. + if (options.uiDirs) { + if (typeof options.uiDirs === 'string') { + app.use(express.static(options.uiDirs)); + } else if (Array.isArray(options.uiDirs)) { + options.uiDirs.forEach(function(dir) { + app.use(express.static(dir)); + }); + } + } + if (options.swaggerDistRoot) { + console.warn('loopback-explorer: `swaggerDistRoot` is deprecated,' + + ' use `uiDirs` instead'); app.use(express.static(options.swaggerDistRoot)); } + // File in node_modules are overridden by a few customizations app.use(express.static(STATIC_ROOT)); + // Swagger UI distribution app.use(express.static(SWAGGER_UI_ROOT)); diff --git a/lib/class-helper.js b/lib/class-helper.js index e060d98..761b018 100644 --- a/lib/class-helper.js +++ b/lib/class-helper.js @@ -4,6 +4,7 @@ * Module dependencies. */ var modelHelper = require('./model-helper'); +var typeConverter = require('./type-converter'); var urlJoin = require('./url-join'); /** @@ -22,11 +23,16 @@ var classHelper = module.exports = { * @return {Object} API Declaration. */ generateAPIDoc: function(aClass, opts) { + var resourcePath = urlJoin('/', aClass.name); + if(aClass.http && aClass.http.path) { + resourcePath = aClass.http.path; + } + return { apiVersion: opts.version || '1', swaggerVersion: opts.swaggerVersion, basePath: opts.basePath, - resourcePath: urlJoin('/', opts.resourcePath), + resourcePath: urlJoin('/', resourcePath), apis: [], consumes: aClass.http.consumes || opts.consumes, produces: aClass.http.produces || opts.produces, @@ -41,10 +47,12 @@ var classHelper = module.exports = { * @return {Object} API declaration reference. */ generateResourceDocAPIEntry: function(aClass) { - var description = aClass.ctor.settings.description || aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description; + var description = aClass.ctor.settings.description || + aClass.ctor.sharedCtor && aClass.ctor.sharedCtor.description; + return { path: aClass.http.path, - description: Array.isArray(description) ? description.join('') : description + description: typeConverter.convertText(description) }; } }; diff --git a/lib/model-helper.js b/lib/model-helper.js index 733ab66..a3921fc 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -3,9 +3,11 @@ /** * Module dependencies. */ -var _cloneDeep = require('lodash.clonedeep'); +var _cloneDeep = require('lodash').cloneDeep; +var _pick = require('lodash').pick; var translateDataTypeKeys = require('./translate-data-type-keys'); var TYPES_PRIMITIVE = ['array', 'boolean', 'integer', 'number', 'null', 'object', 'string', 'any']; +var typeConverter = require('./type-converter'); /** * Export the modelHelper singleton. @@ -39,8 +41,15 @@ var modelHelper = module.exports = { }; var def = modelClass.definition; - var name = def.name; var out = definitions || {}; + + if (!def) { + // The model does not have any definition, it was most likely + // created as a placeholder for an unknown property type + return out; + } + + var name = def.name; if (out[name]) { // The model is already included return out; @@ -77,13 +86,17 @@ var modelHelper = module.exports = { } // Eke a type out of the constructors we were passed. - prop = modelHelper.LDLPropToSwaggerDataType(prop); - processType(modelClass.app, prop.type, referencedModels); - if (prop.items) { - processType(modelClass.app, prop.items.type, referencedModels); - convertTypeTo$Ref(prop.items); + var swaggerType = modelHelper.LDLPropToSwaggerDataType(prop); + processType(modelClass.app, swaggerType.type, referencedModels); + convertTypeTo$Ref(swaggerType); + if (swaggerType.items) { + processType(modelClass.app, swaggerType.items.type, referencedModels); + convertTypeTo$Ref(swaggerType.items); } + var desc = typeConverter.convertText(prop.description || prop.doc); + if (desc) swaggerType.description = desc; + // Required props sit in a per-model array. if (prop.required || (prop.id && !prop.generated)) { required.push(key); @@ -92,19 +105,17 @@ var modelHelper = module.exports = { // Change mismatched keys. prop = translateDataTypeKeys(prop); - convertTypeTo$Ref(prop); - delete prop.required; delete prop.id; if (prop.description){ - prop.description = Array.isArray(prop.description) ? prop.description.join('') : prop.description; + prop.description = typeConverter.convertText(prop.description); } // Assign this back to the properties object. - properties[key] = prop; + properties[key] = swaggerType; - var propType = def.properties[key].type; + var propType = prop.type; if (typeof propType === 'function' && propType.modelName) { if (referencedModels.indexOf(propType) === -1) { referencedModels.push(propType); @@ -133,12 +144,13 @@ var modelHelper = module.exports = { out[name] = { id: name, additionalProperties: additionalProperties, + description: typeConverter.convertText(def.description), properties: properties, required: required }; if (def.description){ - out[name].description = Array.isArray(def.description) ? def.description.join('') : def.description; + out[name].description = typeConverter.convertText(def.description); } // Generate model definitions for related models @@ -195,9 +207,12 @@ var modelHelper = module.exports = { if (typeof propType === 'function') { // See https://github.com/strongloop/loopback-explorer/issues/32 // The type can be a model class - propType = propType.modelName || propType.name.toLowerCase(); - } else if(Array.isArray(propType)) { - propType = 'array'; + return propType.modelName || propType.name.toLowerCase(); + } else if (Array.isArray(propType)) { + return 'array'; + } else if (typeof propType === 'object') { + // Anonymous objects, they are allowed e.g. in accepts/returns definitions + return 'object'; } return propType; }, @@ -211,38 +226,51 @@ var modelHelper = module.exports = { // Converts a prop defined with the LDL spec to one conforming to the // Swagger spec. // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#431-primitives - LDLPropToSwaggerDataType: function LDLPropToSwaggerDataType(prop) { - if (typeof prop === 'string') { - prop = { - type: prop - } - } - var out = _cloneDeep(prop); - out.type = modelHelper.getPropType(out.type); + LDLPropToSwaggerDataType: function LDLPropToSwaggerDataType(ldlType) { + var SWAGGER_DATA_TYPE_FIELDS = [ + 'format', + 'defaultValue', + 'enum', + 'minimum', + 'maximum', + 'uniqueItems', + // loopback-explorer extensions + 'length', + // https://www.npmjs.org/package/swagger-validation + 'pattern' + ]; - if (out.type === 'array') { - var hasItemType = Array.isArray(prop.type) && prop.type.length; - var arrayItem = hasItemType && prop.type[0]; + // Rename LoopBack keys to Swagger keys + ldlType = translateDataTypeKeys(ldlType); + + // Pick only keys supported by Swagger + var swaggerType = _pick(ldlType, SWAGGER_DATA_TYPE_FIELDS); + + swaggerType.type = modelHelper.getPropType(ldlType.type || ldlType); + + if (swaggerType.type === 'array') { + var hasItemType = Array.isArray(ldlType.type) && ldlType.type.length; + var arrayItem = hasItemType && ldlType.type[0]; if (arrayItem) { if(typeof arrayItem === 'object') { - out.items = modelHelper.LDLPropToSwaggerDataType(arrayItem); + swaggerType.items = modelHelper.LDLPropToSwaggerDataType(arrayItem); } else { - out.items = { type: modelHelper.getPropType(arrayItem) }; + swaggerType.items = { type: modelHelper.getPropType(arrayItem) }; } } else { // NOTE: `any` is not a supported type in swagger 1.2 - out.items = { type: 'any' }; + swaggerType.items = { type: 'any' }; } - } else if (out.type === 'date') { - out.type = 'string'; - out.format = 'date'; - } else if (out.type === 'buffer') { - out.type = 'string'; - out.format = 'byte'; - } else if (out.type === 'number') { - out.format = 'double'; // Since all JS numbers are doubles + } else if (swaggerType.type === 'date') { + swaggerType.type = 'string'; + swaggerType.format = 'date'; + } else if (swaggerType.type === 'buffer') { + swaggerType.type = 'string'; + swaggerType.format = 'byte'; + } else if (swaggerType.type === 'number') { + swaggerType.format = 'double'; // Since all JS numbers are doubles } - return out; + return swaggerType; } }; \ No newline at end of file diff --git a/lib/route-helper.js b/lib/route-helper.js index c615d93..32e041d 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -5,9 +5,10 @@ */ var debug = require('debug')('loopback:explorer:routeHelpers'); -var _cloneDeep = require('lodash.clonedeep'); -var translateDataTypeKeys = require('./translate-data-type-keys'); +var _cloneDeep = require('lodash').cloneDeep; +var _assign = require('lodash').assign; var modelHelper = require('./model-helper'); +var typeConverter = require('./type-converter'); /** * Export the routeHelper singleton. @@ -61,13 +62,15 @@ var routeHelper = module.exports = { if (typeof arg.http === 'function') return false; // Don't show arguments set to the incoming http request. // Please note that body needs to be shown, such as User.create(). - if (arg.http.source === 'req') return false; + if (arg.http.source === 'req' || + arg.http.source === 'res' || + arg.http.source === 'context') { + + return false; + } return true; }); - // Translate LDL keys to Swagger keys. - accepts = accepts.map(translateDataTypeKeys); - // Turn accept definitions in to parameter docs. accepts = accepts.map(routeHelper.acceptToParameter(route)); @@ -92,19 +95,19 @@ var routeHelper = module.exports = { } } - // Translate LDL keys to Swagger keys. - var returns = routeReturns.map(translateDataTypeKeys); - - // Convert `returns` into a single object for later conversion into an + // Convert `returns` into a single object for later conversion into an // operation object. - if (returns && returns.length > 1) { + if (routeReturns && routeReturns.length > 1) { // TODO ad-hoc model definition in the case of multiple return values. - returns = {model: 'object'}; + routeReturns = { type: 'object' }; } else { - returns = returns[0] || {}; + // Per the spec: + // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#523-operation-object + // This is the only object that may have a type of 'void'. + routeReturns = routeReturns[0] || { type: 'void' }; } - return returns; + return routeReturns; }, /** @@ -181,23 +184,38 @@ var routeHelper = module.exports = { debug('route %j', route); + var responseDoc = modelHelper.LDLPropToSwaggerDataType(returns); + + var responseMessages = [{ + code: route.returns && route.returns.length ? 200 : 204, + message: 'Request was successful' + }]; + + if (route.errors) { + responseMessages.push.apply(responseMessages, route.errors); + } + var apiDoc = { path: routeHelper.convertPathFragments(route.path), - // Create the operation doc. Use `extendWithType` to add the necessary - // `items` and `format` fields. + // Create the operation doc. + // We are using extendWithType to use `type` for the top-level (200) + // response type. We use responseModels for error responses. + // see https://github.com/strongloop/loopback-explorer/issues/75 operations: [routeHelper.extendWithType({ method: routeHelper.convertVerb(route.verb), - // [rfeng] Swagger UI doesn't escape '.' for jQuery selector - nickname: route.method.replace(/\./g, '_'), + // [strml] remove leading model name from op, swagger uses leading + // path as class name so it remains unique between models. + // route.method is always #{className}.#{methodName} + nickname: route.method.replace(/.*?\./, ''), deprecated: route.deprecated, - type: returns.model || returns.type || 'void', - summary: Array.isArray(route.description) ? route.description.join('') : route.description, // TODO(schoon) - Excerpt? - notes: Array.isArray(route.notes) ? route.notes.join('') : route.notes, // TODO(schoon) - `description` metadata? consumes: ['application/json', 'application/xml', 'text/xml'], produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], parameters: accepts, - responseMessages: responseMessages - })] + responseMessages: responseMessages, + type: returns.model || returns.type || 'void', + summary: typeConverter.convertText(route.description), + notes: typeConverter.convertText(route.notes) + }, returns)] }; return apiDoc; @@ -264,10 +282,10 @@ var routeHelper = module.exports = { minimum: accepts.minimum, maximum: accepts.maximum, allowMultiple: accepts.allowMultiple, - description: Array.isArray(accepts.description) ? accepts.description.join('') : accepts.description + description: typeConverter.convertText(accepts.description) }; - out = routeHelper.extendWithType(out); + out = routeHelper.extendWithType(out, accepts); // HACK: Derive the type from model if(out.name === 'data' && out.type === 'object') { @@ -279,38 +297,41 @@ var routeHelper = module.exports = { }, /** - * Extends an Operation Object or Parameter object with + * Extends an Operation Object or Parameter object with * a proper Swagger type and optional `format` and `items` fields. * Does not modify original object. * @param {Object} obj Object to extend. - * @return {Object} Extended object. + * @param {Object} ldlType LDL type definition + * @return {Object} Extended object. */ - extendWithType: function extendWithType(obj) { + extendWithType: function extendWithType(obj, ldlType) { obj = _cloneDeep(obj); // Format the `type` property using our LDL converter. - var typeDesc = modelHelper - .LDLPropToSwaggerDataType({type: obj.model || obj.type}); + var typeDesc = modelHelper.LDLPropToSwaggerDataType(ldlType); + // The `typeDesc` may have additional attributes, such as // `format` for non-primitive types. Object.keys(typeDesc).forEach(function(key){ obj[key] = typeDesc[key]; }); - //Ensure brief properties are first - if (typeof obj === 'object') { - var keysToSink = ['authorizations', 'consumes', 'notes', 'produces', - 'parameters', 'responseMessages', 'summary']; - var outKeys = Object.keys(obj); - for (var outKeyIdx in outKeys) { - var outKey = outKeys[outKeyIdx]; - if (keysToSink.indexOf(outKey) != -1) { - var outValue = obj[outKey]; - delete obj[outKey]; - obj[outKey] = outValue; - } - } - } + //Ensure brief properties are first + if (typeof obj === 'object') { + var keysToSink = ['authorizations', 'consumes', 'notes', 'produces', + 'parameters', 'responseMessages', 'summary']; + var outKeys = Object.keys(obj); + for (var outKeyIdx in outKeys) { + var outKey = outKeys[outKeyIdx]; + if (keysToSink.indexOf(outKey) != -1) { + var outValue = obj[outKey]; + delete obj[outKey]; + obj[outKey] = outValue; + } + } + } + + _assign(obj, typeDesc); return obj; } diff --git a/lib/swagger.js b/lib/swagger.js index 553cddb..908b155 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -9,10 +9,13 @@ module.exports = Swagger; */ var path = require('path'); var urlJoin = require('./url-join'); -var _defaults = require('lodash.defaults'); +var _defaults = require('lodash').defaults; var classHelper = require('./class-helper'); var routeHelper = require('./route-helper'); -var _cloneDeep = require('lodash.clonedeep'); +var _cloneDeep = require('lodash').cloneDeep; +var modelHelper = require('./model-helper'); +var cors = require('cors'); +var typeConverter = require('./type-converter'); /** * Create a remotable Swagger module for plugging into `RemoteObjects`. @@ -23,13 +26,25 @@ var _cloneDeep = require('lodash.clonedeep'); * @param {Object} opts Options. */ function Swagger(loopbackApplication, swaggerApp, opts) { + if (opts && opts.swaggerVersion) + console.warn('loopback-explorer\'s options.swaggerVersion is deprecated.'); + opts = _defaults(opts || {}, { swaggerVersion: '1.2', basePath: loopbackApplication.get('restApiRoot') || '/api', resourcePath: 'resources', // Default consumes/produces - consumes: ['application/json', 'application/x-www-form-urlencoded', 'application/xml', 'text/xml'], - produces: ['application/json', 'application/javascript', 'application/xml', 'text/javascript', 'text/xml'], + consumes: [ + 'application/json', + 'application/x-www-form-urlencoded', + 'application/xml', 'text/xml' + ], + produces: [ + 'application/json', + 'application/xml', 'text/xml', + // JSONP content types + 'application/javascript', 'text/javascript' + ], version: getVersion() }); @@ -39,6 +54,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) { var routes = adapter.allRoutes(); var classes = remotes.classes(); + setupCors(swaggerApp, remotes); + // These are the docs we will be sending from the /swagger endpoints. var resourceDoc = generateResourceDoc(opts); var apiDocs = {}; @@ -46,15 +63,15 @@ function Swagger(loopbackApplication, swaggerApp, opts) { // A class is an endpoint root; e.g. /users, /products, and so on. classes.forEach(function (aClass) { var doc = apiDocs[aClass.name] = classHelper.generateAPIDoc(aClass, opts); - var hasPublic = false; + var hasDocumented = false; var methods = aClass.methods() for (var methodKey in methods) { - hasPublic = methods[methodKey].public; - if (hasPublic) { + hasDocumented = methods[methodKey].documented; + if (hasDocumented) { break; } } - if (hasPublic) { + if (hasDocumented) { resourceDoc.apis.push(classHelper.generateResourceDocAPIEntry(aClass)); } @@ -77,14 +94,59 @@ function Swagger(loopbackApplication, swaggerApp, opts) { return item.name === className; })[0]; - if (route.public) { + if (route.documented) { routeHelper.addRouteToAPIDeclaration(route, classDef, doc); } }); + // Add models referenced from routes (e.g. accepts/returns) + Object.keys(apiDocs).forEach(function(className) { + var classDoc = apiDocs[className]; + classDoc.apis.forEach(function(api) { + api.operations.forEach(function(routeDoc) { + routeDoc.parameters.forEach(function(param) { + var type = param.type; + if (type === 'array' && param.items) + type = param.items.type; + + addTypeToModels(type); + }); + + if (routeDoc.type === 'array') { + addTypeToModels(routeDoc.items.type); + } else { + addTypeToModels(routeDoc.type); + } + + routeDoc.responseMessages.forEach(function(msg) { + addTypeToModels(msg.responseModel); + }); + + function addTypeToModels(name) { + if (!name || name === 'void') return; + + var model = loopbackApplication.models[name]; + if (!model) { + var loopback = loopbackApplication.loopback; + if (!loopback) return; + + if (loopback.findModel) { + model = loopback.findModel(name); // LoopBack 2.x + } else { + model = loopback.getModel(name); // LoopBack 1.x + } + } + if (!model) return; + + modelHelper.generateModelDefinition(model, classDoc.models); + } + }); + }); + }); + /** - * The topmost Swagger resource is a description of all (non-Swagger) - * resources available on the system, and where to find more + * The topmost Swagger resource is a description of all (non-Swagger) + * resources available on the system, and where to find more * information about them. */ addRoute(swaggerApp, opts.resourcePath, resourceDoc, opts); @@ -92,6 +154,13 @@ function Swagger(loopbackApplication, swaggerApp, opts) { loopbackApplication.emit('swaggerResources', resourceDoc); } +function setupCors(swaggerApp, remotes) { + var corsOptions = remotes.options && remotes.options.cors || + { origin: true, credentials: true }; + + swaggerApp.use(cors(corsOptions)); +} + /** * Add a route to this remoting extension. * @param {Application} app Express application. @@ -103,21 +172,28 @@ function addRoute(app, uri, doc, opts) { var hasBasePath = Object.keys(doc).indexOf('basePath') !== -1; var initialPath = doc.basePath || ''; + // Remove the trailing slash, see + // https://github.com/strongloop/loopback-explorer/issues/48 + if (initialPath[initialPath.length-1] === '/') + initialPath = initialPath.slice(0, -1); + app.get(urlJoin('/', uri), function(req, res) { // There's a few forces at play that require this "hack". The Swagger spec - // requires a `basePath` to be set in the API descriptions. However, we - // can't guarantee this path is either reachable or desirable if it's set + // requires a `basePath` to be set in the API descriptions. However, we + // can't guarantee this path is either reachable or desirable if it's set // as a part of the options. - // - // The simplest way around this is to reflect the value of the `Host` HTTP - // header as the `basePath`. Because we pre-build the Swagger data, we don't - // know that header at the time the data is built. + // + // The simplest way around this is to reflect the value of the `Host` and/or + // `X-Forwarded-Host` HTTP headers as the `basePath`. + // Because we pre-build the Swagger data, we don't know that header at + // the time the data is built. if (hasBasePath) { var headers = req.headers; - var host = headers['x-forwarded-host'] || headers['X-Forwarded-Host'] || headers.Host || headers.host; - var protocol = headers['x-forwarded-proto'] || headers['X-Forwarded-Proto'] || opts.protocol || req.protocol - doc.basePath = protocol + '://' + host + initialPath; + // NOTE header names (keys) are always all-lowercase + var proto = headers['x-forwarded-proto'] || opts.protocol || req.protocol; + var host = headers['x-forwarded-host'] || headers.host; + doc.basePath = proto + '://' + host + initialPath; } res.status(200).send(doc); }); @@ -133,7 +209,7 @@ function generateResourceDoc(opts) { var apiInfo = _cloneDeep(opts.apiInfo); for (var propertyName in apiInfo) { var property = apiInfo[propertyName]; - apiInfo[propertyName] = Array.isArray(property) ? property.join('') : property; + apiInfo[propertyName] = typeConverter.convertText(property); } return { @@ -159,7 +235,7 @@ function getVersion() { try { version = require(path.join(process.cwd(), 'package.json')).version; } catch(e) { - version = '1'; + version = '1.0.0'; } return version; } diff --git a/lib/translate-data-type-keys.js b/lib/translate-data-type-keys.js index a47c85d..d2ca63a 100644 --- a/lib/translate-data-type-keys.js +++ b/lib/translate-data-type-keys.js @@ -4,12 +4,11 @@ * Module dependencies. */ -var _cloneDeep = require('lodash.clonedeep'); +var _cloneDeep = require('lodash').cloneDeep; // Keys that are different between LDL and Swagger var KEY_TRANSLATIONS = { // LDL : Swagger - 'doc': 'description', 'default': 'defaultValue', 'min': 'minimum', 'max': 'maximum' diff --git a/lib/type-converter.js b/lib/type-converter.js new file mode 100644 index 0000000..c7eb686 --- /dev/null +++ b/lib/type-converter.js @@ -0,0 +1,14 @@ +var typeConverter = module.exports = { + + /** + * Convert a text value that can be expressed either as a string or + * as an array of strings. + * @param {string|Array} value + * @returns {string} + */ + convertText: function(value) { + if (Array.isArray(value)) + return value.join('\n'); + return value; + } +}; diff --git a/package.json b/package.json index 707673a..bf457ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.2.13", + "version": "1.7.1", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { @@ -21,20 +21,20 @@ "url": "https://github.com/strongloop/loopback-explorer/issues" }, "devDependencies": { - "loopback": "git+https://github.com/shelbys/loopback.git", - "mocha": "~1.20.1", - "supertest": "~0.13.0", - "chai": "~1.9.1" + "loopback": "git+https://github.com/shelbys/loopback.git#validate_param_enum", + "mocha": "^2.2.5", + "supertest": "~1.0.1", + "chai": "^2.3.0" }, "license": { "name": "Dual MIT/StrongLoop", "url": "https://github.com/strongloop/loopback-explorer/blob/master/LICENSE" }, "dependencies": { - "swagger-ui": "git+https://github.com/shelbys/swagger-ui.git", + "cors": "^2.4.2", "debug": "~1.0.3", - "lodash.clonedeep": "^2.4.1", - "lodash.defaults": "^2.4.1", - "express": "3.x" + "express": "3.x", + "lodash": "^2.4.1", + "swagger-ui": "git+https://github.com/shelbys/swagger-ui.git" } } diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index 53a6283..babf1a7 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -34,6 +34,7 @@ color: #080; } +<<<<<<< HEAD .contentWell { padding-left: 30px; padding-right: 30px; @@ -42,4 +43,14 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. */ +======= +/* Improve spacing when the browser window is small */ +#message-bar, #swagger-ui-container { + padding-left: 30px; + padding-right: 30px; +} +>>>>>>> upstream/master +#api_selector { + padding: 0px 20px; +} diff --git a/public/index.html b/public/index.html index cae33f7..5696c68 100644 --- a/public/index.html +++ b/public/index.html @@ -1,30 +1,29 @@ - StrongLoop API Explorer - - - - - - - - - - - - - - - - - + + StrongLoop API Explorer + + + + + + + + + + + + + + + - - + + - - + + diff --git a/public/lib/loadSwaggerUI.js b/public/lib/loadSwaggerUI.js index c89917b..8cea670 100644 --- a/public/lib/loadSwaggerUI.js +++ b/public/lib/loadSwaggerUI.js @@ -3,9 +3,10 @@ // Refactoring of inline script from index.html. /*global SwaggerUi, log, ApiKeyAuthorization, hljs, window, $ */ $(function() { + var lsKey = 'swagger_accessToken'; $.getJSON('config.json', function(config) { - log(config); - loadSwaggerUi(config); + log(config); + loadSwaggerUi(config); }); var accessToken; @@ -35,6 +36,14 @@ $(function() { $('#api_selector').submit(setAccessToken); $('#input_accessToken').keyup(onInputChange); + // Recover accessToken from localStorage if present. + if (window.localStorage) { + var key = window.localStorage.getItem(lsKey); + if (key) { + $('#input_accessToken').val(key).submit(); + } + } + window.swaggerUi.load(); } @@ -49,6 +58,22 @@ $(function() { accessToken = key; $('.accessTokenDisplay').text('Token Set.').addClass('set'); $('.accessTokenDisplay').attr('data-tooltip', 'Current Token: ' + key); + + // Save this token to localStorage if we can to make it persist on refresh. + if (window.localStorage) { + window.localStorage.setItem(lsKey, key); + } + } + // If submitted with an empty token, remove the current token. Can be + // useful to intentionally remove authorization. + else { + log('removed accessToken.'); + $('.accessTokenDisplay').text('Token Not Set.').removeClass('set'); + $('.accessTokenDisplay').removeAttr('data-tooltip'); + window.authorizations.remove('key'); + if (window.localStorage) { + window.localStorage.removeItem(lsKey); + } } } diff --git a/test/class-helper.test.js b/test/class-helper.test.js index 63e88cb..80cbe49 100644 --- a/test/class-helper.test.js +++ b/test/class-helper.test.js @@ -1,11 +1,31 @@ -/** - * Created by ytang on 4/7/15. - */ +'use strict'; + var classHelper = require('../lib/class-helper'); -var loopback = require('loopback'); var expect = require('chai').expect; +var _defaults = require('lodash').defaults; +var loopback = require('loopback'); describe('class-helper', function() { + it('joins array descriptions', function() { + var doc = generateResourceDocAPIEntry({ + ctor: { settings: { description: [ 'line1', 'line2' ] } } + }); + + expect(doc.description).to.equal('line1\nline2'); + }); + + it('sets resourcePath from aClass.http.path', function() { + var doc = generateAPIDoc({}, 'otherPath'); + + expect(doc.resourcePath).to.equal('/otherPath'); + }); + + it('sets resourcePath from aClass.name', function() { + var doc = generateAPIDoc({}); + + expect(doc.resourcePath).to.equal('/test'); + }); + describe('#generateResourceDocAPIEntry', function() { describe('when ctor.settings.description is an array of string', function() { it('should return description as a string', function() { @@ -21,7 +41,7 @@ describe('class-helper', function() { }; var result = classHelper.generateResourceDocAPIEntry(aClass); - expect(result.description).to.eql('123'); + expect(result.description).to.eql("1\n2\n3"); }); }); @@ -40,8 +60,24 @@ describe('class-helper', function() { }; var result = classHelper.generateResourceDocAPIEntry(aClass); - expect(result.description).to.eql('123'); + expect(result.description).to.eql("1\n2\n3"); }); }); }); -}); \ No newline at end of file +}); + +// Easy wrapper around createRoute +function generateResourceDocAPIEntry(def) { + return classHelper.generateResourceDocAPIEntry(_defaults(def, { + http: { path: '/test' }, + ctor: { settings: { } } + })); +} + +function generateAPIDoc(def, httpPath) { + return classHelper.generateAPIDoc(_defaults(def, { + http: { path: httpPath || null }, + name: 'test', + ctor: { settings: { } } + }), {resourcePath: 'resources'}); +} diff --git a/test/explorer.test.js b/test/explorer.test.js index e53c4d9..431fd3f 100644 --- a/test/explorer.test.js +++ b/test/explorer.test.js @@ -2,7 +2,10 @@ var loopback = require('loopback'); var explorer = require('../'); var request = require('supertest'); var assert = require('assert'); +var path = require('path'); var expect = require('chai').expect; +var urlJoin = require('../lib/url-join'); +var os = require('os'); describe('explorer', function() { @@ -24,7 +27,7 @@ describe('explorer', function() { .end(function(err, res) { if (err) throw err; - assert(!!~res.text.indexOf('StrongLoop API Explorer'), + assert(!!~res.text.indexOf('StrongLoop API Explorer'), 'text does not contain expected string'); done(); }); @@ -77,6 +80,83 @@ describe('explorer', function() { done(); }); }); + + it('removes trailing slash from baseUrl', function(done) { + // SwaggerUI builds resource URL by concatenating basePath + resourcePath + // Since the resource paths are always startign with a slash, + // if the basePath ends with a slash too, an incorrect URL is produced + var app = loopback(); + app.set('restApiRoot', '/'); + configureRestApiAndExplorer(app); + + request(app) + .get('/explorer/resources/products') + .expect(200) + .end(function(err, res) { + if (err) return done(err); + var baseUrl = res.body.basePath; + var apiPath = res.body.apis[0].path; + expect(baseUrl + apiPath).to.match(/http:\/\/[^\/]+\/products/); + done(); + }); + }); + }); + + describe('with custom front-end files', function() { + var app; + beforeEach(function setupExplorerWithUiDirs() { + app = loopback(); + app.use('/explorer', explorer(app, { + uiDirs: [ path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui') ] + })); + }); + + it('overrides swagger-ui files', function(done) { + request(app).get('/explorer/swagger-ui.js') + .expect(200) + // expect the content of `dummy-swagger-ui/swagger-ui.js` + .expect('/* custom swagger-ui file */' + os.EOL) + .end(done); + }); + + it('overrides strongloop overrides', function(done) { + request(app).get('/explorer/') + .expect(200) + // expect the content of `dummy-swagger-ui/index.html` + .expect('custom index.html' + os.EOL) + .end(done); + }); + }); + + describe('when specifying custom static file root directories', function() { + var app; + beforeEach(function() { + app = loopback(); + }); + + it('should allow `uiDirs` to be defined as an Array', function(done) { + app.use('/explorer', explorer(app, { + uiDirs: [ path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui') ] + })); + + request(app).get('/explorer/') + .expect(200) + // expect the content of `dummy-swagger-ui/index.html` + .expect('custom index.html' + os.EOL) + .end(done); + }); + + it('should allow `uiDirs` to be defined as an String', function(done) { + app.use('/explorer', explorer(app, { + uiDirs: path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui') + })); + + request(app).get('/explorer/') + .expect(200) + // expect the content of `dummy-swagger-ui/index.html` + .expect('custom index.html' + os.EOL) + .end(done); + }); }); function givenLoopBackAppWithExplorer(explorerBase) { @@ -88,7 +168,7 @@ describe('explorer', function() { } function configureRestApiAndExplorer(app, explorerBase) { - var Product = loopback.Model.extend('product'); + var Product = loopback.PersistedModel.extend('product'); Product.attachTo(loopback.memory()); app.model(Product); diff --git a/test/fixtures/dummy-swagger-ui/index.html b/test/fixtures/dummy-swagger-ui/index.html new file mode 100644 index 0000000..f6c3a1f --- /dev/null +++ b/test/fixtures/dummy-swagger-ui/index.html @@ -0,0 +1 @@ +custom index.html diff --git a/test/fixtures/dummy-swagger-ui/swagger-ui.js b/test/fixtures/dummy-swagger-ui/swagger-ui.js new file mode 100644 index 0000000..55f593f --- /dev/null +++ b/test/fixtures/dummy-swagger-ui/swagger-ui.js @@ -0,0 +1 @@ +/* custom swagger-ui file */ diff --git a/test/model-helper.test.js b/test/model-helper.test.js index 4b6b57a..7de1b1f 100644 --- a/test/model-helper.test.js +++ b/test/model-helper.test.js @@ -1,6 +1,7 @@ 'use strict'; var modelHelper = require('../lib/model-helper'); +var _defaults = require('lodash').defaults; var loopback = require('loopback'); var expect = require('chai').expect; @@ -122,6 +123,27 @@ describe('model-helper', function() { }); }); + + it('converts model property field `doc`', function() { + var def = buildSwaggerModels({ + name: { type: String, doc: 'a-description' } + }); + var nameProp = def.properties.name; + expect(nameProp).to.have.property('description', 'a-description'); + }); + + it('converts model property field `description`', function() { + var def = buildSwaggerModels({ + name: { type: String, description: 'a-description' } + }); + var nameProp = def.properties.name; + expect(nameProp).to.have.property('description', 'a-description'); + }); + + it('converts model field `description`', function() { + var def = buildSwaggerModels({}, { description: 'a-description' }); + expect(def).to.have.property('description', 'a-description'); + }); }); describe('related models', function() { @@ -138,7 +160,7 @@ describe('model-helper', function() { var Model1 = loopback.createModel('Model1', { str: String, // 'string' address: Model2 - }); + }, { models: { Model2: Model2 } }); var defs = modelHelper.generateModelDefinition(Model1, {}); expect(defs).has.property('Model1'); expect(defs).has.property('Model2'); @@ -147,7 +169,7 @@ describe('model-helper', function() { it('should include used models', function() { var Model4 = loopback.createModel('Model4', {street: String}); var Model3 = loopback.createModel('Model3', { - str: String, // 'string' + str: String // 'string' }, {models: {model4: 'Model4'}}); var defs = modelHelper.generateModelDefinition(Model3, {}); expect(defs).has.property('Model3'); @@ -159,7 +181,7 @@ describe('model-helper', function() { var Model5 = loopback.createModel('Model5', { str: String, // 'string' addresses: [Model6] - }); + }, { models: { Model6: Model6 } }); var defs = modelHelper.generateModelDefinition(Model5, {}); expect(defs).has.property('Model5'); expect(defs).has.property('Model6'); @@ -176,6 +198,18 @@ describe('model-helper', function() { expect(Object.keys(defs)).has.property('length', 1); }); + // https://github.com/strongloop/loopback-explorer/issues/71 + it('should skip unknown types', function() { + var Model8 = loopback.createModel('Model8', { + patient: { + model: 'physician', + type: 'hasMany', + through: 'appointment' + } + }); + var defs = modelHelper.generateModelDefinition(Model8, {}); + expect(Object.keys(defs)).to.not.contain('hasMany'); + }); }); describe('hidden properties', function() { @@ -193,53 +227,66 @@ describe('model-helper', function() { }); }); - describe('#generateModelDefinition', function(){ - it('should convert top level array description to string', function(){ + describe('#generateModelDefinition', function() { + it('should convert top level array description to string', function () { var model = {}; model.definition = { name: 'test', - description: ['1','2','3'], + description: ['1', '2', '3'], properties: {} }; var models = {}; modelHelper.generateModelDefinition(model, models); - expect(models.test.description).to.equal('123'); + expect(models.test.description).to.equal("1\n2\n3"); }); - it('should convert property level array description to string', function(){ + it('should convert property level array description to string', function () { var model = {}; model.definition = { name: 'test', properties: { prop1: { type: 'string', - description: ['1','2','3'] + description: ['1', '2', '3'] } } }; var models = {}; modelHelper.generateModelDefinition(model, models); - expect(models.test.properties.prop1.description).to.equal('123'); + expect(models.test.properties.prop1.description).to.equal("1\n2\n3"); + }); + }); + + describe('getPropType', function() { + it('converts anonymous object types', function() { + var type = modelHelper.getPropType({ name: 'string', value: 'string' }); + expect(type).to.eql('object'); }); }); }); // Simulates the format of a remoting class. -function buildSwaggerModels(model) { - var aClass = createModelCtor(model); +function buildSwaggerModels(modelProperties, modelOptions) { + var aClass = createModelCtor(modelProperties, modelOptions); return modelHelper.generateModelDefinition(aClass.ctor, {}).testModel; } -function createModelCtor(model) { - Object.keys(model).forEach(function(name) { - model[name] = {type: model[name]}; +function createModelCtor(properties, modelOptions) { + Object.keys(properties).forEach(function(name) { + var type = properties[name]; + if (typeof type !== 'object' || Array.isArray(type)) + properties[name] = { type: type }; }); + + var definition = { + name: 'testModel', + properties: properties + }; + _defaults(definition, modelOptions); + var aClass = { ctor: { - definition: { - name: 'testModel', - properties: model - } + definition: definition } }; return aClass; diff --git a/test/route-helper.test.js b/test/route-helper.test.js index addd737..d2decc3 100644 --- a/test/route-helper.test.js +++ b/test/route-helper.test.js @@ -2,7 +2,7 @@ var routeHelper = require('../lib/route-helper'); var expect = require('chai').expect; -var _defaults = require('lodash.defaults'); +var _defaults = require('lodash').defaults; describe('route-helper', function() { it('returns "object" when a route has multiple return values', function() { @@ -13,7 +13,8 @@ describe('route-helper', function() { { arg: 'avg', type: 'number' } ] }); - expect(doc.operations[0].responseMessages[0].responseModel).to.equal('object'); + expect(doc.operations[0].type).to.equal('object'); + expect(getResponseType(doc.operations[0])).to.equal(undefined); }); it('converts path params when they exist in the route name', function() { @@ -60,55 +61,194 @@ describe('route-helper', function() { ] }); var opDoc = doc.operations[0]; - expect(opDoc.responseMessages[0].responseModel).to.equal('[customType]'); + expect(getResponseType(opDoc)).to.equal(undefined); + + // NOTE(bajtos) this would be the case if there was a single response type + expect(opDoc.type).to.equal('array'); + expect(opDoc.items).to.eql({type: 'customType'}); }); it('correctly converts return types (format)', function() { var doc = createAPIDoc({ - returns: [ - {arg: 'data', type: 'buffer'} - ] + returns: [ + {arg: 'data', type: 'buffer'} + ] + }); + var opDoc = doc.operations[0]; + expect(opDoc.type).to.equal('string'); + expect(opDoc.format).to.equal('byte'); + }); + + it('includes `notes` metadata', function() { + var doc = createAPIDoc({ + notes: 'some notes' }); - var opDoc = doc.operations[0]; - expect(opDoc.responseMessages[0].responseModel).to.equal('string'); + expect(doc.operations[0].notes).to.equal('some notes'); }); describe('#acceptToParameter', function(){ it('should return function that converts accepts.description from array of string to string', function(){ var f = routeHelper.acceptToParameter({verb: 'get', path: 'path'}); var result = f({description: ['1','2','3']}); - expect(result.description).to.eql('123'); + expect(result.description).to.eql("1\n2\n3"); }); }); - describe('#routeToAPIDoc', function(){ - it('should convert route.description from array fo string to string', function(){ + describe('#routeToAPIDoc', function() { + it('should convert route.description from array fo string to string', function () { var result = routeHelper.routeToAPIDoc({ method: 'someMethod', verb: 'get', path: 'path', - description:['1','2','3'] + description: ['1', '2', '3'] }); - expect(result.operations[0].summary).to.eql('123'); + expect(result.operations[0].summary).to.eql("1\n2\n3"); }); - it('should convert route.notes from array fo string to string', function(){ + it('should convert route.notes from array fo string to string', function () { var result = routeHelper.routeToAPIDoc({ method: 'someMethod', verb: 'get', path: 'path', - notes:['1','2','3'] + notes: ['1', '2', '3'] }); - expect(result.operations[0].notes).to.eql('123'); + expect(result.operations[0].notes).to.eql("1\n2\n3"); }); }); + + it('includes `deprecated` metadata', function() { + var doc = createAPIDoc({ + deprecated: 'true' + }); + expect(doc.operations[0].deprecated).to.equal('true'); + }); + + it('joins array description/summary', function() { + var doc = createAPIDoc({ + description: [ 'line1', 'line2' ] + }); + expect(doc.operations[0].summary).to.equal('line1\nline2'); + }); + + it('joins array notes', function() { + var doc = createAPIDoc({ + notes: [ 'line1', 'line2' ] + }); + expect(doc.operations[0].notes).to.equal('line1\nline2'); + }); + + it('joins array description/summary of an input arg', function() { + var doc = createAPIDoc({ + accepts: [{ name: 'arg', description: [ 'line1', 'line2' ] }] + }); + expect(doc.operations[0].parameters[0].description).to.equal('line1\nline2'); + }); + + it('correctly does not include context params', function() { + var doc = createAPIDoc({ + accepts: [ + {arg: 'ctx', http: {source: 'context'}} + ], + path: '/test' + }); + var params = doc.operations[0].parameters; + expect(params.length).to.equal(0); + }); + + it('correctly does not include request params', function() { + var doc = createAPIDoc({ + accepts: [ + {arg: 'req', http: {source: 'req'}} + ], + path: '/test' + }); + var params = doc.operations[0].parameters; + expect(params.length).to.equal(0); + }); + + it('correctly does not include response params', function() { + var doc = createAPIDoc({ + accepts: [ + {arg: 'res', http: {source: 'res'}} + ], + path: '/test' + }); + var params = doc.operations[0].parameters; + expect(params.length).to.equal(0); + }); + + it('preserves `enum` accepts arg metadata', function() { + var doc = createAPIDoc({ + accepts: [{ name: 'arg', type: 'number', enum: [1,2,3] }] + }); + expect(doc.operations[0].parameters[0]) + .to.have.property('enum').eql([1,2,3]); + }); + + it('includes the default response message with code 200', function() { + var doc = createAPIDoc({ + returns: [{ name: 'result', type: 'object', root: true }] + }); + expect(doc.operations[0].type).to.eql('object'); + expect(doc.operations[0].responseMessages).to.eql([ + { + code: 200, + message: 'Request was successful' + } + ]); + }); + + it('uses the response code 204 when `returns` is empty', function() { + var doc = createAPIDoc({ + returns: [] + }); + expect(doc.operations[0].type).to.eql('void'); + expect(doc.operations[0].responseMessages).to.eql([ + { + code: 204, + message: 'Request was successful' + } + ]); + }); + + it('includes custom error response in `responseMessages`', function() { + var doc = createAPIDoc({ + errors: [{ + code: 422, + message: 'Validation failed', + responseModel: 'ValidationError' + }] + }); + expect(doc.operations[0].responseMessages[1]).to.eql({ + code: 422, + message: 'Validation failed', + responseModel: 'ValidationError' + }); + }); + + it('route nickname does not include model name.', function() { + var doc = createAPIDoc(); + expect(doc.operations[0].nickname).to.equal('get'); + }); + + it('route nickname with a period is shorted correctly', function() { + // Method is built by remoting to always be #{className}.#{methodName} + var doc = createAPIDoc({ + method: 'test.get.me' + }); + expect(doc.operations[0].nickname).to.eql('get.me'); + }); }); // Easy wrapper around createRoute function createAPIDoc(def) { - return routeHelper.routeToAPIDoc(_defaults(def, { + return routeHelper.routeToAPIDoc(_defaults(def || {}, { path: '/test', verb: 'GET', method: 'test.get' })); } + +function getResponseType(operationDoc) { + return operationDoc.responseMessages[0].responseModel; +} diff --git a/test/swagger.test.js b/test/swagger.test.js index 1cd0a5b..a0e2935 100644 --- a/test/swagger.test.js +++ b/test/swagger.test.js @@ -13,7 +13,7 @@ describe('swagger definition', function() { describe('basePath', function() { // No basepath on resource doc in 1.2 it('no longer exists on resource doc', function(done) { - var app = mountSwagger(); + var app = givenAppWithSwagger(); var getReq = getSwaggerResources(app); getReq.end(function(err, res) { @@ -24,7 +24,7 @@ describe('swagger definition', function() { }); it('is "http://{host}/api" by default', function(done) { - var app = mountSwagger(); + var app = givenAppWithSwagger(); var getReq = getAPIDeclaration(app, 'products'); getReq.end(function(err, res) { @@ -35,7 +35,7 @@ describe('swagger definition', function() { }); it('is "http://{host}/{basePath}" when basePath is a path', function(done){ - var app = mountSwagger({ basePath: '/api-root'}); + var app = givenAppWithSwagger({ basePath: '/api-root'}); var getReq = getAPIDeclaration(app, 'products'); getReq.end(function(err, res) { @@ -47,7 +47,7 @@ describe('swagger definition', function() { }); it('infers API basePath from app', function(done){ - var app = mountSwagger({}, {apiRoot: '/custom-api-root'}); + var app = givenAppWithSwagger({}, {apiRoot: '/custom-api-root'}); var getReq = getAPIDeclaration(app, 'products'); getReq.end(function(err, res) { @@ -60,7 +60,7 @@ describe('swagger definition', function() { it('is reachable when explorer mounting location is changed', function(done){ var explorerRoot = '/erforscher'; - var app = mountSwagger({}, {explorerRoot: explorerRoot}); + var app = givenAppWithSwagger({}, {explorerRoot: explorerRoot}); var getReq = getSwaggerResources(app, explorerRoot, 'products'); getReq.end(function(err, res) { @@ -71,7 +71,7 @@ describe('swagger definition', function() { }); it('respects a hardcoded protocol (behind SSL terminator)', function(done){ - var app = mountSwagger({protocol: 'https'}); + var app = givenAppWithSwagger({protocol: 'https'}); var getReq = getAPIDeclaration(app, 'products'); getReq.end(function(err, res) { @@ -81,11 +81,35 @@ describe('swagger definition', function() { done(); }); }); + + it('respects X-Forwarded-Host header (behind a proxy)', function(done) { + var app = givenAppWithSwagger(); + getAPIDeclaration(app, 'products') + .set('X-Forwarded-Host', 'example.com') + .end(function(err, res) { + if (err) return done(err); + var baseUrl = url.parse(res.body.basePath); + expect(baseUrl.hostname).to.equal('example.com'); + done(); + }); + }); + + it('respects X-Forwarded-Proto header (behind a proxy)', function(done) { + var app = givenAppWithSwagger(); + getAPIDeclaration(app, 'products') + .set('X-Forwarded-Proto', 'https') + .end(function(err, res) { + if (err) return done(err); + var baseUrl = url.parse(res.body.basePath); + expect(baseUrl.protocol).to.equal('https:'); + done(); + }); + }); }); describe('Model definition attributes', function() { it('Properly defines basic attributes', function(done) { - var app = mountSwagger(); + var app = givenAppWithSwagger(); var getReq = getAPIDeclaration(app, 'products'); getReq.end(function(err, res) { @@ -104,39 +128,257 @@ describe('swagger definition', function() { done(); }); }); + + it('includes `consumes`', function(done) { + var app = givenAppWithSwagger(); + getAPIDeclaration(app, 'products').end(function(err, res) { + if (err) return done(err); + expect(res.body.consumes).to.have.members([ + 'application/json', + 'application/x-www-form-urlencoded', + 'application/xml', 'text/xml' + ]); + done(); + }); + }); + + it('includes `produces`', function(done) { + var app = givenAppWithSwagger(); + getAPIDeclaration(app, 'products').end(function(err, res) { + if (err) return done(err); + expect(res.body.produces).to.have.members([ + 'application/json', + 'application/xml', 'text/xml', + // JSONP content types + 'application/javascript', 'text/javascript' + ]); + done(); + }); + }); + + it('includes models from `accepts` args', function(done) { + var app = createLoopbackAppWithModel(); + givenPrivateAppModel(app, 'Image'); + givenSharedMethod(app.models.Product, 'setImage', { + accepts: { name: 'image', type: 'Image' } + }); + mountExplorer(app); + + getAPIDeclaration(app, 'products').end(function(err, res) { + expect(Object.keys(res.body.models)).to.include('Image'); + done(); + }); + }); + + it('includes models from `returns` args', function(done) { + var app = createLoopbackAppWithModel(); + givenPrivateAppModel(app, 'Image'); + givenSharedMethod(app.models.Product, 'getImage', { + returns: { name: 'image', type: 'Image' } + }); + mountExplorer(app); + + getAPIDeclaration(app, 'products').end(function(err, res) { + expect(Object.keys(res.body.models)).to.include('Image'); + done(); + }); + }); + + it('includes `accepts` models not attached to the app', function(done) { + var app = createLoopbackAppWithModel(); + loopback.createModel('Image'); + givenSharedMethod(app.models.Product, 'setImage', { + accepts: { name: 'image', type: 'Image' } + }); + mountExplorer(app); + + getAPIDeclaration(app, 'products').end(function(err, res) { + expect(Object.keys(res.body.models)).to.include('Image'); + done(); + }); + }); + + it('includes `responseMessages` models', function(done) { + var app = createLoopbackAppWithModel(); + loopback.createModel('ValidationError'); + givenSharedMethod(app.models.Product, 'setImage', { + errors: [{ + code: '422', + message: 'Validation failed', + responseModel: 'ValidationError' + }] + }); + + expectProductDocIncludesModels(app, 'ValidationError', done); + }); + + it('includes nested model references in properties', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + app.models.Product.defineProperty('location', { type: 'Warehouse' }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested array model references in properties', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + app.models.Product.defineProperty('location', { type: ['Warehouse'] }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested model references in modelTo relation', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + app.models.Product.belongsTo(app.models.Warehouse); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested model references in modelTo relation', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + givenPrivateAppModel(app, 'ProductLocations'); + + app.models.Product.hasMany(app.models.Warehouse, + { through: app.models.ProductLocations }); + + expectProductDocIncludesModels( + app, + ['Address', 'Warehouse', 'ProductLocations'], + done); + }); + + it('includes nested model references in accept args', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + givenSharedMethod(app.models.Product, 'aMethod', { + accepts: { arg: 'w', type: 'Warehouse' } + }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested array model references in accept args', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + givenSharedMethod(app.models.Product, 'aMethod', { + accepts: { arg: 'w', type: [ 'Warehouse' ] } + }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested model references in return args', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + givenSharedMethod(app.models.Product, 'aMethod', { + returns: { arg: 'w', type: 'Warehouse', root: true } + }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested array model references in return args', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + givenSharedMethod(app.models.Product, 'aMethod', { + returns: { arg: 'w', type: ['Warehouse'], root: true } + }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + + it('includes nested model references in error responses', function(done) { + var app = createLoopbackAppWithModel(); + givenWarehouseWithAddressModels(app); + + givenSharedMethod(app.models.Product, 'aMethod', { + errors: { + code: '222', + message: 'Warehouse', + responseModel: 'Warehouse' + } + }); + + expectProductDocIncludesModels(app, ['Address', 'Warehouse'], done); + }); + }); + + describe('Cross-origin resource sharing', function() { + it('allows cross-origin requests by default', function(done) { + var app = givenAppWithSwagger(); + request(app) + .options('/explorer/resources') + .set('Origin', 'http://example.com/') + .expect('Access-Control-Allow-Origin', /^http:\/\/example.com\/|\*/) + .expect('Access-Control-Allow-Methods', /\bGET\b/) + .end(done); + }); + + it('can be disabled by configuration', function(done) { + var app = givenAppWithSwagger({}, { remoting: { cors: { origin: false } } }); + request(app) + .options('/explorer/resources') + .end(function(err, res) { + if (err) return done(err); + var allowOrigin = res.get('Access-Control-Allow-Origin'); + expect(allowOrigin, 'Access-Control-Allow-Origin') + .to.equal(undefined); + done(); + }); + }); }); function getSwaggerResources(app, restPath, classPath) { return request(app) .get(urlJoin(restPath || '/explorer', '/resources', classPath || '')) .set('Accept', 'application/json') - .expect('Content-Type', /json/) - .expect(200); + .expect(200) + .expect('Content-Type', /json/); } function getAPIDeclaration(app, className) { return getSwaggerResources(app, '', urlJoin('/', className)); } - function mountSwagger(options, addlOptions) { - addlOptions = addlOptions || {}; - var app = createLoopbackAppWithModel(addlOptions.apiRoot); + function givenAppWithSwagger(swaggerOptions, appConfig) { + appConfig = appConfig || {}; + var app = createLoopbackAppWithModel(appConfig.apiRoot); + + if (appConfig.remoting) app.set('remoting', appConfig.remoting); + if (appConfig.explorerRoot) app.set('explorerRoot', appConfig.explorerRoot); + + mountExplorer(app, swaggerOptions); + return app; + } + + function mountExplorer(app, options) { var swaggerApp = express(); swagger(app, swaggerApp, options); - app.use(addlOptions.explorerRoot || '/explorer', swaggerApp); + app.use(app.get('explorerRoot') || '/explorer', swaggerApp); return app; } function createLoopbackAppWithModel(apiRoot) { var app = loopback(); + app.dataSource('db', { connector: 'memory' }); + var Product = loopback.Model.extend('product', { foo: {type: 'string', required: true}, bar: 'string', aNum: {type: 'number', min: 1, max: 10, required: true, default: 5} }); - Product.attachTo(loopback.memory()); - app.model(Product); + app.model(Product, { dataSource: 'db'}); // Simulate a restApiRoot set in config app.set('restApiRoot', apiRoot || '/api'); @@ -144,4 +386,33 @@ describe('swagger definition', function() { return app; } + + function givenSharedMethod(model, name, metadata) { + model[name] = function(){}; + loopback.remoteMethod(model[name], metadata); + } + + function givenPrivateAppModel(app, name, properties) { + var model = loopback.createModel(name, properties); + app.model(model, { dataSource: 'db', documented: false} ); + } + + function givenWarehouseWithAddressModels(app) { + givenPrivateAppModel(app, 'Address'); + givenPrivateAppModel(app, 'Warehouse', { + shippingAddress: { type: 'Address' } + }); + } + + function expectProductDocIncludesModels(app, modelNames, done) { + if (!Array.isArray(modelNames)) modelNames = [modelNames]; + + mountExplorer(app); + + getAPIDeclaration(app, 'products').end(function(err, res) { + if (err) return done(err); + expect(Object.keys(res.body.models)).to.include.members(modelNames); + done(); + }); + } }); From ef7e5d403c575c32478f04b846896075104837a4 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Fri, 3 Jul 2015 00:11:05 -0700 Subject: [PATCH 50/54] Corrected accidental duplication of responseMessages from merge --- lib/route-helper.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/route-helper.js b/lib/route-helper.js index 32e041d..4c35f97 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -173,7 +173,7 @@ var routeHelper = module.exports = { var returns = routeHelper.convertReturnsToSwagger(route, classDef); var responseMessages = [ { - code: 200, + code: route.returns && route.returns.length ? 200 : 204, message: 'Request was successful', responseModel: returns.model || prepareDataType(returns.type) || 'void' } @@ -186,15 +186,6 @@ var routeHelper = module.exports = { var responseDoc = modelHelper.LDLPropToSwaggerDataType(returns); - var responseMessages = [{ - code: route.returns && route.returns.length ? 200 : 204, - message: 'Request was successful' - }]; - - if (route.errors) { - responseMessages.push.apply(responseMessages, route.errors); - } - var apiDoc = { path: routeHelper.convertPathFragments(route.path), // Create the operation doc. From a4b96c33e25fce254bb49107cf0a6b4ae20b3a52 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Fri, 3 Jul 2015 00:33:40 -0700 Subject: [PATCH 51/54] Corrected accidental duplication of responseMessages from merge --- test/route-helper.test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/route-helper.test.js b/test/route-helper.test.js index d2decc3..ef32bd6 100644 --- a/test/route-helper.test.js +++ b/test/route-helper.test.js @@ -14,7 +14,7 @@ describe('route-helper', function() { ] }); expect(doc.operations[0].type).to.equal('object'); - expect(getResponseType(doc.operations[0])).to.equal(undefined); + expect(getResponseType(doc.operations[0])).to.equal('object'); }); it('converts path params when they exist in the route name', function() { @@ -61,7 +61,7 @@ describe('route-helper', function() { ] }); var opDoc = doc.operations[0]; - expect(getResponseType(opDoc)).to.equal(undefined); + expect(getResponseType(opDoc)).to.eql('[customType]'); // NOTE(bajtos) this would be the case if there was a single response type expect(opDoc.type).to.equal('array'); @@ -193,7 +193,8 @@ describe('route-helper', function() { expect(doc.operations[0].responseMessages).to.eql([ { code: 200, - message: 'Request was successful' + message: 'Request was successful', + responseModel: 'object' } ]); }); @@ -206,7 +207,8 @@ describe('route-helper', function() { expect(doc.operations[0].responseMessages).to.eql([ { code: 204, - message: 'Request was successful' + message: 'Request was successful', + responseModel: 'void' } ]); }); From 33ca826573c83f510083713f7e6bef710a96d68b Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Tue, 7 Jul 2015 01:29:33 -0700 Subject: [PATCH 52/54] Added Swagger fields for items and max/min(Items|Length) --- lib/model-helper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/model-helper.js b/lib/model-helper.js index 1a23f23..7ac4688 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -232,8 +232,13 @@ var modelHelper = module.exports = { 'format', 'defaultValue', 'enum', + 'items', 'minimum', + 'minItems', + 'minLength', 'maximum', + 'maxItems', + 'maxLength', 'uniqueItems', // loopback-explorer extensions 'length', From 43e84c4cb1aff06890247b96ed07f8cf41ca65d1 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 15 Jul 2015 17:17:33 -0700 Subject: [PATCH 53/54] Corrected to propagate properties from existing items object --- lib/model-helper.js | 13 ++++++++++--- package.json | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/model-helper.js b/lib/model-helper.js index 7ac4688..6a6135c 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -258,15 +258,22 @@ var modelHelper = module.exports = { var hasItemType = Array.isArray(ldlType.type) && ldlType.type.length; var arrayItem = hasItemType && ldlType.type[0]; + var newItems = null; if (arrayItem) { if(typeof arrayItem === 'object') { - swaggerType.items = modelHelper.LDLPropToSwaggerDataType(arrayItem); + newItems = modelHelper.LDLPropToSwaggerDataType(arrayItem); } else { - swaggerType.items = { type: modelHelper.getPropType(arrayItem) }; + newItems = { type: modelHelper.getPropType(arrayItem) }; } } else { // NOTE: `any` is not a supported type in swagger 1.2 - swaggerType.items = { type: 'any' }; + newItems = { type: 'any' }; + } + if (typeof swaggerType.items !== 'object') { + swaggerType.items = {}; + } + for (var key in newItems) { + swaggerType.items[key] = newItems[key]; } } else if (swaggerType.type === 'date') { swaggerType.type = 'string'; diff --git a/package.json b/package.json index 77193c7..cb610a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.8.0", + "version": "1.8.1", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { From 732301d7093f176675b8dae8d34c32bf0c3f6008 Mon Sep 17 00:00:00 2001 From: Shelby Sanders Date: Wed, 22 Jul 2015 15:06:17 -0700 Subject: [PATCH 54/54] Removed branch-lock, and bumped version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cb610a8..377be00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.8.1", + "version": "1.8.2", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { @@ -21,7 +21,7 @@ "url": "https://github.com/strongloop/loopback-explorer/issues" }, "devDependencies": { - "loopback": "git+https://github.com/shelbys/loopback.git#validate_param_enum", + "loopback": "git+https://github.com/shelbys/loopback.git", "mocha": "^1.21.5", "supertest": "~0.14.0", "chai": "^1.9.1"