Skip to content

Commit 42ec4de

Browse files
Merge branch 'develop1.0'
2 parents d9d9507 + cdd0d91 commit 42ec4de

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

ASCOM.Alpaca.Razor/StartupHelpers.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public static void ConfigureSwagger(IServiceCollection services, string host_xml
3232
//This is off for now
3333
//c.UseOneOfForPolymorphism();
3434

35-
c.SwaggerDoc("Alpaca", new OpenApiInfo { Title = $"{DeviceManager.Configuration.ServerName}", Description = "The Alpaca JSON API Specification. You can find the Alpaca HTML Specification and the OmniSim only configuration specification in the drop down. Please note that the Alpaca API documentation on the ASCOM website is the canonical version. There are several issues with this auto generated version that will be resolved in future versions. This is currently provided only for testing.", Version = "v1" });
36-
c.SwaggerDoc("AlpacaSetup", new OpenApiInfo { Title = $"{DeviceManager.Configuration.ServerName}", Description = "Alpaca HTML Setup API - These are used to give the end user a GUI to configure device specific settings.", Version = "v1" });
37-
c.SwaggerDoc("OmniSim", new OpenApiInfo { Title = "OmniSim JSON API", Description="API configuration that is unique to the OmniSim. These are not part of the Alpaca Spec but are helpful to automate testing with the OmniSim.", Version = "v1" });
35+
c.SwaggerDoc("Alpaca", new OpenApiInfo { Title = $"Alpaca JSON API Specification", Description = "The Alpaca JSON API Specification. You can find the Alpaca HTML Specification and the OmniSim only configuration specification in the drop down. Please note that the Alpaca API documentation on the ASCOM website is the canonical version. There are several issues with this auto generated version that will be resolved in future versions. This is currently provided only for testing.", Version = "v1" });
36+
c.SwaggerDoc("AlpacaSetup", new OpenApiInfo { Title = $"Alpaca HTTP Configuration Specification", Description = "Alpaca HTML Setup API - These are used to give the end user a GUI to configure device specific settings.", Version = "v1" });
37+
c.SwaggerDoc("OmniSim", new OpenApiInfo { Title = "OmniSim JSON API", Description = "API configuration that is unique to the OmniSim. These are not part of the Alpaca Spec but are helpful to automate testing with the OmniSim. Note that these have not yet been fully stabilized, expect some changes.", Version = "v1" });
3838

3939

4040
if (File.Exists(host_xml_file))
@@ -80,7 +80,8 @@ public static void ConfigureSwagger(IApplicationBuilder app)
8080
if (DeviceManager.Configuration.RunSwagger)
8181
{
8282
app.UseSwagger();
83-
app.UseSwaggerUI(c => {
83+
app.UseSwaggerUI(c =>
84+
{
8485
c.SwaggerEndpoint("/swagger/Alpaca/swagger.json",
8586
$"Alpaca JSON Endpoints - v1");
8687
c.SwaggerEndpoint("/swagger/AlpacaSetup/swagger.json",

ASCOM.Alpaca.Simulators/Program.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,18 @@ public static void Main(string[] args)
149149

150150
var BlazorTask = InitServers(args);
151151

152-
BlazorTask.Start();
152+
BlazorTask.RunSynchronously();
153153

154-
Console.ReadLine();
155-
156-
// Perform your work here.
154+
Console.WriteLine("OmniSim shutting down...");
155+
}
156+
catch (Exception ex)
157+
{
158+
Logging.LogError(ex.Message);
159+
Console.WriteLine("A fatal error has occurred and the OmniSim is shutting down.");
160+
Console.WriteLine(ex.Message);
157161
}
158162
finally
159163
{
160-
// edited by acidzombie24, added if statement
161164
if (hasHandle)
162165
mutex.ReleaseMutex();
163166
}

0 commit comments

Comments
 (0)