dist/util/esi-api.js
function buildSimpleExample(type, example) {
    // The values in schemaOrType refer to the type names of Swagger types
    if (type === 'string') {
        return typeof example === 'string' ? example : '';
    }
    else if (type === 'integer' || type === 'float' || type === 'number') {
        return typeof example === 'number' ? example : 0;
    }
    else if (type === 'boolean') {
        return typeof example === 'boolean' ? example : false;
    }
    else if (type === 'array') {
        return Array.isArray(example) ? example : [];
    }
    else if (type === 'object') {
        return typeof example === 'object' ? example : {};
    }
    else {
        return null;
    }
}
function buildSimpleExample(type, example) {
    // The values in schemaOrType refer to the type names of Swagger types
    if (type === 'string') {
        return typeof example === 'string' ? example : '';
    }
    else if (type === 'integer' || type === 'float' || type === 'number') {
        return typeof example === 'number' ? example : 0;
    }
    else if (type === 'boolean') {
        return typeof example === 'boolean' ? example : false;
    }
    else if (type === 'array') {
        return Array.isArray(example) ? example : [];
    }
    else if (type === 'object') {
        return typeof example === 'object' ? example : {};
    }
    else {
        return null;
    }
}
function buildSimpleExample ( type , example ) { // The values in schemaOrType refer to the type names of Swagger types if ( type === 'string' ) { return typeof example === 'string' ? example : '' ; } else if ( type === 'integer' || type === 'float' || type === 'number' ) { return typeof example === 'number' ? example : 0 ; } else if ( type === 'boolean' ) { return typeof example === 'boolean' ? example : false ; } else if ( type === 'array' ) { return Array . isArray ( example ) ? example : [ ] ; } else if ( type === 'object' ) { return typeof example === 'object' ? example : { } ; } else { return null ; } }
Implementation functions for constructing and validating dynamic objects with the types defined in the spec.
Implementation functions for constructing and validating dynamic objects with the types defined in the spec .