UNPKG

ern-api-gen

Version:

Electrode Native API generator

49 lines 1.71 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable:variable-name */ const SwiftCodegen_1 = __importDefault(require("./SwiftCodegen")); const ERNMixin_1 = __importDefault(require("./ERNMixin")); const javaUtil_1 = require("../java/javaUtil"); class ErnSwiftCodegen extends SwiftCodegen_1.default { constructor() { super(); this.library = 'ern'; this.__apiPackage = 'io.swagger.client.api'; this.__supportedLibraries = javaUtil_1.newHashMap([ 'ern', 'ERN plugin makes this platform work', ]); this.unwrapRequired = true; this.__typeMapping.put('int', 'Int'); this.__typeMapping.put('integer', 'Int'); this.sourceFolder = ''; } modelFileFolder() { return this.__outputFolder; } apiFileFolder() { return this.__outputFolder; } processOpts() { super.processOpts(); // Events and Requests files. const f = this[`addSupportingFilesFor${SwiftCodegen_1.default.camelize(this.getLibrary())}`]; if (f) { f.call(this); } } addSupportingFilesForErn() { this.__apiTemplateFiles.put('apirequests.mustache', '.swift'); this.__apiTemplateFiles.put('apievents.mustache', '.swift'); this.__apiDataTemplateFile.put('apidatamodel.mustache', '.swift'); } getName() { return 'ERNSwift'; } } exports.default = ErnSwiftCodegen; ERNMixin_1.default(ErnSwiftCodegen); //# sourceMappingURL=ErnSwiftCodegen.js.map