From bd1dfdd7d563182045ab00a8fcb2f33993f08a83 Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Tue, 22 Feb 2022 19:59:56 +0000 Subject: [PATCH] Updated nuget for release Updated change log Bumped version to 0.4.2 --- OpenSky.Agent.Simulator/OpenAPIs/swagger.cs | 240 ++++++++++++------ OpenSky.Agent.Simulator/OpenAPIs/swagger.json | 235 +++++++++++++---- .../OpenSky.Agent.Simulator.csproj | 4 +- OpenSky.Agent.Simulator/packages.config | 2 +- OpenSky.Agent/OpenSky.Agent.csproj | 10 +- OpenSky.Agent/Properties/AssemblyInfo.cs | 4 +- changelog.txt | 4 + 7 files changed, 363 insertions(+), 136 deletions(-) diff --git a/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs b/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs index e96934f..895d44c 100644 --- a/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs +++ b/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs @@ -1790,28 +1790,22 @@ public async System.Threading.Tasks.Task EnableAircraftTypeDe } } - /// Get image for the specified aircraft type. - /// Identifier for the type. + /// Get the list aircraft manufacturers. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID) + public System.Threading.Tasks.Task GetAircraftManufacturersAsync() { - return GetAircraftTypeImageAsync(typeID, System.Threading.CancellationToken.None); + return GetAircraftManufacturersAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get image for the specified aircraft type. - /// Identifier for the type. + /// Get the list aircraft manufacturers. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task GetAircraftManufacturersAsync(System.Threading.CancellationToken cancellationToken) { - if (typeID == null) - throw new System.ArgumentNullException("typeID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); - urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/manufacturers"); var client_ = _httpClient; var disposeClient_ = false; @@ -1843,7 +1837,7 @@ public async System.Threading.Tasks.Task GetAircraftTypeIm var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1870,21 +1864,21 @@ public async System.Threading.Tasks.Task GetAircraftTypeIm } } - /// Update the image of the specified aircraft type. - /// Identifier for the aircraft type. + /// Get image for the specified aircraft type. + /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload) + public System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID) { - return UpdateAircraftTypeImageAsync(typeID, fileUpload, System.Threading.CancellationToken.None); + return GetAircraftTypeImageAsync(typeID, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the image of the specified aircraft type. - /// Identifier for the aircraft type. + /// Get image for the specified aircraft type. + /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { if (typeID == null) throw new System.ArgumentNullException("typeID"); @@ -1899,21 +1893,7 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var boundary_ = System.Guid.NewGuid().ToString(); - var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); - content_.Headers.Remove("Content-Type"); - content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); - if (fileUpload == null) - throw new System.ArgumentNullException("fileUpload"); - else - { - var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); - if (!string.IsNullOrEmpty(fileUpload.ContentType)) - content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); - content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); - } - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1937,7 +1917,7 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1964,22 +1944,28 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm } } - /// Get available aircraft upgrades. + /// Update the image of the specified aircraft type. + /// Identifier for the aircraft type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync() + public System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload) { - return GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken.None); + return UpdateAircraftTypeImageAsync(typeID, fileUpload, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get available aircraft upgrades. + /// Update the image of the specified aircraft type. + /// Identifier for the aircraft type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) { + if (typeID == null) + throw new System.ArgumentNullException("typeID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrades"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); + urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; @@ -1987,7 +1973,21 @@ public async System.Threading.Tasks.Task(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2038,22 +2038,22 @@ public async System.Threading.Tasks.TaskGets all aircraft types (including disabled and previous versions). + /// Get available aircraft upgrades. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAllAircraftTypesAsync() + public System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync() { - return GetAllAircraftTypesAsync(System.Threading.CancellationToken.None); + return GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all aircraft types (including disabled and previous versions). + /// Get available aircraft upgrades. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/all"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrades"); var client_ = _httpClient; var disposeClient_ = false; @@ -2085,7 +2085,7 @@ public async System.Threading.Tasks.Task Get var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2112,22 +2112,22 @@ public async System.Threading.Tasks.Task Get } } - /// Get the list aircraft manufacturers. + /// Gets all aircraft types (including disabled and previous versions). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftManufacturersAsync() + public System.Threading.Tasks.Task GetAllAircraftTypesAsync() { - return GetAircraftManufacturersAsync(System.Threading.CancellationToken.None); + return GetAllAircraftTypesAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the list aircraft manufacturers. + /// Gets all aircraft types (including disabled and previous versions). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftManufacturersAsync(System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task GetAllAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/manufacturers"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/all"); var client_ = _httpClient; var disposeClient_ = false; @@ -2159,7 +2159,7 @@ public async System.Threading.Tasks.Task(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -6016,27 +6016,23 @@ public async System.Threading.Tasks.Task SaveFlightPlanAsync( } /// Start flight. - /// Identifier for the flight plan to start. + /// The start flight model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task StartFlightAsync(System.Guid flightID) + public System.Threading.Tasks.Task StartFlightAsync(StartFlight body) { - return StartFlightAsync(flightID, System.Threading.CancellationToken.None); + return StartFlightAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Start flight. - /// Identifier for the flight plan to start. + /// The start flight model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task StartFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public async System.Threading.Tasks.Task StartFlightAsync(StartFlight body, System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/start/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/start"); var client_ = _httpClient; var disposeClient_ = false; @@ -6044,7 +6040,9 @@ public async System.Threading.Tasks.Task StartFlightAsync(Sys { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); @@ -6069,7 +6067,7 @@ public async System.Threading.Tasks.Task StartFlightAsync(Sys var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -7320,6 +7318,10 @@ public partial class AircraftManufacturerDeliveryLocation [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } + /// Gets the name of the airport. + [Newtonsoft.Json.JsonProperty("airportName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AirportName { get; set; } + /// Gets or sets the identifier of the manufacturer. [Newtonsoft.Json.JsonProperty("manufacturerID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] @@ -8790,7 +8792,7 @@ public partial class FinalReport } - /// 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 + /// 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, 15 = Ferry, -1 = Flight [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] public enum FinancialCategory { @@ -8824,6 +8826,8 @@ public enum FinancialCategory Fines = 14, + Ferry = 15, + Flight = -1, } @@ -9878,6 +9882,18 @@ public partial class LoginResponseApiResponse } + /// New aircraft delivery options. 0 = ManufacturerDeliveryAirport, 1 = ManufacturerFerry, 2 = OutsourceFerry + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + public enum NewAircraftDeliveryOption + { + ManufacturerDeliveryAirport = 0, + + ManufacturerFerry = 1, + + OutsourceFerry = 2, + + } + /// Payload model. [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] public partial class Payload @@ -10141,17 +10157,32 @@ public partial class PurchaseAircraft [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] public partial class PurchaseNewAircraft { - /// Gets or sets the airport ICAO. - [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AirportICAO { get; set; } - [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Country Country { get; set; } + /// Gets or sets the delivery airport ICAO. + [Newtonsoft.Json.JsonProperty("deliveryAirportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DeliveryAirportICAO { get; set; } + + [Newtonsoft.Json.JsonProperty("deliveryOption", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewAircraftDeliveryOption DeliveryOption { get; set; } + + /// Gets or sets the ferry airport ICAO. + [Newtonsoft.Json.JsonProperty("ferryAirportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FerryAirportICAO { get; set; } + /// Gets or sets a value indicating whether to purchase the aircraft for the airline or the user. [Newtonsoft.Json.JsonProperty("forAirline", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ForAirline { get; set; } + /// Gets or sets the number of aircraft to purchase. + [Newtonsoft.Json.JsonProperty("numberOfAircraft", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int NumberOfAircraft { get; set; } + + /// Gets or sets the outsource ferry rate (SkyBucks / NM). + [Newtonsoft.Json.JsonProperty("outsourceFerryRate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int OutsourceFerryRate { get; set; } + /// Gets or sets the identifier of the type. [Newtonsoft.Json.JsonProperty("typeID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid TypeID { get; set; } @@ -10446,6 +10477,65 @@ public enum Simulator } + /// Start flight model. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StartFlight + { + /// Gets or sets the identifier of the flight. + [Newtonsoft.Json.JsonProperty("flightID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid FlightID { get; set; } + + /// Gets or sets a list of states to override the checks for. + [Newtonsoft.Json.JsonProperty("overrideStates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection OverrideStates { get; set; } + + + } + + /// Start flight status. 0 = Started, 1 = AircraftNotAtOrigin, 2 = OriginDoesntSellAvGas, 3 = OriginDoesntSellJetFuel, 4 = NonFlightPlanPayloadsFound, -1 = Error + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + public enum StartFlightStatus + { + Started = 0, + + AircraftNotAtOrigin = 1, + + OriginDoesntSellAvGas = 2, + + OriginDoesntSellJetFuel = 3, + + NonFlightPlanPayloadsFound = 4, + + Error = -1, + + } + + /// API standard response model. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StartFlightStatusApiResponse + { + [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public StartFlightStatus Data { get; set; } + + /// Gets or sets the error details (NULL if no error). + [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ErrorDetails { get; set; } + + /// Gets or sets a value indicating whether this response is reporting an error. + [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsError { get; set; } + + /// Gets or sets the message. + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + /// Gets or sets the status. + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + + } + /// API standard response model. [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] public partial class StringApiResponse diff --git a/OpenSky.Agent.Simulator/OpenAPIs/swagger.json b/OpenSky.Agent.Simulator/OpenAPIs/swagger.json index 12bb57c..0aad88e 100644 --- a/OpenSky.Agent.Simulator/OpenAPIs/swagger.json +++ b/OpenSky.Agent.Simulator/OpenAPIs/swagger.json @@ -987,6 +987,38 @@ } } }, + "/AircraftType/manufacturers": { + "get": { + "tags": [ + "AircraftType" + ], + "summary": "Get the list aircraft manufacturers.", + "description": "sushi.at, 20/02/2022.", + "operationId": "GetAircraftManufacturers", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" + } + } + } + } + } + } + }, "/AircraftType/image/{typeID}": { "get": { "tags": [ @@ -1157,38 +1189,6 @@ } } }, - "/AircraftType/manufacturers": { - "get": { - "tags": [ - "AircraftType" - ], - "summary": "Get the list aircraft manufacturers.", - "description": "sushi.at, 20/02/2022.", - "operationId": "GetAircraftManufacturers", - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AircraftManufacturerIEnumerableApiResponse" - } - } - } - } - } - } - }, "/AircraftType/simulator/{simulator}": { "get": { "tags": [ @@ -3262,7 +3262,7 @@ } } }, - "/Flight/start/{flightID}": { + "/Flight/start": { "post": { "tags": [ "Flight" @@ -3270,35 +3270,43 @@ "summary": "Start flight.", "description": "sushi.at, 10/11/2021.", "operationId": "StartFlight", - "parameters": [ - { - "name": "flightID", - "in": "path", - "description": "Identifier for the flight plan to start.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "requestBody": { + "description": "The start flight model.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlight" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/StartFlight" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/StartFlight" + } } } - ], + }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/StartFlightStatusApiResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/StartFlightStatusApiResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/StartFlightStatusApiResponse" } } } @@ -4143,6 +4151,12 @@ "type": "string", "description": "Gets or sets the airport icao." }, + "airportName": { + "type": "string", + "description": "Gets the name of the airport.", + "nullable": true, + "readOnly": true + }, "manufacturerID": { "maxLength": 5, "minLength": 3, @@ -6121,10 +6135,11 @@ 12, 13, 14, + 15, -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, -1 = Flight", + "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, 15 = Ferry, -1 = Flight", "format": "int32", "x-enumNames": [ "None", @@ -6142,6 +6157,7 @@ "Passengers", "SpecialtyJobs", "Fines", + "Ferry", "Flight" ], "x-enum-varnames": [ @@ -6160,6 +6176,7 @@ "Passengers", "SpecialtyJobs", "Fines", + "Ferry", "Flight" ] }, @@ -7517,6 +7534,26 @@ "additionalProperties": false, "description": "API standard response model." }, + "NewAircraftDeliveryOption": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "description": "New aircraft delivery options. 0 = ManufacturerDeliveryAirport, 1 = ManufacturerFerry, 2 = OutsourceFerry", + "format": "int32", + "x-enumNames": [ + "ManufacturerDeliveryAirport", + "ManufacturerFerry", + "OutsourceFerry" + ], + "x-enum-varnames": [ + "ManufacturerDeliveryAirport", + "ManufacturerFerry", + "OutsourceFerry" + ] + }, "Payload": { "required": [ "description", @@ -7849,18 +7886,36 @@ "PurchaseNewAircraft": { "type": "object", "properties": { - "airportICAO": { + "country": { + "$ref": "#/components/schemas/Country" + }, + "deliveryAirportICAO": { "type": "string", - "description": "Gets or sets the airport ICAO.", + "description": "Gets or sets the delivery airport ICAO.", "nullable": true }, - "country": { - "$ref": "#/components/schemas/Country" + "deliveryOption": { + "$ref": "#/components/schemas/NewAircraftDeliveryOption" + }, + "ferryAirportICAO": { + "type": "string", + "description": "Gets or sets the ferry airport ICAO.", + "nullable": true }, "forAirline": { "type": "boolean", "description": "Gets or sets a value indicating whether to purchase the aircraft for the airline or the user." }, + "numberOfAircraft": { + "type": "integer", + "description": "Gets or sets the number of aircraft to purchase.", + "format": "int32" + }, + "outsourceFerryRate": { + "type": "integer", + "description": "Gets or sets the outsource ferry rate (SkyBucks / NM).", + "format": "int32" + }, "typeID": { "type": "string", "description": "Gets or sets the identifier of the type.", @@ -8225,6 +8280,84 @@ "XPlane11" ] }, + "StartFlight": { + "type": "object", + "properties": { + "flightID": { + "type": "string", + "description": "Gets or sets the identifier of the flight.", + "format": "uuid" + }, + "overrideStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StartFlightStatus" + }, + "description": "Gets or sets a list of states to override the checks for.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Start flight model." + }, + "StartFlightStatus": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + -1 + ], + "type": "integer", + "description": "Start flight status. 0 = Started, 1 = AircraftNotAtOrigin, 2 = OriginDoesntSellAvGas, 3 = OriginDoesntSellJetFuel, 4 = NonFlightPlanPayloadsFound, -1 = Error", + "format": "int32", + "x-enumNames": [ + "Started", + "AircraftNotAtOrigin", + "OriginDoesntSellAvGas", + "OriginDoesntSellJetFuel", + "NonFlightPlanPayloadsFound", + "Error" + ], + "x-enum-varnames": [ + "Started", + "AircraftNotAtOrigin", + "OriginDoesntSellAvGas", + "OriginDoesntSellJetFuel", + "NonFlightPlanPayloadsFound", + "Error" + ] + }, + "StartFlightStatusApiResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StartFlightStatus" + }, + "errorDetails": { + "type": "string", + "description": "Gets or sets the error details (NULL if no error).", + "nullable": true + }, + "isError": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this response is reporting an error." + }, + "message": { + "type": "string", + "description": "Gets or sets the message.", + "nullable": true + }, + "status": { + "type": "string", + "description": "Gets or sets the status.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "API standard response model." + }, "StringApiResponse": { "type": "object", "properties": { diff --git a/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj b/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj index 40bed1f..cc3322f 100644 --- a/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj +++ b/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj @@ -71,8 +71,8 @@ - - ..\packages\TomsToolbox.Essentials.2.7.4\lib\net45\TomsToolbox.Essentials.dll + + ..\packages\TomsToolbox.Essentials.2.7.6\lib\net45\TomsToolbox.Essentials.dll diff --git a/OpenSky.Agent.Simulator/packages.config b/OpenSky.Agent.Simulator/packages.config index 5069735..089197b 100644 --- a/OpenSky.Agent.Simulator/packages.config +++ b/OpenSky.Agent.Simulator/packages.config @@ -6,6 +6,6 @@ - + \ No newline at end of file diff --git a/OpenSky.Agent/OpenSky.Agent.csproj b/OpenSky.Agent/OpenSky.Agent.csproj index a085d37..55518bb 100644 --- a/OpenSky.Agent/OpenSky.Agent.csproj +++ b/OpenSky.Agent/OpenSky.Agent.csproj @@ -366,7 +366,7 @@ 2021.3.0 - 1.12.0 + 1.13.0 6.0.0 @@ -392,16 +392,16 @@ 0.1.5 - 19.4.0.50 + 19.4.0.53 - 19.4.0.50 + 19.4.0.53 - 19.4.0.50 + 19.4.0.53 - 2.7.4 + 2.7.6 5.0.6 diff --git a/OpenSky.Agent/Properties/AssemblyInfo.cs b/OpenSky.Agent/Properties/AssemblyInfo.cs index 422e187..2364026 100644 --- a/OpenSky.Agent/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent/Properties/AssemblyInfo.cs @@ -21,8 +21,8 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: AssemblyVersion("0.4.1")] -[assembly: AssemblyFileVersion("0.4.1")] +[assembly: AssemblyVersion("0.4.2")] +[assembly: AssemblyFileVersion("0.4.2")] // This allows us to detect debug mode in XAML #if DEBUG diff --git a/changelog.txt b/changelog.txt index e7dde0a..9eace9f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,10 @@ ====================================================================================== OpenSky Agent for MSFS Changelog ====================================================================================== +-------------------------------------------------------------------------------------- +Version 0.4.2 (ALPHA4) +-------------------------------------------------------------------------------------- +- Extended aicraft types page with new manufacturer and aircraft properties -------------------------------------------------------------------------------------- Version 0.4.1 (ALPHA4)