How to use the typescript-rest-swagger.Example function in typescript-rest-swagger

To help you get started, we’ve selected a few typescript-rest-swagger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vellengs / typerx / dist / controllers / domain-controller.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.remove('Domain', id);
        });
    }
    /**
     * 查询领域
     * @param id 编号
     */
    get(id) {
        return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.get('Domain', id);
        });
    }
};
__decorate([
    typescript_rest_swagger_1.Example({
        entry: {
            name: {
                title: '名字',
                description: '名字描述',
                widget: 'input',
                type: 'string'
            },
            birthday: {
                title: '生日',
                description: '生日描述',
                widget: 'date',
                type: 'string'
            },
        },
        columns: [
            {
github vellengs / typerx / dist / controllers / employee-controller.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.remove('Employee', id);
        });
    }
    /**
     * 查询员工表
     * @param id 编号
     */
    get(id) {
        return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.get('Employee', id);
        });
    }
};
__decorate([
    typescript_rest_swagger_1.Example({
        entry: {
            name: {
                title: '名字',
                description: '名字描述',
                widget: 'input',
                type: 'string'
            },
            birthday: {
                title: '生日',
                description: '生日描述',
                widget: 'date',
                type: 'string'
            },
        },
        columns: [
            {
github vellengs / typerx / dist / controllers / menu-controller.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.remove('Menu', id);
        });
    }
    /**
     * 查询菜单
     * @param id 编号
     */
    get(id) {
        return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.get('Menu', id);
        });
    }
};
__decorate([
    typescript_rest_swagger_1.Example({
        entry: {
            name: {
                title: '名字',
                description: '名字描述',
                widget: 'input',
                type: 'string'
            },
            birthday: {
                title: '生日',
                description: '生日描述',
                widget: 'date',
                type: 'string'
            },
        },
        columns: [
            {
github vellengs / typerx / dist / controllers / dict-controller.js View on Github external
return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.remove('Dict', id);
        });
    }
    /**
     * 查询字典表
     * @param id 编号
     */
    get(id) {
        return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.get('Dict', id);
        });
    }
};
__decorate([
    typescript_rest_swagger_1.Example({
        columns: [
            {
                field: 'name',
                header: '名字',
            }
        ],
        entry: {
            birthday: {
                description: '生日描述',
                title: '生日',
                type: 'string',
                widget: 'date',
            },
            name: {
                description: '名字描述',
                title: '名字',
github vellengs / typerx / dist / controllers / customer-controller.js View on Github external
* @param {string} id 客户编号
     * @returns {Promise}
     * @memberof CustomerController
     */
    remove(id) {
        return __awaiter(this, void 0, void 0, function* () {
            return modex_1.Helper.remove('Customer', id);
        });
    }
};
__decorate([
    typescript_rest_1.Context,
    __metadata("design:type", typescript_rest_1.ServiceContext)
], CustomerController.prototype, "context", void 0);
__decorate([
    typescript_rest_swagger_1.Example({
        entry: {
            name: {
                title: '名字',
                description: '名字描述',
                widget: 'input',
                type: 'string'
            },
            birthday: {
                title: '生日',
                description: '生日描述',
                widget: 'date',
                type: 'string'
            },
        },
        columns: [
            {

typescript-rest-swagger

Generate Swagger files from a typescript-rest project

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis