Browse Source

feat(client-generator): improve api defination model

pull/2225/head
mehmet-erim 6 years ago
parent
commit
358f5fe76d
  1. 41
      npm/packs/client-generator/src/types/api-defination.ts

41
npm/packs/client-generator/src/types/api-defination.ts

@ -9,6 +9,45 @@ export namespace APIDefination {
export interface Module {
rootPath: string;
controllers: { [key: string]: any };
controllers: { [key: string]: Controller };
}
export interface Controller {
controllerName: string;
interfaces: { typeAsString: string }[];
typeAsString: string;
actions: { [key: string]: Action };
}
export interface Action {
uniqueName: string;
name: string;
httpMethod: string;
url: string;
supportedVersions: any[];
parametersOnMethod: ParametersOnMethod[];
parameters: Parameter[];
returnValue: ReturnValue;
}
export interface Parameter {
nameOnMethod: string;
name: string;
typeAsString: string;
isOptional: boolean;
defaultValue: null;
constraintTypes: null;
bindingSourceId: string;
}
export interface ParametersOnMethod {
name: string;
typeAsString: string;
isOptional: boolean;
defaultValue: null;
}
export interface ReturnValue {
typeAsString: string;
}
}

Loading…
Cancel
Save