#1248 createXMLSample added comments what was copy-pasted from swagger-js

This commit is contained in:
Anna Bodnia
2016-01-14 20:55:20 +02:00
parent c1f4814281
commit 14df0151ef
2 changed files with 18 additions and 0 deletions

9
dist/swagger-ui.js vendored
View File

@@ -26169,6 +26169,7 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
/* jshint -W122 */
SwaggerUi.partials.signature = (function () {
// copy-pasted from swagger-js
var resolveSchema = function (schema) {
if (_.isPlainObject(schema.schema)) {
schema = resolveSchema(schema.schema);
@@ -26177,6 +26178,7 @@ SwaggerUi.partials.signature = (function () {
return schema;
};
// copy-pasted from swagger-js
var simpleRef = function (name) {
if (typeof name === 'undefined') {
return null;
@@ -26189,6 +26191,7 @@ SwaggerUi.partials.signature = (function () {
}
};
// copy-pasted from swagger-js
var getInlineModel = function(inlineStr) {
if(/^Inline Model \d+$/.test(inlineStr)) {
var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); //
@@ -26199,6 +26202,7 @@ SwaggerUi.partials.signature = (function () {
return null;
};
// copy-pasted from swagger-js
var formatXml = function(xml) {
var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;
reg = /(>)(<)(\/*)/g;
@@ -26272,6 +26276,7 @@ SwaggerUi.partials.signature = (function () {
return formatted;
};
// copy-pasted from swagger-js
var getModelSignature = function (name, schema, models, modelPropertyMacro) {
var strongOpen = '<span class="strong">';
var strongClose = '</span>';
@@ -26623,6 +26628,7 @@ SwaggerUi.partials.signature = (function () {
};
// copy-pasted from swagger-js
var schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) {
// Resolve the schema (Handle nested schemas)
schema = resolveSchema(schema);
@@ -26710,6 +26716,7 @@ SwaggerUi.partials.signature = (function () {
return output;
};
// copy-pasted from swagger-js
var createJSONSample = function (value, modelsToIgnore) {
modelsToIgnore = modelsToIgnore || {};
@@ -26729,6 +26736,7 @@ SwaggerUi.partials.signature = (function () {
return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);
};
// copy-pasted from swagger-js
var getParameterModelSignature = function (type, definitions) {
var isPrimitive, listType;
@@ -26771,6 +26779,7 @@ SwaggerUi.partials.signature = (function () {
}
};
// copy-pasted from swagger-js
var createParameterJSONSample = function (type, models) {
var listType, sampleJson, innerType;
models = models || {};

View File

@@ -2,6 +2,7 @@
/* jshint -W122 */
SwaggerUi.partials.signature = (function () {
// copy-pasted from swagger-js
var resolveSchema = function (schema) {
if (_.isPlainObject(schema.schema)) {
schema = resolveSchema(schema.schema);
@@ -10,6 +11,7 @@ SwaggerUi.partials.signature = (function () {
return schema;
};
// copy-pasted from swagger-js
var simpleRef = function (name) {
if (typeof name === 'undefined') {
return null;
@@ -22,6 +24,7 @@ SwaggerUi.partials.signature = (function () {
}
};
// copy-pasted from swagger-js
var getInlineModel = function(inlineStr) {
if(/^Inline Model \d+$/.test(inlineStr)) {
var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); //
@@ -32,6 +35,7 @@ SwaggerUi.partials.signature = (function () {
return null;
};
// copy-pasted from swagger-js
var formatXml = function(xml) {
var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;
reg = /(>)(<)(\/*)/g;
@@ -105,6 +109,7 @@ SwaggerUi.partials.signature = (function () {
return formatted;
};
// copy-pasted from swagger-js
var getModelSignature = function (name, schema, models, modelPropertyMacro) {
var strongOpen = '<span class="strong">';
var strongClose = '</span>';
@@ -456,6 +461,7 @@ SwaggerUi.partials.signature = (function () {
};
// copy-pasted from swagger-js
var schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) {
// Resolve the schema (Handle nested schemas)
schema = resolveSchema(schema);
@@ -543,6 +549,7 @@ SwaggerUi.partials.signature = (function () {
return output;
};
// copy-pasted from swagger-js
var createJSONSample = function (value, modelsToIgnore) {
modelsToIgnore = modelsToIgnore || {};
@@ -562,6 +569,7 @@ SwaggerUi.partials.signature = (function () {
return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);
};
// copy-pasted from swagger-js
var getParameterModelSignature = function (type, definitions) {
var isPrimitive, listType;
@@ -604,6 +612,7 @@ SwaggerUi.partials.signature = (function () {
}
};
// copy-pasted from swagger-js
var createParameterJSONSample = function (type, models) {
var listType, sampleJson, innerType;
models = models || {};