mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
This commit is contained in:
parent
b5471263a2
commit
54bfe71722
@ -8,9 +8,10 @@ uses
|
|||||||
WinAPI.Windows,
|
WinAPI.Windows,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
System.SysUtils,
|
System.SysUtils,
|
||||||
|
MVCFramework,
|
||||||
MVCFramework.Logger,
|
MVCFramework.Logger,
|
||||||
MVCFramework.Commons,
|
MVCFramework.Commons,
|
||||||
MVCFramework.REPLCommandsHandlerU,
|
MVCFramework.Signal,
|
||||||
Web.ReqMulti,
|
Web.ReqMulti,
|
||||||
Web.WebReq,
|
Web.WebReq,
|
||||||
Web.WebBroker,
|
Web.WebBroker,
|
||||||
@ -25,56 +26,19 @@ uses
|
|||||||
procedure RunServer(APort: Integer);
|
procedure RunServer(APort: Integer);
|
||||||
var
|
var
|
||||||
LServer: TIdHTTPWebBrokerBridge;
|
LServer: TIdHTTPWebBrokerBridge;
|
||||||
LCustomHandler: TMVCCustomREPLCommandsHandler;
|
|
||||||
LCmd: string;
|
|
||||||
begin
|
begin
|
||||||
Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
|
Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION);
|
||||||
LCmd := 'start';
|
|
||||||
if ParamCount >= 1 then
|
|
||||||
LCmd := ParamStr(1);
|
|
||||||
|
|
||||||
LCustomHandler :=
|
|
||||||
function(const Value: String; const Server: TIdHTTPWebBrokerBridge; out Handled: Boolean)
|
|
||||||
: THandleCommandResult
|
|
||||||
begin
|
|
||||||
Handled := False;
|
|
||||||
Result := THandleCommandResult.Unknown;
|
|
||||||
end;
|
|
||||||
|
|
||||||
LServer := TIdHTTPWebBrokerBridge.Create(nil);
|
LServer := TIdHTTPWebBrokerBridge.Create(nil);
|
||||||
try
|
try
|
||||||
LServer.OnParseAuthentication := TMVCParseAuthentication.OnParseAuthentication;
|
LServer.OnParseAuthentication := TMVCParseAuthentication.OnParseAuthentication;
|
||||||
LServer.DefaultPort := APort;
|
LServer.DefaultPort := APort;
|
||||||
LServer.MaxConnections := 0;
|
LServer.MaxConnections := 0;
|
||||||
LServer.ListenQueue := 200;
|
LServer.ListenQueue := 200;
|
||||||
|
LServer.Active := True;
|
||||||
|
|
||||||
Writeln('Write "quit" or "exit" to shutdown the server');
|
Writeln('CTRL+C to shutdown the server');
|
||||||
repeat
|
WaitForTerminationSignal;
|
||||||
if LCmd.IsEmpty then
|
EnterInShutdownState;
|
||||||
begin
|
|
||||||
Write('-> ');
|
|
||||||
ReadLn(LCmd)
|
|
||||||
end;
|
|
||||||
try
|
|
||||||
case HandleCommand(LCmd.ToLower, LServer, LCustomHandler) of
|
|
||||||
THandleCommandResult.Continue:
|
|
||||||
begin
|
|
||||||
Continue;
|
|
||||||
end;
|
|
||||||
THandleCommandResult.Break:
|
|
||||||
begin
|
|
||||||
Break;
|
|
||||||
end;
|
|
||||||
THandleCommandResult.Unknown:
|
|
||||||
begin
|
|
||||||
REPLEmit('Unknown command: ' + LCmd);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
LCmd := '';
|
|
||||||
end;
|
|
||||||
until False;
|
|
||||||
|
|
||||||
finally
|
finally
|
||||||
LServer.Free;
|
LServer.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{53EA2B08-DB19-4D58-86AE-E3B7DB674D33}</ProjectGuid>
|
<ProjectGuid>{53EA2B08-DB19-4D58-86AE-E3B7DB674D33}</ProjectGuid>
|
||||||
<ProjectVersion>19.4</ProjectVersion>
|
<ProjectVersion>19.5</ProjectVersion>
|
||||||
<FrameworkType>VCL</FrameworkType>
|
<FrameworkType>VCL</FrameworkType>
|
||||||
<MainSource>SwaggerPrimer.dpr</MainSource>
|
<MainSource>SwaggerPrimer.dpr</MainSource>
|
||||||
<Base>True</Base>
|
<Base>True</Base>
|
||||||
@ -155,28 +155,11 @@
|
|||||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
</Excluded_Packages>
|
</Excluded_Packages>
|
||||||
</Delphi.Personality>
|
</Delphi.Personality>
|
||||||
<Deployment Version="3">
|
<Deployment Version="4">
|
||||||
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule"/>
|
||||||
<Platform Name="iOSSimulator">
|
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule"/>
|
||||||
<Overwrite>true</Overwrite>
|
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule"/>
|
||||||
</Platform>
|
<DeployFile LocalName="bin\SwaggerPrimer.exe" Configuration="Debug" Class="ProjectOutput"/>
|
||||||
</DeployFile>
|
|
||||||
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Overwrite>true</Overwrite>
|
|
||||||
</Platform>
|
|
||||||
</DeployFile>
|
|
||||||
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
|
|
||||||
<Platform Name="OSX32">
|
|
||||||
<Overwrite>true</Overwrite>
|
|
||||||
</Platform>
|
|
||||||
</DeployFile>
|
|
||||||
<DeployFile LocalName="bin\SwaggerPrimer.exe" Configuration="Debug" Class="ProjectOutput">
|
|
||||||
<Platform Name="Win32">
|
|
||||||
<RemoteName>SwaggerPrimer.exe</RemoteName>
|
|
||||||
<Overwrite>true</Overwrite>
|
|
||||||
</Platform>
|
|
||||||
</DeployFile>
|
|
||||||
<DeployClass Name="AdditionalDebugSymbols">
|
<DeployClass Name="AdditionalDebugSymbols">
|
||||||
<Platform Name="OSX32">
|
<Platform Name="OSX32">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
@ -195,16 +178,6 @@
|
|||||||
<Operation>64</Operation>
|
<Operation>64</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="AndroidClassesDexFile">
|
|
||||||
<Platform Name="Android">
|
|
||||||
<RemoteDir>classes</RemoteDir>
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="Android64">
|
|
||||||
<RemoteDir>classes</RemoteDir>
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="AndroidFileProvider">
|
<DeployClass Name="AndroidFileProvider">
|
||||||
<Platform Name="Android">
|
<Platform Name="Android">
|
||||||
<RemoteDir>res\xml</RemoteDir>
|
<RemoteDir>res\xml</RemoteDir>
|
||||||
@ -528,7 +501,7 @@
|
|||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
<Extensions>.dylib</Extensions>
|
<Extensions>.dylib</Extensions>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
<Extensions>.dylib</Extensions>
|
<Extensions>.dylib</Extensions>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -562,7 +535,7 @@
|
|||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<Operation>0</Operation>
|
<Operation>0</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<Operation>0</Operation>
|
<Operation>0</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="OSX32">
|
<Platform Name="OSX32">
|
||||||
@ -583,13 +556,17 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
|
<Platform Name="iOSSimARM64">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPad_AppIcon152">
|
<DeployClass Name="iPad_AppIcon152">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -599,137 +576,27 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPad_Launch1024x768">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch1536x2048">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch1668">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch1668x2388">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2048x1536">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2048x2732">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2224">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2388x1668">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2732x2048">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_Launch2x">
|
<DeployClass Name="iPad_Launch2x">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPad_Launch768x1024">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPad_LaunchDark2x">
|
<DeployClass Name="iPad_LaunchDark2x">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -739,7 +606,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -749,7 +616,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -759,7 +626,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -769,7 +636,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -779,191 +646,37 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPhone_Launch1125">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch1136x640">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch1242">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch1242x2688">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch1334">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch1792">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch2208">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch2436">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch2688x1242">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch2x">
|
<DeployClass Name="iPhone_Launch2x">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPhone_Launch320">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch3x">
|
<DeployClass Name="iPhone_Launch3x">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="iPhone_Launch640">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch640x1136">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch750">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_Launch828">
|
|
||||||
<Platform Name="iOSDevice32">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSDevice64">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
<Platform Name="iOSSimulator">
|
|
||||||
<Operation>1</Operation>
|
|
||||||
</Platform>
|
|
||||||
</DeployClass>
|
|
||||||
<DeployClass Name="iPhone_LaunchDark2x">
|
<DeployClass Name="iPhone_LaunchDark2x">
|
||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -973,7 +686,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -983,7 +696,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -993,7 +706,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -1003,7 +716,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -1013,7 +726,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -1023,7 +736,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -1033,7 +746,7 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
@ -1055,8 +768,11 @@
|
|||||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
|
<Platform Name="iOSSimARM64">
|
||||||
|
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||||
|
<Operation>1</Operation>
|
||||||
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
|
|
||||||
<DeployClass Name="ProjectiOSEntitlements"/>
|
<DeployClass Name="ProjectiOSEntitlements"/>
|
||||||
<DeployClass Name="ProjectiOSInfoPList"/>
|
<DeployClass Name="ProjectiOSInfoPList"/>
|
||||||
<DeployClass Name="ProjectiOSLaunchScreen"/>
|
<DeployClass Name="ProjectiOSLaunchScreen"/>
|
||||||
@ -1067,7 +783,7 @@
|
|||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
@ -1103,7 +819,7 @@
|
|||||||
<Platform Name="iOSDevice64">
|
<Platform Name="iOSDevice64">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimARM64">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
<Platform Name="Linux64">
|
<Platform Name="Linux64">
|
||||||
@ -1160,6 +876,7 @@
|
|||||||
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
|
<ProjectRoot Platform="iOSSimARM64" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
||||||
|
@ -90,7 +90,7 @@ begin
|
|||||||
FMVC.AddMiddleware(TMVCSwaggerMiddleware.Create(FMVC, GetSwagInfoV1, '/api/swagger-v1.json',
|
FMVC.AddMiddleware(TMVCSwaggerMiddleware.Create(FMVC, GetSwagInfoV1, '/api/swagger-v1.json',
|
||||||
'Method for authentication using JSON Web Token (JWT)', False, '','','/api/v1'));
|
'Method for authentication using JSON Web Token (JWT)', False, '','','/api/v1'));
|
||||||
FMVC.AddMiddleware(TMVCSwaggerMiddleware.Create(FMVC, GetSwagInfoV2, '/api/swagger-v2.json',
|
FMVC.AddMiddleware(TMVCSwaggerMiddleware.Create(FMVC, GetSwagInfoV2, '/api/swagger-v2.json',
|
||||||
'Method for authentication using JSON Web Token (JWT)', False, '','','/api/v2'));
|
'Method for authentication using JSON Web Token (JWT)', False, '','','/api/v2', [psHTTP, psHTTPS]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMyWebModule.WebModuleDestroy(Sender: TObject);
|
procedure TMyWebModule.WebModuleDestroy(Sender: TObject);
|
||||||
|
@ -53,6 +53,8 @@ type
|
|||||||
|
|
||||||
TMVCHTTPMethods = set of TMVCHTTPMethodType;
|
TMVCHTTPMethods = set of TMVCHTTPMethodType;
|
||||||
|
|
||||||
|
TMVCTransferProtocolSchemes = set of (psHTTP, psHTTPS);
|
||||||
|
|
||||||
TMVCMediaType = record
|
TMVCMediaType = record
|
||||||
public const
|
public const
|
||||||
APPLICATION_ATOM_XML = 'application/atom+xml';
|
APPLICATION_ATOM_XML = 'application/atom+xml';
|
||||||
|
@ -38,7 +38,7 @@ uses
|
|||||||
MVCFramework.Swagger.Commons,
|
MVCFramework.Swagger.Commons,
|
||||||
Swag.Doc.SecurityDefinition,
|
Swag.Doc.SecurityDefinition,
|
||||||
Swag.Common.Types,
|
Swag.Common.Types,
|
||||||
System.JSON;
|
System.JSON, MVCFramework.Commons;
|
||||||
|
|
||||||
type
|
type
|
||||||
TMVCSwaggerMiddleware = class(TInterfacedObject, IMVCMiddleware)
|
TMVCSwaggerMiddleware = class(TInterfacedObject, IMVCMiddleware)
|
||||||
@ -51,6 +51,7 @@ type
|
|||||||
fHost: string;
|
fHost: string;
|
||||||
fBasePath: string;
|
fBasePath: string;
|
||||||
fPathFilter: string;
|
fPathFilter: string;
|
||||||
|
fTransferProtocolSchemes: TMVCTransferProtocolSchemes;
|
||||||
procedure DocumentApiInfo(const ASwagDoc: TSwagDoc);
|
procedure DocumentApiInfo(const ASwagDoc: TSwagDoc);
|
||||||
procedure DocumentApiSettings(AContext: TWebContext; ASwagDoc: TSwagDoc);
|
procedure DocumentApiSettings(AContext: TWebContext; ASwagDoc: TSwagDoc);
|
||||||
procedure DocumentApiAuthentication(const ASwagDoc: TSwagDoc);
|
procedure DocumentApiAuthentication(const ASwagDoc: TSwagDoc);
|
||||||
@ -58,11 +59,16 @@ type
|
|||||||
procedure SortApiPaths(ASwagDoc: TSwagDoc);
|
procedure SortApiPaths(ASwagDoc: TSwagDoc);
|
||||||
procedure InternalRender(AContent: string; AContext: TWebContext);
|
procedure InternalRender(AContent: string; AContext: TWebContext);
|
||||||
public
|
public
|
||||||
constructor Create(const AEngine: TMVCEngine; const ASwaggerInfo: TMVCSwaggerInfo;
|
constructor Create(
|
||||||
const ASwaggerDocumentationURL: string = '/swagger.json'; const AJWTDescription: string = JWT_DEFAULT_DESCRIPTION;
|
const AEngine: TMVCEngine;
|
||||||
|
const ASwaggerInfo: TMVCSwaggerInfo;
|
||||||
|
const ASwaggerDocumentationURL: string = '/swagger.json';
|
||||||
|
const AJWTDescription: string = JWT_DEFAULT_DESCRIPTION;
|
||||||
const AEnableBasicAuthentication: Boolean = False;
|
const AEnableBasicAuthentication: Boolean = False;
|
||||||
const AHost: string = ''; const ABasePath: string = '';
|
const AHost: string = '';
|
||||||
const APathFilter: String = '');
|
const ABasePath: string = '';
|
||||||
|
const APathFilter: String = '';
|
||||||
|
const ATransferProtocolSchemes: TMVCTransferProtocolSchemes = [psHTTP, psHTTPS]);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure OnBeforeRouting(AContext: TWebContext; var AHandled: Boolean);
|
procedure OnBeforeRouting(AContext: TWebContext; var AHandled: Boolean);
|
||||||
procedure OnBeforeControllerAction(AContext: TWebContext; const AControllerQualifiedClassName: string;
|
procedure OnBeforeControllerAction(AContext: TWebContext; const AControllerQualifiedClassName: string;
|
||||||
@ -77,7 +83,6 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
System.SysUtils,
|
System.SysUtils,
|
||||||
MVCFramework.Commons,
|
|
||||||
System.Classes,
|
System.Classes,
|
||||||
JsonDataObjects,
|
JsonDataObjects,
|
||||||
System.Rtti,
|
System.Rtti,
|
||||||
@ -99,7 +104,8 @@ uses
|
|||||||
constructor TMVCSwaggerMiddleware.Create(const AEngine: TMVCEngine; const ASwaggerInfo: TMVCSwaggerInfo;
|
constructor TMVCSwaggerMiddleware.Create(const AEngine: TMVCEngine; const ASwaggerInfo: TMVCSwaggerInfo;
|
||||||
const ASwaggerDocumentationURL, AJWTDescription: string; const AEnableBasicAuthentication: Boolean;
|
const ASwaggerDocumentationURL, AJWTDescription: string; const AEnableBasicAuthentication: Boolean;
|
||||||
const AHost, ABasePath: string;
|
const AHost, ABasePath: string;
|
||||||
const APathFilter: String);
|
const APathFilter: String;
|
||||||
|
const ATransferProtocolSchemes: TMVCTransferProtocolSchemes);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
fSwagDocURL := ASwaggerDocumentationURL;
|
fSwagDocURL := ASwaggerDocumentationURL;
|
||||||
@ -110,6 +116,7 @@ begin
|
|||||||
fHost := AHost;
|
fHost := AHost;
|
||||||
fBasePath := ABasePath;
|
fBasePath := ABasePath;
|
||||||
fPathFilter := APathFilter;
|
fPathFilter := APathFilter;
|
||||||
|
fTransferProtocolSchemes := ATransferProtocolSchemes;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TMVCSwaggerMiddleware.Destroy;
|
destructor TMVCSwaggerMiddleware.Destroy;
|
||||||
@ -370,6 +377,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMVCSwaggerMiddleware.DocumentApiSettings(AContext: TWebContext; ASwagDoc: TSwagDoc);
|
procedure TMVCSwaggerMiddleware.DocumentApiSettings(AContext: TWebContext; ASwagDoc: TSwagDoc);
|
||||||
|
var
|
||||||
|
lSwagSchemes: TSwagTransferProtocolSchemes;
|
||||||
begin
|
begin
|
||||||
ASwagDoc.Host := fHost;
|
ASwagDoc.Host := fHost;
|
||||||
if ASwagDoc.Host.IsEmpty then
|
if ASwagDoc.Host.IsEmpty then
|
||||||
@ -387,7 +396,16 @@ begin
|
|||||||
ASwagDoc.BasePath := '/';
|
ASwagDoc.BasePath := '/';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ASwagDoc.Schemes := [tpsHttp, tpsHttps];
|
lSwagSchemes := [];
|
||||||
|
if psHTTP in fTransferProtocolSchemes then
|
||||||
|
begin
|
||||||
|
Include(lSwagSchemes, tpsHttp);
|
||||||
|
end;
|
||||||
|
if psHTTPS in fTransferProtocolSchemes then
|
||||||
|
begin
|
||||||
|
Include(lSwagSchemes, tpsHttps);
|
||||||
|
end;
|
||||||
|
ASwagDoc.Schemes := lSwagSchemes;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMVCSwaggerMiddleware.InternalRender(AContent: string; AContext: TWebContext);
|
procedure TMVCSwaggerMiddleware.InternalRender(AContent: string; AContext: TWebContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user