UNPKG

1.65 kBJavaScriptView Raw
1'use strict';
2
3const SWAGGER_FLOW_TYPES = {
4 string: 'string',
5 array: 'Array',
6 boolean: 'boolean',
7 integer: 'number',
8 number: 'number',
9 object: 'Object',
10 file: 'any',
11 undefined: 'void',
12 null: 'null'
13};
14// GENERATORS - CONSTANTS
15// =============================================================================
16// These are constant values used by the generators. They likely have very
17// little relevance to anything else. If you find yourself using something
18// described here outside of a generator, consider moving it.
19
20const RESERVED_WORDS = new Set(['abstract', 'arguments', 'Array', 'await*', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class*', 'const', 'continue', 'Date', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum*', 'eval', 'eval', 'export*', 'extends*', 'false', 'final', 'finally', 'float', 'for', 'function', 'function', 'goto', 'hasOwnProperty', 'if', 'implements', 'import*', 'in', 'Infinity', 'instanceof', 'int', 'interface', 'isFinite', 'isNaN', 'isPrototypeOf', 'length', 'let*', 'long', 'Math', 'name', 'NaN', 'native', 'new', 'null', 'Number', 'Object', 'package', 'private', 'protected', 'prototype', 'public', 'return', 'short', 'static', 'String', 'super*', 'switch', 'synchronized', 'this', 'throw', 'throws', 'toString', 'transient', 'true', 'try', 'typeof', 'undefined', 'valueOf', 'var', 'void', 'volatile', 'while', 'with', 'yield']);
21
22const HTTP_METHODS = new Set(['get', 'put', 'post', 'patch', 'delete', 'GET', 'PUT', 'POST', 'PATCH', 'DELETE']);
23
24exports.SWAGGER_FLOW_TYPES = SWAGGER_FLOW_TYPES;
25exports.RESERVED_WORDS = RESERVED_WORDS;
26exports.HTTP_METHODS = HTTP_METHODS;
\No newline at end of file