Skip to content

Commit

Permalink
Updated swagger, removed app.config, updated gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sushiat committed Feb 12, 2022
1 parent 39ad6d9 commit ebfc2e2
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 116 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@ healthchecksdb
#OpenSky specific
Installer/Libraries.wxs
Installer/SoundPacks.wxs
OpenSky.AgentMSFS/app.config
OpenSky.Agent/app.config
336 changes: 314 additions & 22 deletions OpenSky.Agent.Simulator/OpenAPIs/swagger.cs

Large diffs are not rendered by default.

244 changes: 221 additions & 23 deletions OpenSky.Agent.Simulator/OpenAPIs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,38 @@
}
}
},
"/DataImport": {
"get": {
"tags": [
"DataImport"
],
"summary": "Get data imports.",
"description": "sushi.at, 02/07/2021.",
"operationId": "GetDataImports",
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
}
}
}
}
}
}
},
"/DataImport/status/{importID}": {
"get": {
"tags": [
Expand Down Expand Up @@ -2200,44 +2232,63 @@
}
}
},
"/DataImport": {
"get": {
"/DataImport/littleNavmapMSFS": {
"post": {
"tags": [
"DataImport"
],
"summary": "Get data imports.",
"description": "sushi.at, 02/07/2021.",
"operationId": "GetDataImports",
"summary": "Post LittleNavmap MSFS sqlite database for import.",
"description": "sushi.at, 04/05/2021.",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"fileUpload": {
"type": "string",
"format": "binary"
}
}
},
"encoding": {
"fileUpload": {
"style": "form"
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
"$ref": "#/components/schemas/GuidNullableApiResponse"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
"$ref": "#/components/schemas/GuidNullableApiResponse"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/DataImportIEnumerableApiResponse"
"$ref": "#/components/schemas/GuidNullableApiResponse"
}
}
}
}
}
}
},
"/DataImport/littleNavmapMSFS": {
"/DataImport/littleNavmapXP11": {
"post": {
"tags": [
"DataImport"
],
"summary": "Post LittleNavmap MSFS sqlite database for import.",
"summary": "Post LittleNavmap XPlane11 sqlite database for import.",
"description": "sushi.at, 04/05/2021.",
"requestBody": {
"content": {
Expand Down Expand Up @@ -3162,6 +3213,67 @@
}
}
},
"/Job/atAirportForSim/{icao}/{direction}/{simulator}": {
"get": {
"tags": [
"Job"
],
"summary": "Gets the available jobs at the specified airport and simulator.",
"description": "sushi.at, 10/12/2021.",
"operationId": "GetJobsAtAirportForSimulator",
"parameters": [
{
"name": "icao",
"in": "path",
"description": "The ICAO code of the airport.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "direction",
"in": "path",
"description": "The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip",
"required": true,
"schema": {
"$ref": "#/components/schemas/JobDirection"
}
},
{
"name": "simulator",
"in": "path",
"description": "The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11",
"required": true,
"schema": {
"$ref": "#/components/schemas/Simulator"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
}
}
}
}
}
},
"/Job/atAirport/{icao}/{direction}": {
"get": {
"tags": [
Expand Down Expand Up @@ -3214,7 +3326,77 @@
}
}
},
"/Job/atAirport/{icao}/{direction}/{category}": {
"/Job/atAirportForCategoryAndSim/{icao}/{direction}/{category}/{simulator}": {
"get": {
"tags": [
"Job"
],
"summary": "Gets the available jobs at the specified airport for the specified aircraft type category and simulator.",
"description": "sushi.at, 10/12/2021.",
"operationId": "GetJobsAtAirportForCategoryAndSimulator",
"parameters": [
{
"name": "icao",
"in": "path",
"description": "The ICAO code of the airport.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "direction",
"in": "path",
"description": "The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip",
"required": true,
"schema": {
"$ref": "#/components/schemas/JobDirection"
}
},
{
"name": "category",
"in": "path",
"description": "The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL",
"required": true,
"schema": {
"$ref": "#/components/schemas/AircraftTypeCategory"
}
},
{
"name": "simulator",
"in": "path",
"description": "The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11",
"required": true,
"schema": {
"$ref": "#/components/schemas/Simulator"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/JobIEnumerableApiResponse"
}
}
}
}
}
}
},
"/Job/atAirportForCategory/{icao}/{direction}/{category}": {
"get": {
"tags": [
"Job"
Expand Down Expand Up @@ -3631,8 +3813,8 @@
"nullable": true
},
"registry": {
"maxLength": 10,
"minLength": 5,
"maxLength": 12,
"minLength": 7,
"type": "string",
"description": "Gets or sets the aircraft registration."
},
Expand Down Expand Up @@ -4292,7 +4474,10 @@
"type": "boolean",
"description": "Gets or sets a value indicating whether the airport has AV gas for refueling."
},
"hasBeenPopulated": {
"hasBeenPopulatedMSFS": {
"$ref": "#/components/schemas/ProcessingStatus"
},
"hasBeenPopulatedXP11": {
"$ref": "#/components/schemas/ProcessingStatus"
},
"hasJetFuel": {
Expand Down Expand Up @@ -4341,7 +4526,7 @@
},
"msfs": {
"type": "boolean",
"description": "Gets or sets a value indicating whether the airport if available in MSFS 2020."
"description": "Gets or sets a value indicating whether the airport is available in MSFS 2020."
},
"name": {
"maxLength": 50,
Expand Down Expand Up @@ -4424,6 +4609,10 @@
"description": "Gets or sets the unicom frequency (if available).",
"format": "int32",
"nullable": true
},
"xP11": {
"type": "boolean",
"description": "Gets or sets a value indicating whether the airport is available in XPlane 11."
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -5593,10 +5782,11 @@
11,
12,
13,
14
14,
-1
],
"type": "integer",
"description": "Financial categories. 0 = None, 1 = Aircraft, 2 = Fuel, 3 = Maintenance, 4 = AirportFees, 5 = Salaries, 6 = Loan, 7 = Interest, 8 = Shares, 9 = Dividend, 10 = FBO, 11 = Cargo, 12 = Passengers, 13 = SpecialtyJobs, 14 = Fines",
"description": "Financial categories. 0 = None, 1 = Aircraft, 2 = Fuel, 3 = Maintenance, 4 = AirportFees, 5 = Salaries, 6 = Loan, 7 = Interest, 8 = Shares, 9 = Dividend, 10 = FBO, 11 = Cargo, 12 = Passengers, 13 = SpecialtyJobs, 14 = Fines, -1 = Flight",
"format": "int32",
"x-enumNames": [
"None",
Expand All @@ -5613,7 +5803,8 @@
"Cargo",
"Passengers",
"SpecialtyJobs",
"Fines"
"Fines",
"Flight"
],
"x-enum-varnames": [
"None",
Expand All @@ -5630,7 +5821,8 @@
"Cargo",
"Passengers",
"SpecialtyJobs",
"Fines"
"Fines",
"Flight"
]
},
"FinancialOverview": {
Expand Down Expand Up @@ -6219,6 +6411,9 @@
"description": "Gets or sets the route.",
"nullable": true
},
"simulator": {
"$ref": "#/components/schemas/Simulator"
},
"started": {
"type": "string",
"description": "Gets or sets the Date/Time of when the flight was started.",
Expand Down Expand Up @@ -6825,16 +7020,19 @@
},
"JobType": {
"enum": [
0
0,
1
],
"type": "integer",
"description": "Job types. 0 = Cargo",
"description": "Job types. 0 = Cargo_L, 1 = Cargo_S",
"format": "int32",
"x-enumNames": [
"Cargo"
"Cargo_L",
"Cargo_S"
],
"x-enum-varnames": [
"Cargo"
"Cargo_L",
"Cargo_S"
]
},
"LinkedAccounts": {
Expand Down
2 changes: 2 additions & 0 deletions OpenSky.Agent/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ namespace OpenSky.Agent
using OpenSky.Agent.Simulator.Enums;
using OpenSky.Agent.Simulator.Models;
using OpenSky.Agent.Simulator.Tools;
#if DEBUG
using OpenSky.Agent.Tools;
#endif

using OpenSkyApi;

Expand Down
2 changes: 2 additions & 0 deletions OpenSky.Agent/Views/Models/StartupViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ namespace OpenSky.Agent.Views.Models
using System.Windows.Media.Imaging;

using DiscordRPC;
#if DEBUG
using DiscordRPC.Logging;
#endif

using JetBrains.Annotations;

Expand Down
Loading

0 comments on commit ebfc2e2

Please sign in to comment.