mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 23:38:06 +02:00
* Correctly get callback type
This commit is contained in:
parent
8cedb10c3a
commit
7148866f8d
@ -104,6 +104,7 @@ type
|
||||
function GetParam(aIndex : Integer): TAPIServiceMethodParam;
|
||||
function GetParamCount: Integer;
|
||||
function GetRequestBodyType: String;
|
||||
function GetResultCallbackType: String;
|
||||
function GetResultType(AIndex: TNameType): String;
|
||||
protected
|
||||
// override this if you want to subclass the parameter
|
||||
@ -136,7 +137,7 @@ type
|
||||
// Component result Dto type
|
||||
Property ResultDtoType : String index ntPascal Read GetResultType;
|
||||
// Callback type for result.
|
||||
Property ResultCallBackType : String Read FResultCallbackType write FResultCallBackType;
|
||||
Property ResultCallBackType : String Read GetResultCallbackType write FResultCallBackType;
|
||||
// OpenAPI Operation for this method.
|
||||
Property Operation : TApiOperation Read FOperation;
|
||||
// Pascal name for the method.
|
||||
@ -495,6 +496,18 @@ begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TAPIServiceMethod.GetResultCallbackType: String;
|
||||
begin
|
||||
Result:=FResultCallbackType;
|
||||
if Result='' then
|
||||
begin
|
||||
Result:=ResultType;
|
||||
if Result='' then
|
||||
Result:='VoidResult';
|
||||
Result:='T'+Result+'CallBack';
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAPIServiceMethod.GetResultType(AIndex: TNameType): String;
|
||||
begin
|
||||
if assigned(FResultDataType) then
|
||||
|
Loading…
Reference in New Issue
Block a user