dis+/node_modules/exegesis/lib/oas3/parameterParsers/structuredParser.js
/**
 * A structured parser is a parser that handles RFC6570 path-style and
 * form-style query expansions.
 *
 * @param schema - The JSON Schema this parser is expecting.
 * @param explode - True if this is a parser for an "exploded" expansion.
 */
A structured parser is a parser that handles RFC6570 path-style and
form-style query expansions.

@param schema - The JSON Schema this parser is expecting.
@param explode - True if this is a parser for an "exploded" expansion.
A structured parser is a parser that handles RFC6570 path - style and form - style query expansions . @param schema - The JSON Schema this parser is expecting . @param explode - True if this is a parser for an " exploded " expansion .
function generateStructuredParser(schema, explode) {
    const allowedTypes = common_1.removeSimpleTypes(json_schema_infer_types_1.default(schema));
    if (allowedTypes.length === 1 && allowedTypes[0] === 'string') {
        return structuredStringParser;
    }
    else if (allowedTypes.length === 1 && allowedTypes[0] === 'array') {
        if (explode) {
            return explodedStructuredArrayParser;
        }
        else {
            return structuredArrayParser;
        }
    }
    else if (!explode) {
        return generateGenericStructuredParser(schema);
    }
    else {
        return generateGenericExplodedStructuredParser(schema);
    }
}
function generateStructuredParser ( schema , explode ) { const allowedTypes = common_1 . removeSimpleTypes ( json_schema_infer_types_1 . default ( schema ) ) ; if ( allowedTypes . length === 1 && allowedTypes [ 0 ] === 'string' ) { return structuredStringParser ; } else if ( allowedTypes . length === 1 && allowedTypes [ 0 ] === 'array' ) { if ( explode ) { return explodedStructuredArrayParser ; } else { return structuredArrayParser ; } } else if ( ! explode ) { return generateGenericStructuredParser ( schema ) ; } else { return generateGenericExplodedStructuredParser ( schema ) ; } }
A structured parser is a parser that handles RFC6570 path-style and
 form-style query expansions.
A structured parser is a parser that handles RFC6570 path - style and form - style query expansions .