diff --git a/npm/packs/client-generator/lib/dist/edition.service.d.ts b/npm/packs/client-generator/lib/dist/edition.service.d.ts new file mode 100644 index 0000000000..46b04c5470 --- /dev/null +++ b/npm/packs/client-generator/lib/dist/edition.service.d.ts @@ -0,0 +1,9 @@ +import { RestService } from '@abp/ng.core'; +import { Observable } from 'rxjs'; +export declare class EditionService { + private restService; + constructor(restService: RestService); + get(id: string): Observable; + getList(): Observable; + getUsageStatistics(): Observable; +} diff --git a/npm/packs/client-generator/lib/dist/edition.service.js b/npm/packs/client-generator/lib/dist/edition.service.js new file mode 100644 index 0000000000..80e3c4c43e --- /dev/null +++ b/npm/packs/client-generator/lib/dist/edition.service.js @@ -0,0 +1,39 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = require("@angular/core"); +var EditionService = /** @class */ (function () { + function EditionService(restService) { + this.restService = restService; + } + EditionService.prototype.get = function (id) { + return this.restService.request({ + method: 'GET', + url: "/api/saas/editions/" + id, + }); + }; + EditionService.prototype.getList = function () { + return this.restService.request({ + method: 'GET', + url: "/api/saas/editions", + }); + }; + EditionService.prototype.getUsageStatistics = function () { + return this.restService.request({ + method: 'GET', + url: "/api/saas/editions/statistics/usage-statistic", + }); + }; + EditionService = __decorate([ + core_1.Injectable({ + providedIn: 'root', + }) + ], EditionService); + return EditionService; +}()); +exports.EditionService = EditionService; diff --git a/npm/packs/client-generator/lib/dist/tenant.service.d.ts b/npm/packs/client-generator/lib/dist/tenant.service.d.ts new file mode 100644 index 0000000000..080122bbf7 --- /dev/null +++ b/npm/packs/client-generator/lib/dist/tenant.service.d.ts @@ -0,0 +1,9 @@ +import { RestService } from '@abp/ng.core'; +import { Observable } from 'rxjs'; +export declare class TenantService { + private restService; + constructor(restService: RestService); + get(id: string): Observable; + getList(): Observable; + getDefaultConnectionString(id: string): Observable; +} diff --git a/npm/packs/client-generator/lib/dist/tenant.service.js b/npm/packs/client-generator/lib/dist/tenant.service.js new file mode 100644 index 0000000000..31edbd99cd --- /dev/null +++ b/npm/packs/client-generator/lib/dist/tenant.service.js @@ -0,0 +1,39 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = require("@angular/core"); +var TenantService = /** @class */ (function () { + function TenantService(restService) { + this.restService = restService; + } + TenantService.prototype.get = function (id) { + return this.restService.request({ + method: 'GET', + url: "/api/saas/tenants/" + id, + }); + }; + TenantService.prototype.getList = function () { + return this.restService.request({ + method: 'GET', + url: "/api/saas/tenants", + }); + }; + TenantService.prototype.getDefaultConnectionString = function (id) { + return this.restService.request({ + method: 'GET', + url: "/api/saas/tenants/" + id + "/default-connection-string", + }); + }; + TenantService = __decorate([ + core_1.Injectable({ + providedIn: 'root', + }) + ], TenantService); + return TenantService; +}()); +exports.TenantService = TenantService; diff --git a/npm/packs/client-generator/lib/src/angular.d.ts b/npm/packs/client-generator/lib/src/angular.d.ts new file mode 100644 index 0000000000..e49d42ec6a --- /dev/null +++ b/npm/packs/client-generator/lib/src/angular.d.ts @@ -0,0 +1,2 @@ +import { APIDefination } from './types/api-defination'; +export declare function angular(data: APIDefination.Response, selectedModules: string[]): Promise; diff --git a/npm/packs/client-generator/lib/src/angular.js b/npm/packs/client-generator/lib/src/angular.js new file mode 100644 index 0000000000..ceff31fd14 --- /dev/null +++ b/npm/packs/client-generator/lib/src/angular.js @@ -0,0 +1,81 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var service_templates_1 = require("./templates/angular/service-templates"); +var change_case_1 = __importDefault(require("change-case")); +var fs_extra_1 = __importDefault(require("fs-extra")); +var generators_1 = require("./utils/generators"); +function angular(data, selectedModules) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + selectedModules.forEach(function (module) { return __awaiter(_this, void 0, void 0, function () { + var element; + return __generator(this, function (_a) { + element = data.modules[module]; + (Object.keys(element.controllers) || []).forEach(function (key) { + var controller = element.controllers[key]; + var actions = element.controllers[key].actions; + var actionKeys = Object.keys(actions); + var contents = []; + actionKeys.forEach(function (key) { + var element = actions[key]; + console.log(element); + var parameters = generators_1.parseParameters(element.parameters); + switch (element.httpMethod) { + case 'GET': + contents.push(service_templates_1.ServiceTemplates.getMethodTemplate(element.name, element.url, generators_1.generateArgs(parameters), parameters)); + break; + default: + break; + } + }); + var service = service_templates_1.ServiceTemplates.classTemplate(controller.controllerName, contents.join('\n')); + fs_extra_1.default.writeFileSync("dist/" + change_case_1.default.kebabCase(controller.controllerName) + ".service.ts", service); + }); + return [2 /*return*/]; + }); + }); }); + return [2 /*return*/]; + }); + }); +} +exports.angular = angular; diff --git a/npm/packs/client-generator/lib/src/cli.d.ts b/npm/packs/client-generator/lib/src/cli.d.ts new file mode 100644 index 0000000000..21620dda81 --- /dev/null +++ b/npm/packs/client-generator/lib/src/cli.d.ts @@ -0,0 +1 @@ +export declare function cli(program: any): Promise; diff --git a/npm/packs/client-generator/lib/src/cli.js b/npm/packs/client-generator/lib/src/cli.js new file mode 100644 index 0000000000..ca0381e84a --- /dev/null +++ b/npm/packs/client-generator/lib/src/cli.js @@ -0,0 +1,113 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var prompt_1 = require("./utils/prompt"); +var axios_1 = require("./utils/axios"); +var ora = require("ora"); +var angular_1 = require("./angular"); +var chalk_1 = __importDefault(require("chalk")); +function cli(program) { + return __awaiter(this, void 0, void 0, function () { + var _a, loading, data, apiUrl, error_1, selection, modules, _b; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + if (!(program.ui !== 'angular')) return [3 /*break*/, 2]; + _a = program; + return [4 /*yield*/, prompt_1.uiSelection(['Angular'])]; + case 1: + _a.ui = (_c.sent()).toLowerCase(); + _c.label = 2; + case 2: + loading = ora('Waiting for the API response... \n'); + loading.start(); + data = {}; + apiUrl = 'https://localhost:44305/api/abp/api-definition'; + _c.label = 3; + case 3: + _c.trys.push([3, 5, , 6]); + return [4 /*yield*/, axios_1.axiosInstance.get(apiUrl)]; + case 4: + data = (_c.sent()).data; + return [3 /*break*/, 6]; + case 5: + error_1 = _c.sent(); + console.log(chalk_1.default.red('An error occurred when fetching the ' + apiUrl)); + process.exit(1); + return [3 /*break*/, 6]; + case 6: + console.log(data); + loading.stop(); + selection = function (modules) { return __awaiter(_this, void 0, void 0, function () { + var selectedModules; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, prompt_1.moduleSelection(modules)]; + case 1: + selectedModules = (_a.sent()); + if (!!selectedModules.length) return [3 /*break*/, 3]; + console.log(chalk_1.default.red('Please select module(s)')); + return [4 /*yield*/, selection(modules)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: return [2 /*return*/, selectedModules]; + } + }); + }); }; + modules = ['saas']; + _b = program.ui; + switch (_b) { + case 'angular': return [3 /*break*/, 7]; + } + return [3 /*break*/, 9]; + case 7: return [4 /*yield*/, angular_1.angular(data, modules)]; + case 8: + _c.sent(); + return [3 /*break*/, 10]; + case 9: + process.exit(1); + _c.label = 10; + case 10: return [2 /*return*/]; + } + }); + }); +} +exports.cli = cli; diff --git a/npm/packs/client-generator/lib/src/index.d.ts b/npm/packs/client-generator/lib/src/index.d.ts new file mode 100644 index 0000000000..b7988016da --- /dev/null +++ b/npm/packs/client-generator/lib/src/index.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/npm/packs/client-generator/lib/src/index.js b/npm/packs/client-generator/lib/src/index.js new file mode 100644 index 0000000000..a65786ccf2 --- /dev/null +++ b/npm/packs/client-generator/lib/src/index.js @@ -0,0 +1,24 @@ +#!/usr/bin/env node +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var chalk_1 = __importDefault(require("chalk")); +var commander_1 = __importDefault(require("commander")); +var cli_1 = require("./cli"); +var clear = require('clear'); +var figlet = require('figlet'); +clear(); +console.log(chalk_1.default.red(figlet.textSync('ABP', { horizontalLayout: 'full' }))); +commander_1.default + .version('0.0.1') + .description('ABP Client Generator') + .option('-u, --ui ', 'UI option (Angular)') + .parse(process.argv); +if (!process.argv.slice(2).length || !commander_1.default.ui || typeof commander_1.default.ui !== 'string') { + commander_1.default.outputHelp(); + process.exit(1); +} +commander_1.default.ui = commander_1.default.ui.toLowerCase(); +cli_1.cli(commander_1.default); diff --git a/npm/packs/client-generator/lib/src/templates/angular/service-templates.d.ts b/npm/packs/client-generator/lib/src/templates/angular/service-templates.d.ts new file mode 100644 index 0000000000..06ffd82595 --- /dev/null +++ b/npm/packs/client-generator/lib/src/templates/angular/service-templates.d.ts @@ -0,0 +1,6 @@ +import { Argument } from '../../utils/generators'; +export declare namespace ServiceTemplates { + function classTemplate(name: string, content: string): string; + function getMethodTemplate(name: string, url: string, args?: string, params?: Argument[], queryParams?: object): string; + function requestTemplate(method: string, url: string, params?: Argument[], body?: boolean, queryParams?: boolean): string; +} diff --git a/npm/packs/client-generator/lib/src/templates/angular/service-templates.js b/npm/packs/client-generator/lib/src/templates/angular/service-templates.js new file mode 100644 index 0000000000..fb3e0bd6e5 --- /dev/null +++ b/npm/packs/client-generator/lib/src/templates/angular/service-templates.js @@ -0,0 +1,31 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var change_case_1 = __importDefault(require("change-case")); +var replacer_1 = require("../../utils/replacer"); +var ServiceTemplates; +(function (ServiceTemplates) { + function classTemplate(name, content) { + return "import { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs'\n\n@Injectable({\n providedIn: 'root',\n})\nexport class " + change_case_1.default.pascalCase(name) + "Service {\n constructor(private restService: RestService) {}\n " + content + "\n}"; + } + ServiceTemplates.classTemplate = classTemplate; + function getMethodTemplate(name, url, args, params, queryParams) { + if (args === void 0) { args = ''; } + if (params === void 0) { params = []; } + return "\n " + change_case_1.default.camelCase(replacer_1.replacer(name)) + "(" + args + "): Observable {\n " + requestTemplate('GET', url, params, false, !!queryParams) + "\n }"; + } + ServiceTemplates.getMethodTemplate = getMethodTemplate; + function requestTemplate(method, url, params, body, queryParams) { + if (params === void 0) { params = []; } + params.forEach(function (param) { + var index = url.indexOf("{" + param.key + "}"); + if (index > -1) { + url = url.slice(0, index) + '$' + url.slice(index); + } + }); + return "return this.restService.request({\n method: '" + method + "',\n url: `/" + url + "`," + (queryParams ? 'params: queryParams,' : '') + (body ? 'body,' : '') + "\n });"; + } + ServiceTemplates.requestTemplate = requestTemplate; +})(ServiceTemplates = exports.ServiceTemplates || (exports.ServiceTemplates = {})); diff --git a/npm/packs/client-generator/lib/src/types/api-defination.d.ts b/npm/packs/client-generator/lib/src/types/api-defination.d.ts new file mode 100644 index 0000000000..9806a1011b --- /dev/null +++ b/npm/packs/client-generator/lib/src/types/api-defination.d.ts @@ -0,0 +1,52 @@ +export declare namespace APIDefination { + interface Response { + modules: Modules; + } + interface Modules { + [key: string]: Module; + } + interface Module { + rootPath: string; + controllers: { + [key: string]: Controller; + }; + } + interface Controller { + controllerName: string; + interfaces: { + typeAsString: string; + }[]; + typeAsString: string; + actions: { + [key: string]: Action; + }; + } + interface Action { + uniqueName: string; + name: string; + httpMethod: string; + url: string; + supportedVersions: any[]; + parametersOnMethod: ParametersOnMethod[]; + parameters: Parameter[]; + returnValue: ReturnValue; + } + interface Parameter { + nameOnMethod: string; + name: string; + typeAsString: string; + isOptional: boolean; + defaultValue: null; + constraintTypes: null; + bindingSourceId: string; + } + interface ParametersOnMethod { + name: string; + typeAsString: string; + isOptional: boolean; + defaultValue: null; + } + interface ReturnValue { + typeAsString: string; + } +} diff --git a/npm/packs/client-generator/lib/src/types/api-defination.js b/npm/packs/client-generator/lib/src/types/api-defination.js new file mode 100644 index 0000000000..c8ad2e549b --- /dev/null +++ b/npm/packs/client-generator/lib/src/types/api-defination.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/npm/packs/client-generator/lib/src/utils/axios.d.ts b/npm/packs/client-generator/lib/src/utils/axios.d.ts new file mode 100644 index 0000000000..205420f0e2 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/axios.d.ts @@ -0,0 +1 @@ +export declare const axiosInstance: import("axios").AxiosInstance; diff --git a/npm/packs/client-generator/lib/src/utils/axios.js b/npm/packs/client-generator/lib/src/utils/axios.js new file mode 100644 index 0000000000..cd25695c85 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/axios.js @@ -0,0 +1,2128 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var axios_1 = __importDefault(require("axios")); +var https = require("https"); +var httpsAgent = new https.Agent({ + rejectUnauthorized: false, +}); +exports.axiosInstance = axios_1.default.create({ httpsAgent: httpsAgent }); +exports.axiosInstance.interceptors.request.use(function (config) { + if (config.method !== 'OPTIONS') { + if (!config.headers['content-type']) { + config.headers['accept'] = 'application/json'; + } + } + return config; +}, function (error) { + // Do something with request error + return Promise.reject(error); +}); +// axiosInstance.get = (...ar) => new Promise(resolve => { +// setTimeout(() => { +// resolve({ +// "modules": { +// "Account": { +// "rootPath": "Account", +// "controllers": { +// "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { +// "controllerName": "Account", +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController, Volo.Abp.Account.Web", +// "interfaces": [], +// "actions": { +// "LoginByLogin": { +// "uniqueName": "LoginByLogin", +// "name": "Login", +// "httpMethod": "POST", +// "url": "api/account/login", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "login", +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "login", +// "name": "login", +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult, Volo.Abp.Account.Web" +// } +// }, +// "CheckPasswordByLogin": { +// "uniqueName": "CheckPasswordByLogin", +// "name": "CheckPassword", +// "httpMethod": "POST", +// "url": "api/account/checkPassword", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "login", +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "login", +// "name": "login", +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult, Volo.Abp.Account.Web" +// } +// } +// } +// } +// } +// }, +// "app": { +// "rootPath": "app", +// "controllers": { +// "Acme.AngSecTest.Controllers.TestController": { +// "controllerName": "Test", +// "typeAsString": "Acme.AngSecTest.Controllers.TestController, Acme.AngSecTest.HttpApi", +// "interfaces": [], +// "actions": { +// "GetAsync": { +// "uniqueName": "GetAsync", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/test", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "System.Collections.Generic.List`1[[Acme.AngSecTest.Models.Test.TestModel, Acme.AngSecTest.HttpApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib" +// } +// } +// } +// }, +// "Acme.AngSecTest.Controllers.Automobiles.carController": { +// "controllerName": "car", +// "typeAsString": "Acme.AngSecTest.Controllers.Automobiles.carController, Acme.AngSecTest.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Acme.AngSecTest.Automobiles.IcarAppService, Acme.AngSecTest.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsyncById": { +// "uniqueName": "GetAsyncById", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// }, +// "GetListAsyncByInput": { +// "uniqueName": "GetListAsyncByInput", +// "name": "GetListAsync", +// "httpMethod": "GET", +// "url": "api/car", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.GetcarsInput, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "FilterText", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Name", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "YearMin", +// "typeAsString": "System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "YearMax", +// "typeAsString": "System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "ProductionDateMin", +// "typeAsString": "System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "ProductionDateMax", +// "typeAsString": "System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "IsStillGoing", +// "typeAsString": "System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Sorting", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "SkipCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "MaxResultCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.PagedResultDto`1[[Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "CreateAsyncByInput": { +// "uniqueName": "CreateAsyncByInput", +// "name": "CreateAsync", +// "httpMethod": "POST", +// "url": "api/car", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carCreateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carCreateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// }, +// "UpdateAsyncByIdAndInput": { +// "uniqueName": "UpdateAsyncByIdAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carUpdateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carUpdateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// }, +// "DeleteAsyncById": { +// "uniqueName": "DeleteAsyncById", +// "name": "DeleteAsync", +// "httpMethod": "DELETE", +// "url": "api/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// }, +// "Acme.AngSecTest.AppServices.Automobiles.carAppService": { +// "controllerName": "car", +// "typeAsString": "Acme.AngSecTest.AppServices.Automobiles.carAppService, Acme.AngSecTest.Application", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Validation.IValidationEnabled, Volo.Abp.Validation" +// }, +// { +// "typeAsString": "Volo.Abp.Auditing.IAuditingEnabled, Volo.Abp.Auditing" +// }, +// { +// "typeAsString": "Acme.AngSecTest.Automobiles.IcarAppService, Acme.AngSecTest.Application.Contracts" +// } +// ], +// "actions": { +// "GetListAsyncByInput": { +// "uniqueName": "GetListAsyncByInput", +// "name": "GetListAsync", +// "httpMethod": "GET", +// "url": "api/app/car", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.GetcarsInput, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "FilterText", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Name", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "YearMin", +// "typeAsString": "System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "YearMax", +// "typeAsString": "System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "ProductionDateMin", +// "typeAsString": "System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "ProductionDateMax", +// "typeAsString": "System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "IsStillGoing", +// "typeAsString": "System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Sorting", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "SkipCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "MaxResultCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.PagedResultDto`1[[Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "GetAsyncById": { +// "uniqueName": "GetAsyncById", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/app/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// }, +// "DeleteAsyncById": { +// "uniqueName": "DeleteAsyncById", +// "name": "DeleteAsync", +// "httpMethod": "DELETE", +// "url": "api/app/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// }, +// "CreateAsyncByInput": { +// "uniqueName": "CreateAsyncByInput", +// "name": "CreateAsync", +// "httpMethod": "POST", +// "url": "api/app/car", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carCreateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carCreateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// }, +// "UpdateAsyncByIdAndInput": { +// "uniqueName": "UpdateAsyncByIdAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/app/car/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carUpdateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Acme.AngSecTest.Automobiles.carUpdateDto, Acme.AngSecTest.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Acme.AngSecTest.Automobiles.carDto, Acme.AngSecTest.Application.Contracts" +// } +// } +// } +// }, +// "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { +// "controllerName": "AbpApplicationConfiguration", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController, Volo.Abp.AspNetCore.Mvc", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService, Volo.Abp.AspNetCore.Mvc.Contracts" +// } +// ], +// "actions": { +// "GetAsync": { +// "uniqueName": "GetAsync", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/abp/application-configuration", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto, Volo.Abp.AspNetCore.Mvc.Contracts" +// } +// } +// } +// }, +// "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { +// "controllerName": "AbpApiDefinition", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController, Volo.Abp.AspNetCore.Mvc", +// "interfaces": [], +// "actions": { +// "Get": { +// "uniqueName": "Get", +// "name": "Get", +// "httpMethod": "GET", +// "url": "api/abp/api-definition", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel, Volo.Abp.Http" +// } +// } +// } +// }, +// "Pages.Abp.MultiTenancy.AbpTenantController": { +// "controllerName": "AbpTenant", +// "typeAsString": "Pages.Abp.MultiTenancy.AbpTenantController, Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService, Volo.Abp.AspNetCore.Mvc.Contracts" +// } +// ], +// "actions": { +// "FindTenantByNameAsyncByName": { +// "uniqueName": "FindTenantByNameAsyncByName", +// "name": "FindTenantByNameAsync", +// "httpMethod": "GET", +// "url": "api/abp/multi-tenancy/find-tenant/{name}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "name", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "name", +// "name": "name", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto, Volo.Abp.AspNetCore.Mvc.Contracts" +// } +// }, +// "FindTenantByIdAsyncById": { +// "uniqueName": "FindTenantByIdAsyncById", +// "name": "FindTenantByIdAsync", +// "httpMethod": "GET", +// "url": "api/abp/multi-tenancy/tenants/by-id/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto, Volo.Abp.AspNetCore.Mvc.Contracts" +// } +// } +// } +// } +// } +// }, +// "account": { +// "rootPath": "account", +// "controllers": { +// "Volo.Abp.Account.AccountController": { +// "controllerName": "Account", +// "typeAsString": "Volo.Abp.Account.AccountController, Volo.Abp.Account.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Account.IAccountAppService, Volo.Abp.Account.Application.Contracts" +// } +// ], +// "actions": { +// "RegisterAsyncByInput": { +// "uniqueName": "RegisterAsyncByInput", +// "name": "RegisterAsync", +// "httpMethod": "POST", +// "url": "api/account/register", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// } +// } +// } +// } +// }, +// "abp": { +// "rootPath": "abp", +// "controllers": { +// "Volo.Abp.FeatureManagement.FeaturesController": { +// "controllerName": "Features", +// "typeAsString": "Volo.Abp.FeatureManagement.FeaturesController, Volo.Abp.FeatureManagement.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.FeatureManagement.IFeatureAppService, Volo.Abp.FeatureManagement.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsyncByProviderNameAndProviderKey": { +// "uniqueName": "GetAsyncByProviderNameAndProviderKey", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/abp/features", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "providerName", +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "providerKey", +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.FeatureManagement.FeatureListDto, Volo.Abp.FeatureManagement.Application.Contracts" +// } +// }, +// "UpdateAsyncByProviderNameAndProviderKeyAndInput": { +// "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/abp/features", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "providerName", +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "providerKey", +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// }, +// "Volo.Abp.PermissionManagement.PermissionsController": { +// "controllerName": "Permissions", +// "typeAsString": "Volo.Abp.PermissionManagement.PermissionsController, Volo.Abp.PermissionManagement.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.PermissionManagement.IPermissionAppService, Volo.Abp.PermissionManagement.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsyncByProviderNameAndProviderKey": { +// "uniqueName": "GetAsyncByProviderNameAndProviderKey", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/abp/permissions", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "providerName", +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "providerKey", +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.PermissionManagement.GetPermissionListResultDto, Volo.Abp.PermissionManagement.Application.Contracts" +// } +// }, +// "UpdateAsyncByProviderNameAndProviderKeyAndInput": { +// "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/abp/permissions", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "providerName", +// "name": "providerName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "providerKey", +// "name": "providerKey", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// } +// } +// }, +// "multi-tenancy": { +// "rootPath": "multi-tenancy", +// "controllers": { +// "Volo.Abp.TenantManagement.TenantController": { +// "controllerName": "Tenant", +// "typeAsString": "Volo.Abp.TenantManagement.TenantController, Volo.Abp.TenantManagement.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.TenantManagement.ITenantAppService, Volo.Abp.TenantManagement.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsyncById": { +// "uniqueName": "GetAsyncById", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/multi-tenancy/tenants/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.TenantManagement.TenantDto, Volo.Abp.TenantManagement.Application.Contracts" +// } +// }, +// "GetListAsyncByInput": { +// "uniqueName": "GetListAsyncByInput", +// "name": "GetListAsync", +// "httpMethod": "GET", +// "url": "api/multi-tenancy/tenants", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "Filter", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Sorting", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "SkipCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "MaxResultCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.PagedResultDto`1[[Volo.Abp.TenantManagement.TenantDto, Volo.Abp.TenantManagement.Application.Contracts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "CreateAsyncByInput": { +// "uniqueName": "CreateAsyncByInput", +// "name": "CreateAsync", +// "httpMethod": "POST", +// "url": "api/multi-tenancy/tenants", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.TenantManagement.TenantDto, Volo.Abp.TenantManagement.Application.Contracts" +// } +// }, +// "UpdateAsyncByIdAndInput": { +// "uniqueName": "UpdateAsyncByIdAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/multi-tenancy/tenants/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.TenantManagement.TenantDto, Volo.Abp.TenantManagement.Application.Contracts" +// } +// }, +// "DeleteAsyncById": { +// "uniqueName": "DeleteAsyncById", +// "name": "DeleteAsync", +// "httpMethod": "DELETE", +// "url": "api/multi-tenancy/tenants/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// }, +// "GetDefaultConnectionStringAsyncById": { +// "uniqueName": "GetDefaultConnectionStringAsyncById", +// "name": "GetDefaultConnectionStringAsync", +// "httpMethod": "GET", +// "url": "api/multi-tenancy/tenants/{id}/default-connection-string", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.String, System.Private.CoreLib" +// } +// }, +// "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { +// "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", +// "name": "UpdateDefaultConnectionStringAsync", +// "httpMethod": "PUT", +// "url": "api/multi-tenancy/tenants/{id}/default-connection-string", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "defaultConnectionString", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "defaultConnectionString", +// "name": "defaultConnectionString", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// }, +// "DeleteDefaultConnectionStringAsyncById": { +// "uniqueName": "DeleteDefaultConnectionStringAsyncById", +// "name": "DeleteDefaultConnectionStringAsync", +// "httpMethod": "DELETE", +// "url": "api/multi-tenancy/tenants/{id}/default-connection-string", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// } +// } +// }, +// "identity": { +// "rootPath": "identity", +// "controllers": { +// "Volo.Abp.Identity.IdentityRoleController": { +// "controllerName": "IdentityRole", +// "typeAsString": "Volo.Abp.Identity.IdentityRoleController, Volo.Abp.Identity.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Identity.IIdentityRoleAppService, Volo.Abp.Identity.Application.Contracts" +// } +// ], +// "actions": { +// "GetListAsync": { +// "uniqueName": "GetListAsync", +// "name": "GetListAsync", +// "httpMethod": "GET", +// "url": "api/identity/roles", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.ListResultDto`1[[Volo.Abp.Identity.IdentityRoleDto, Volo.Abp.Identity.Application.Contracts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "GetAsyncById": { +// "uniqueName": "GetAsyncById", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/identity/roles/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityRoleDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "CreateAsyncByInput": { +// "uniqueName": "CreateAsyncByInput", +// "name": "CreateAsync", +// "httpMethod": "POST", +// "url": "api/identity/roles", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityRoleDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "UpdateAsyncByIdAndInput": { +// "uniqueName": "UpdateAsyncByIdAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/identity/roles/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityRoleDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "DeleteAsyncById": { +// "uniqueName": "DeleteAsyncById", +// "name": "DeleteAsync", +// "httpMethod": "DELETE", +// "url": "api/identity/roles/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// }, +// "Volo.Abp.Identity.IdentityUserController": { +// "controllerName": "IdentityUser", +// "typeAsString": "Volo.Abp.Identity.IdentityUserController, Volo.Abp.Identity.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Identity.IIdentityUserAppService, Volo.Abp.Identity.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsyncById": { +// "uniqueName": "GetAsyncById", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "GetListAsyncByInput": { +// "uniqueName": "GetListAsyncByInput", +// "name": "GetListAsync", +// "httpMethod": "GET", +// "url": "api/identity/users", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "Filter", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "Sorting", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "SkipCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "input", +// "name": "MaxResultCount", +// "typeAsString": "System.Int32, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.PagedResultDto`1[[Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "CreateAsyncByInput": { +// "uniqueName": "CreateAsyncByInput", +// "name": "CreateAsync", +// "httpMethod": "POST", +// "url": "api/identity/users", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "UpdateAsyncByIdAndInput": { +// "uniqueName": "UpdateAsyncByIdAndInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/identity/users/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "DeleteAsyncById": { +// "uniqueName": "DeleteAsyncById", +// "name": "DeleteAsync", +// "httpMethod": "DELETE", +// "url": "api/identity/users/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// }, +// "GetRolesAsyncById": { +// "uniqueName": "GetRolesAsyncById", +// "name": "GetRolesAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/{id}/roles", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Application.Dtos.ListResultDto`1[[Volo.Abp.Identity.IdentityRoleDto, Volo.Abp.Identity.Application.Contracts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null]], Volo.Abp.Ddd.Application.Contracts" +// } +// }, +// "UpdateRolesAsyncByIdAndInput": { +// "uniqueName": "UpdateRolesAsyncByIdAndInput", +// "name": "UpdateRolesAsync", +// "httpMethod": "PUT", +// "url": "api/identity/users/{id}/roles", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// }, +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// }, +// "FindByUsernameAsyncByUsername": { +// "uniqueName": "FindByUsernameAsyncByUsername", +// "name": "FindByUsernameAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/by-username/{userName}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "username", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "username", +// "name": "username", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "FindByEmailAsyncByEmail": { +// "uniqueName": "FindByEmailAsyncByEmail", +// "name": "FindByEmailAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/by-email/{email}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "email", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "email", +// "name": "email", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Application.Contracts" +// } +// } +// } +// }, +// "Volo.Abp.Identity.IdentityUserLookupController": { +// "controllerName": "IdentityUserLookup", +// "typeAsString": "Volo.Abp.Identity.IdentityUserLookupController, Volo.Abp.Identity.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Identity.IIdentityUserLookupAppService, Volo.Abp.Identity.Application.Contracts" +// } +// ], +// "actions": { +// "FindByIdAsyncById": { +// "uniqueName": "FindByIdAsyncById", +// "name": "FindByIdAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/lookup/{id}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "id", +// "name": "id", +// "typeAsString": "System.Guid, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Users.UserData, Volo.Abp.Users.Abstractions" +// } +// }, +// "FindByUserNameAsyncByUserName": { +// "uniqueName": "FindByUserNameAsyncByUserName", +// "name": "FindByUserNameAsync", +// "httpMethod": "GET", +// "url": "api/identity/users/lookup/by-username/{userName}", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "userName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "userName", +// "name": "userName", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": [], +// "bindingSourceId": "Path" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Users.UserData, Volo.Abp.Users.Abstractions" +// } +// } +// } +// }, +// "Volo.Abp.Identity.ProfileController": { +// "controllerName": "Profile", +// "typeAsString": "Volo.Abp.Identity.ProfileController, Volo.Abp.Identity.HttpApi", +// "interfaces": [ +// { +// "typeAsString": "Volo.Abp.Identity.IProfileAppService, Volo.Abp.Identity.Application.Contracts" +// } +// ], +// "actions": { +// "GetAsync": { +// "uniqueName": "GetAsync", +// "name": "GetAsync", +// "httpMethod": "GET", +// "url": "api/identity/my-profile", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.ProfileDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "UpdateAsyncByInput": { +// "uniqueName": "UpdateAsyncByInput", +// "name": "UpdateAsync", +// "httpMethod": "PUT", +// "url": "api/identity/my-profile", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "Volo.Abp.Identity.ProfileDto, Volo.Abp.Identity.Application.Contracts" +// } +// }, +// "ChangePasswordAsyncByInput": { +// "uniqueName": "ChangePasswordAsyncByInput", +// "name": "ChangePasswordAsync", +// "httpMethod": "POST", +// "url": "api/identity/my-profile/change-password", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "input", +// "name": "input", +// "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "Body" +// } +// ], +// "returnValue": { +// "typeAsString": "System.Void, System.Private.CoreLib" +// } +// } +// } +// } +// } +// }, +// "Abp": { +// "rootPath": "Abp", +// "controllers": { +// "Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController": { +// "controllerName": "AbpServiceProxyScript", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController, Volo.Abp.AspNetCore.Mvc", +// "interfaces": [], +// "actions": { +// "GetAllByModel": { +// "uniqueName": "GetAllByModel", +// "name": "GetAll", +// "httpMethod": "GET", +// "url": "Abp/ServiceProxyScript", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "model", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel, Volo.Abp.AspNetCore.Mvc", +// "isOptional": false, +// "defaultValue": null +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "model", +// "name": "Type", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "model", +// "name": "UseCache", +// "typeAsString": "System.Boolean, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "model", +// "name": "Modules", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "model", +// "name": "Controllers", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "model", +// "name": "Actions", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "System.String, System.Private.CoreLib" +// } +// } +// } +// }, +// "Volo.Abp.AspNetCore.Mvc.Localization.AbpLanguagesController": { +// "controllerName": "AbpLanguages", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.Localization.AbpLanguagesController, Volo.Abp.AspNetCore.Mvc", +// "interfaces": [], +// "actions": { +// "SwitchByCultureAndUiCultureAndReturnUrl": { +// "uniqueName": "SwitchByCultureAndUiCultureAndReturnUrl", +// "name": "Switch", +// "httpMethod": "GET", +// "url": "Abp/Languages/Switch", +// "supportedVersions": [], +// "parametersOnMethod": [ +// { +// "name": "culture", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null +// }, +// { +// "name": "uiCulture", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": true, +// "defaultValue": "" +// }, +// { +// "name": "returnUrl", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": true, +// "defaultValue": "" +// } +// ], +// "parameters": [ +// { +// "nameOnMethod": "culture", +// "name": "culture", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "uiCulture", +// "name": "uiCulture", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// }, +// { +// "nameOnMethod": "returnUrl", +// "name": "returnUrl", +// "typeAsString": "System.String, System.Private.CoreLib", +// "isOptional": false, +// "defaultValue": null, +// "constraintTypes": null, +// "bindingSourceId": "ModelBinding" +// } +// ], +// "returnValue": { +// "typeAsString": "Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Abstractions" +// } +// } +// } +// }, +// "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController": { +// "controllerName": "AbpApplicationConfigurationScript", +// "typeAsString": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController, Volo.Abp.AspNetCore.Mvc", +// "interfaces": [], +// "actions": { +// "Get": { +// "uniqueName": "Get", +// "name": "Get", +// "httpMethod": "GET", +// "url": "Abp/ApplicationConfigurationScript", +// "supportedVersions": [], +// "parametersOnMethod": [], +// "parameters": [], +// "returnValue": { +// "typeAsString": "System.String, System.Private.CoreLib" +// } +// } +// } +// } +// } +// } +// } +// } as any) +// }, 0); +// }) diff --git a/npm/packs/client-generator/lib/src/utils/generators.d.ts b/npm/packs/client-generator/lib/src/utils/generators.d.ts new file mode 100644 index 0000000000..c7683c551a --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/generators.d.ts @@ -0,0 +1,9 @@ +import { APIDefination } from '../types/api-defination'; +export interface Argument { + key: string; + type: string; + isOptional?: boolean; +} +export declare function generateArgs(args: Argument[]): string; +export declare function parseParameters(parameters: APIDefination.Parameter[]): Argument[]; +export declare function findType(typeAsString: string): string; diff --git a/npm/packs/client-generator/lib/src/utils/generators.js b/npm/packs/client-generator/lib/src/utils/generators.js new file mode 100644 index 0000000000..265da85f6c --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/generators.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function generateArgs(args) { + return args.reduce(function (acc, val) { + var arg = "" + val.key + (val.isOptional ? '?' : '') + ": " + val.type; + if (acc) + return acc + ", " + arg; + else + return arg; + }, ''); +} +exports.generateArgs = generateArgs; +function parseParameters(parameters) { + return parameters + .filter(function (param) { return param.bindingSourceId === 'Path'; }) + .map(function (param) { + return { key: param.name, type: findType(param.typeAsString), isOptional: param.isOptional }; + }); +} +exports.parseParameters = parseParameters; +function findType(typeAsString) { + if (typeAsString.indexOf('Guid') > -1) + return 'string'; + return 'any'; +} +exports.findType = findType; diff --git a/npm/packs/client-generator/lib/src/utils/prompt.d.ts b/npm/packs/client-generator/lib/src/utils/prompt.d.ts new file mode 100644 index 0000000000..0cde4f1437 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/prompt.d.ts @@ -0,0 +1,2 @@ +export declare const uiSelection: (uiArray: string[]) => Promise; +export declare const moduleSelection: (modules: string[]) => Promise; diff --git a/npm/packs/client-generator/lib/src/utils/prompt.js b/npm/packs/client-generator/lib/src/utils/prompt.js new file mode 100644 index 0000000000..943edd5255 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/prompt.js @@ -0,0 +1,56 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var inquirer_1 = __importDefault(require("inquirer")); +exports.uiSelection = function (uiArray) { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, inquirer_1.default + .prompt({ type: 'list', name: 'Please select an UI', choices: uiArray }) + .then(function (res) { return res['Please select an UI']; })]; + }); +}); }; +exports.moduleSelection = function (modules) { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, inquirer_1.default + .prompt({ type: 'checkbox', name: 'Please select module(s)', choices: modules }) + .then(function (res) { return res['Please select module(s)']; })]; + }); +}); }; diff --git a/npm/packs/client-generator/lib/src/utils/replacer.d.ts b/npm/packs/client-generator/lib/src/utils/replacer.d.ts new file mode 100644 index 0000000000..b313838517 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/replacer.d.ts @@ -0,0 +1 @@ +export declare function replacer(text: string): string; diff --git a/npm/packs/client-generator/lib/src/utils/replacer.js b/npm/packs/client-generator/lib/src/utils/replacer.js new file mode 100644 index 0000000000..2f72a88387 --- /dev/null +++ b/npm/packs/client-generator/lib/src/utils/replacer.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function replacer(text) { + return text.replace(/Async/, ''); +} +exports.replacer = replacer; diff --git a/npm/packs/client-generator/package.json b/npm/packs/client-generator/package.json index 1caf2b449d..17b3ba52ba 100644 --- a/npm/packs/client-generator/package.json +++ b/npm/packs/client-generator/package.json @@ -26,7 +26,8 @@ "fs-extra": "^8.1.0", "inquirer": "^7.0.0", "ora": "^4.0.3", - "path": "^0.12.7" + "path": "^0.12.7", + "snq": "^1.0.3" }, "devDependencies": { "@types/fs-extra": "^8.0.1", diff --git a/npm/packs/client-generator/src/angular.ts b/npm/packs/client-generator/src/angular.ts index b2a8d61b48..0abcd3e195 100644 --- a/npm/packs/client-generator/src/angular.ts +++ b/npm/packs/client-generator/src/angular.ts @@ -1,7 +1,8 @@ import { APIDefination } from './types/api-defination'; import { ServiceTemplates } from './templates/angular/service-templates'; -import changeCase from 'change-case'; +import changeCase, { param } from 'change-case'; import fse from 'fs-extra'; +import { generateArgs, parseParameters } from './utils/generators'; export async function angular(data: APIDefination.Response, selectedModules: string[]) { selectedModules.forEach(async module => { @@ -18,9 +19,10 @@ export async function angular(data: APIDefination.Response, selectedModules: str const element = actions[key]; console.log(element); + const parameters = parseParameters(element.parameters); switch (element.httpMethod) { case 'GET': - contents.push(ServiceTemplates.getMethodTemplate(element.name, element.url)); + contents.push(ServiceTemplates.getMethodTemplate(element.name, element.url, generateArgs(parameters))); break; default: diff --git a/npm/packs/client-generator/src/cli.ts b/npm/packs/client-generator/src/cli.ts index 5b93e134d1..7291c9f0af 100644 --- a/npm/packs/client-generator/src/cli.ts +++ b/npm/packs/client-generator/src/cli.ts @@ -12,10 +12,11 @@ export async function cli(program: any) { const loading = ora('Waiting for the API response... \n'); loading.start(); let data = {} as APIDefination.Response; + const apiUrl = 'https://localhost:44305/api/abp/api-definition'; try { - data = (await axiosInstance.get('https://localhost:44305/api/abp/api-definition')).data; + data = (await axiosInstance.get(apiUrl)).data; } catch (error) { - console.error(error); + console.log(chalk.red('An error occurred when fetching the ' + apiUrl)); process.exit(1); } console.log(data); diff --git a/npm/packs/client-generator/src/utils/generators.ts b/npm/packs/client-generator/src/utils/generators.ts index 9d1c172f1e..1f6557fba1 100644 --- a/npm/packs/client-generator/src/utils/generators.ts +++ b/npm/packs/client-generator/src/utils/generators.ts @@ -1,13 +1,28 @@ -export interface GenerateArgsParam { +import { APIDefination } from '../types/api-defination'; + +export interface Argument { key: string; type: string; isOptional?: boolean; } -export function generateArgs(args: GenerateArgsParam[]): string { +export function generateArgs(args: Argument[]): string { return args.reduce((acc, val) => { const arg = `${val.key}${val.isOptional ? '?' : ''}: ${val.type}`; if (acc) return `${acc}, ${arg}`; else return arg; }, ''); } + +export function parseParameters(parameters: APIDefination.Parameter[]): Argument[] { + return parameters + .filter(param => param.bindingSourceId === 'Path') + .map(param => { + return { key: param.name, type: findType(param.typeAsString), isOptional: param.isOptional }; + }); +} + +export function findType(typeAsString: string): string { + if (typeAsString.indexOf('Guid') > -1) return 'string'; + return 'any'; +} diff --git a/npm/packs/client-generator/yarn.lock b/npm/packs/client-generator/yarn.lock index 020da8e630..9cf2900808 100644 --- a/npm/packs/client-generator/yarn.lock +++ b/npm/packs/client-generator/yarn.lock @@ -1594,6 +1594,11 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +snq@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/snq/-/snq-1.0.3.tgz#f9661d10eebb224c52fc3c50106445c268618168" + integrity sha512-bXcxd1ppFnSNYKq84HyOYuYtbMHCFTZvuPSNCn/80yx9+DLkU/hLqjqCRKRHSDISrL1T/lWGXJyQxWS8TnutFA== + source-map-resolve@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"