UNPKG

airship-server

Version:

Airship is a framework for Node.JS & TypeScript that helps you to write big, scalable and maintainable API servers.

25 lines 924 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ApiMethodParam_1 = require("./ApiMethodParam"); const Type_1 = require("../types/Type"); class ApiMethodScheme { constructor(name, params, responseType, description) { this.name = name; this.params = params; this.responseType = responseType; this.description = description; } serialize() { return { name: this.name, params: this.params.map(p => p.serialize()), responseType: this.responseType.serialize(), description: this.description }; } static deserialize(raw) { return new ApiMethodScheme(raw['name'], raw['params'].map(ApiMethodParam_1.default.deserialize), Type_1.Type.deserialize(raw['responseType']), raw['description']); } } exports.default = ApiMethodScheme; //# sourceMappingURL=ApiMethodScheme.js.map