UNPKG

ern-api-gen

Version:

Electrode Native API generator

32 lines 995 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function forValue(str) { str = str.toUpperCase(); if (str in ALL) { return ALL[str]; } } exports.forValue = forValue; class RefType { constructor(internalPrefix) { this.internalPrefix = internalPrefix; } static values() { return ENUMS; } getInternalPrefix() { return this.internalPrefix; } ordinal() { return ENUMS.indexOf(this); } } RefType.forValue = forValue; exports.DEFINITION = new RefType('#/definitions/'); exports.PARAMETER = new RefType('#/parameters/'); exports.PATH = new RefType('#/paths/'); exports.RESPONSE = new RefType('#/responses/'); const ALL = { DEFINITION: exports.DEFINITION, PARAMETER: exports.PARAMETER, PATH: exports.PATH, RESPONSE: exports.RESPONSE }; const ENUMS = Object.freeze(Object.keys(ALL).map(v => ALL[v])); exports.default = Object.assign({}, ALL, { forValue }); //# sourceMappingURL=RefType.js.map