Fixed Token transmission to server, loading of berth and ship lists ok!

This commit is contained in:
Daniel Schick 2023-07-14 16:03:45 +02:00
parent 6d4c36d07b
commit 12f36c5113
3 changed files with 211 additions and 83 deletions

View File

@ -1,7 +1,7 @@
//----------------------
// <auto-generated>
// Generated REST API Client Code Generator v1.7.17.0 on 13.07.2023 19:39:52
// Generated REST API Client Code Generator v1.7.17.0 on 14.07.2023 16:01:23
// Using the tool OpenAPI Generator v6.6.0
// </auto-generated>
//----------------------
@ -720,9 +720,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.BerthsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<List<Berth>>("/berths", localVarRequestOptions, this.Configuration);
@ -777,9 +777,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.BerthsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Berth>>("/berths", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -841,9 +841,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.LoginPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Post<LoginResult>("/login", localVarRequestOptions, this.Configuration);
@ -907,9 +907,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.LoginPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<LoginResult>("/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -968,9 +968,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.NotificationsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<Notification>("/notifications", localVarRequestOptions, this.Configuration);
@ -1031,9 +1031,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.NotificationsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Notification>("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1089,9 +1089,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ParticipantGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<Participant>("/participant", localVarRequestOptions, this.Configuration);
@ -1149,9 +1149,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ParticipantGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<Participant>("/participant", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1207,9 +1207,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<List<Shipcall>>("/shipcalls", localVarRequestOptions, this.Configuration);
@ -1267,9 +1267,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Shipcall>>("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1330,9 +1330,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Post<Object>("/shipcalls", localVarRequestOptions, this.Configuration);
@ -1395,9 +1395,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1458,9 +1458,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsPut";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Put<Object>("/shipcalls", localVarRequestOptions, this.Configuration);
@ -1523,9 +1523,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipcallsPut";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/shipcalls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1578,9 +1578,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<List<Ship>>("/ships", localVarRequestOptions, this.Configuration);
@ -1635,9 +1635,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.ShipsGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Ship>>("/ships", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1692,9 +1692,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesDelete";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Delete<Object>("/times", localVarRequestOptions, this.Configuration);
@ -1751,9 +1751,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesDelete";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.DeleteAsync<Object>("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1812,9 +1812,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<List<Times>>("/times", localVarRequestOptions, this.Configuration);
@ -1875,9 +1875,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesGet";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Times>>("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -1938,9 +1938,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Post<Object>("/times", localVarRequestOptions, this.Configuration);
@ -2003,9 +2003,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesPost";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -2066,9 +2066,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesPut";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Put<Object>("/times", localVarRequestOptions, this.Configuration);
@ -2131,9 +2131,9 @@ namespace BreCalClient.misc.Api
localVarRequestOptions.Operation = "DefaultApi.TimesPut";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (ApiKey) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("X-Api-Key")))
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("X-Api-Key", this.Configuration.GetApiKeyWithPrefix("X-Api-Key"));
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/times", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@ -3387,7 +3387,7 @@ namespace BreCalClient.misc.Client
{
Proxy = null;
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp");
BasePath = "https://puls200.dyn-dns.org:8088/brecal/api";
BasePath = "https://brecal.bsmd-emswe.eu";
DefaultHeaders = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
ApiKeyPrefix = new ConcurrentDictionary<string, string>();
@ -3395,8 +3395,8 @@ namespace BreCalClient.misc.Client
{
{
new Dictionary<string, object> {
{"url", "https://puls200.dyn-dns.org:8088/brecal/api"},
{"description", "Test server self-hosted by yours truly"},
{"url", "https://brecal.bsmd-emswe.eu"},
{"description", "Test server hosted on vcup"},
}
}
};
@ -3414,7 +3414,7 @@ namespace BreCalClient.misc.Client
IDictionary<string, string> defaultHeaders,
IDictionary<string, string> apiKey,
IDictionary<string, string> apiKeyPrefix,
string basePath = "https://puls200.dyn-dns.org:8088/brecal/api") : this()
string basePath = "https://brecal.bsmd-emswe.eu") : this()
{
if (string.IsNullOrWhiteSpace(basePath))
throw new ArgumentException("The provided basePath is invalid.", "basePath");
@ -5340,7 +5340,9 @@ namespace BreCalClient.misc.Model
/// <param name="notificationType">notificationType.</param>
/// <param name="timestamp">timestamp.</param>
/// <param name="acknowledged">acknowledged.</param>
public Notification(int id = default(int), int timesId = default(int), int participantId = default(int), NotificationTypeEnum? notificationType = default(NotificationTypeEnum?), DateTime timestamp = default(DateTime), bool acknowledged = default(bool))
/// <param name="created">created.</param>
/// <param name="modified">modified.</param>
public Notification(int id = default(int), int timesId = default(int), int participantId = default(int), NotificationTypeEnum? notificationType = default(NotificationTypeEnum?), DateTime timestamp = default(DateTime), bool acknowledged = default(bool), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.Id = id;
this.TimesId = timesId;
@ -5348,6 +5350,8 @@ namespace BreCalClient.misc.Model
this.NotificationType = notificationType;
this.Timestamp = timestamp;
this.Acknowledged = acknowledged;
this.Created = created;
this.Modified = modified;
}
/// <summary>
/// Gets or Sets Id
@ -5375,6 +5379,16 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "acknowledged", EmitDefaultValue = true)]
public bool Acknowledged { get; set; }
/// <summary>
/// Gets or Sets Created
/// </summary>
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
/// <summary>
/// Gets or Sets Modified
/// </summary>
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
@ -5388,6 +5402,8 @@ namespace BreCalClient.misc.Model
sb.Append(" NotificationType: ").Append(NotificationType).Append("\n");
sb.Append(" Timestamp: ").Append(Timestamp).Append("\n");
sb.Append(" Acknowledged: ").Append(Acknowledged).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -5444,6 +5460,16 @@ namespace BreCalClient.misc.Model
(
this.Acknowledged == input.Acknowledged ||
this.Acknowledged.Equals(input.Acknowledged)
) &&
(
this.Created == input.Created ||
(this.Created != null &&
this.Created.Equals(input.Created))
) &&
(
this.Modified == input.Modified ||
(this.Modified != null &&
this.Modified.Equals(input.Modified))
);
}
/// <summary>
@ -5464,6 +5490,14 @@ namespace BreCalClient.misc.Model
hashCode = (hashCode * 59) + this.Timestamp.GetHashCode();
}
hashCode = (hashCode * 59) + this.Acknowledged.GetHashCode();
if (this.Created != null)
{
hashCode = (hashCode * 59) + this.Created.GetHashCode();
}
if (this.Modified != null)
{
hashCode = (hashCode * 59) + this.Modified.GetHashCode();
}
return hashCode;
}
}
@ -5504,13 +5538,17 @@ namespace BreCalClient.misc.Model
/// <param name="street">street.</param>
/// <param name="postalCode">postalCode.</param>
/// <param name="city">city.</param>
public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string))
/// <param name="created">created.</param>
/// <param name="modified">modified.</param>
public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.Id = id;
this.Name = name;
this.Street = street;
this.PostalCode = postalCode;
this.City = city;
this.Created = created;
this.Modified = modified;
}
/// <summary>
/// Gets or Sets Id
@ -5538,6 +5576,16 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "city", EmitDefaultValue = true)]
public string City { get; set; }
/// <summary>
/// Gets or Sets Created
/// </summary>
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
/// <summary>
/// Gets or Sets Modified
/// </summary>
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
@ -5550,6 +5598,8 @@ namespace BreCalClient.misc.Model
sb.Append(" Street: ").Append(Street).Append("\n");
sb.Append(" PostalCode: ").Append(PostalCode).Append("\n");
sb.Append(" City: ").Append(City).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -5605,6 +5655,16 @@ namespace BreCalClient.misc.Model
this.City == input.City ||
(this.City != null &&
this.City.Equals(input.City))
) &&
(
this.Created == input.Created ||
(this.Created != null &&
this.Created.Equals(input.Created))
) &&
(
this.Modified == input.Modified ||
(this.Modified != null &&
this.Modified.Equals(input.Modified))
);
}
/// <summary>
@ -5633,6 +5693,14 @@ namespace BreCalClient.misc.Model
{
hashCode = (hashCode * 59) + this.City.GetHashCode();
}
if (this.Created != null)
{
hashCode = (hashCode * 59) + this.Created.GetHashCode();
}
if (this.Modified != null)
{
hashCode = (hashCode * 59) + this.Modified.GetHashCode();
}
return hashCode;
}
}
@ -5677,7 +5745,7 @@ namespace BreCalClient.misc.Model
/// <param name="width">width.</param>
/// <param name="created">created.</param>
/// <param name="modified">modified.</param>
public Ship(int id = default(int), string name = default(string), int imo = default(int), string callsign = default(string), int participantId = default(int), float length = default(float), float width = default(float), DateTime created = default(DateTime), DateTime modified = default(DateTime))
public Ship(int id = default(int), string name = default(string), int imo = default(int), string callsign = default(string), int participantId = default(int), float length = default(float), float width = default(float), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.Id = id;
this.Name = name;
@ -5733,7 +5801,7 @@ namespace BreCalClient.misc.Model
/// Gets or Sets Modified
/// </summary>
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime Modified { get; set; }
public DateTime? Modified { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
@ -5942,7 +6010,7 @@ namespace BreCalClient.misc.Model
/// <param name="recommendedTugs">recommendedTugs.</param>
/// <param name="created">created.</param>
/// <param name="modified">modified.</param>
public Shipcall(int id = default(int), int shipId = default(int), TypeEnum type = default(TypeEnum), DateTime eta = default(DateTime), string voyage = default(string), DateTime etd = default(DateTime), int arrivalBerthId = default(int), int departureBerthId = default(int), bool tugReguired = default(bool), bool pilotRequired = default(bool), int flags = default(int), bool pierSide = default(bool), bool bunkering = default(bool), bool replenishing = default(bool), float draft = default(float), DateTime tidalWindowFrom = default(DateTime), DateTime tidalWindowTo = default(DateTime), bool rainSensitiveCargo = default(bool), int recommendedTugs = default(int), DateTime created = default(DateTime), string modified = default(string))
public Shipcall(int id = default(int), int shipId = default(int), TypeEnum type = default(TypeEnum), DateTime eta = default(DateTime), string voyage = default(string), DateTime etd = default(DateTime), int arrivalBerthId = default(int), int departureBerthId = default(int), bool tugReguired = default(bool), bool pilotRequired = default(bool), int flags = default(int), bool pierSide = default(bool), bool bunkering = default(bool), bool replenishing = default(bool), float draft = default(float), DateTime tidalWindowFrom = default(DateTime), DateTime tidalWindowTo = default(DateTime), bool rainSensitiveCargo = default(bool), int recommendedTugs = default(int), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.Id = id;
this.ShipId = shipId;
@ -6071,7 +6139,7 @@ namespace BreCalClient.misc.Model
/// Gets or Sets Modified
/// </summary>
[DataMember(Name = "modified", EmitDefaultValue = true)]
public string Modified { get; set; }
public DateTime? Modified { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
@ -6324,7 +6392,9 @@ namespace BreCalClient.misc.Model
/// <param name="endActual">endActual.</param>
/// <param name="shipcallId">shipcallId (required).</param>
/// <param name="participantId">participantId (required).</param>
public Times(int id = default(int), DateTime startPlanned = default(DateTime), DateTime endPlanned = default(DateTime), int durationPlanned = default(int), DateTime startActual = default(DateTime), DateTime endActual = default(DateTime), int shipcallId = default(int), int participantId = default(int))
/// <param name="created">created.</param>
/// <param name="modified">modified.</param>
public Times(int id = default(int), DateTime startPlanned = default(DateTime), DateTime endPlanned = default(DateTime), int durationPlanned = default(int), DateTime startActual = default(DateTime), DateTime endActual = default(DateTime), int shipcallId = default(int), int participantId = default(int), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{
this.ShipcallId = shipcallId;
this.ParticipantId = participantId;
@ -6334,6 +6404,8 @@ namespace BreCalClient.misc.Model
this.DurationPlanned = durationPlanned;
this.StartActual = startActual;
this.EndActual = endActual;
this.Created = created;
this.Modified = modified;
}
/// <summary>
/// Gets or Sets Id
@ -6376,6 +6448,16 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "participant_id", IsRequired = true, EmitDefaultValue = true)]
public int ParticipantId { get; set; }
/// <summary>
/// Gets or Sets Created
/// </summary>
[DataMember(Name = "created", EmitDefaultValue = true)]
public DateTime Created { get; set; }
/// <summary>
/// Gets or Sets Modified
/// </summary>
[DataMember(Name = "modified", EmitDefaultValue = true)]
public DateTime? Modified { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
@ -6391,6 +6473,8 @@ namespace BreCalClient.misc.Model
sb.Append(" EndActual: ").Append(EndActual).Append("\n");
sb.Append(" ShipcallId: ").Append(ShipcallId).Append("\n");
sb.Append(" ParticipantId: ").Append(ParticipantId).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
@ -6458,6 +6542,16 @@ namespace BreCalClient.misc.Model
(
this.ParticipantId == input.ParticipantId ||
this.ParticipantId.Equals(input.ParticipantId)
) &&
(
this.Created == input.Created ||
(this.Created != null &&
this.Created.Equals(input.Created))
) &&
(
this.Modified == input.Modified ||
(this.Modified != null &&
this.Modified.Equals(input.Modified))
);
}
/// <summary>
@ -6489,6 +6583,14 @@ namespace BreCalClient.misc.Model
}
hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode();
hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode();
if (this.Created != null)
{
hashCode = (hashCode * 59) + this.Created.GetHashCode();
}
if (this.Modified != null)
{
hashCode = (hashCode * 59) + this.Modified.GetHashCode();
}
return hashCode;
}
}

View File

@ -14,12 +14,12 @@ info:
servers:
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step3_servers_object.html
- url : "https://puls200.dyn-dns.org:8088/brecal/api"
description: "Test server self-hosted by yours truly"
- url : "https://brecal.bsmd-emswe.eu/"
description: "Test server hosted on vcup"
paths:
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step4_paths_object.html
/login:
/login:
post:
summary: Returns a JWT session token and user data if successful
requestBody:
@ -35,7 +35,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/login_result'
$ref: '#/components/schemas/login_result'
400:
$ref: '#/components/responses/400'
403:
@ -43,13 +43,13 @@ paths:
500:
$ref: '#/components/responses/500'
503:
$ref: '#/components/responses/503'
$ref: '#/components/responses/503'
/shipcalls:
get:
summary: Gets a list of ship calls
parameters:
- name: participant_id
- name: participant_id
in: query
required: true
description: "**Id of participant**. *Example: 2*. Id of participant entity requesting ship calls"
@ -151,7 +151,7 @@ paths:
500:
$ref: '#/components/responses/500'
503:
$ref: '#/components/responses/503'
$ref: '#/components/responses/503'
/times:
get:
@ -168,7 +168,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/times_list'
$ref: '#/components/schemas/times_list'
400:
$ref: '#/components/responses/400'
401:
@ -221,7 +221,7 @@ paths:
parameters:
- name: id
in: query
required: true
required: true
schema:
$ref: '#/components/schemas/timesId'
responses:
@ -291,10 +291,10 @@ components:
- username
- password
properties:
username:
username:
format : string
password:
format : string
format : string
timesId:
description: The unique identifier for a times entry
type: integer
@ -306,7 +306,7 @@ components:
required:
- id
- ship_id
- type
- type
- eta
- voyage
- etd
@ -314,13 +314,13 @@ components:
id:
$ref: '#/components/schemas/shipcallId'
ship_id:
type: integer
type: integer
type:
type: string
enum:
- incoming
- outgoing
- shifting
- shifting
eta:
type: string
format: date-time
@ -337,7 +337,7 @@ components:
type: boolean
pilot_required:
type: boolean
flags:
flags:
type: integer
pier_side:
type: boolean
@ -363,6 +363,8 @@ components:
format: date-time
modified:
type: string
format: date-time
nullable: true
shipcalls:
type: array
@ -372,7 +374,7 @@ components:
times:
type: object
description: the id parameter needs to be missing on POST and to be present on PUT (Update) calls, otherwise a 400 response will be generated
required:
required:
- shipcall_id
- participant_id
properties:
@ -396,12 +398,19 @@ components:
type: integer
participant_id:
type: integer
created:
type: string
format: date-time
modified:
type: string
format: date-time
nullable: true
times_list:
type: array
items:
$ref: '#/components/schemas/times'
berth:
type: object
description: Ship berth used for a ship call
@ -434,7 +443,7 @@ components:
type: integer
length:
type: number
format: float
format: float
width:
type: number
format: float
@ -444,6 +453,7 @@ components:
modified:
type: string
format: date-time
nullable: true
ship_list:
type: array
@ -468,7 +478,14 @@ components:
format: date-time
acknowledged:
type: boolean
created:
type: string
format: date-time
modified:
type: string
format: date-time
nullable: true
notification_list:
type: array
items:
@ -486,8 +503,15 @@ components:
type: string
postal code:
type: string
city:
city:
type: string
created:
type: string
format: date-time
modified:
type: string
format: date-time
nullable: true
login_result:
type: object
@ -523,7 +547,7 @@ components:
ApiKey:
type: apiKey
in: header
name: X-Api-Key
name: Authorization
responses:
400:
description: Invalid input

View File

@ -38,7 +38,8 @@ namespace BreCalClient
public MainWindow()
{
InitializeComponent();
_api = new DefaultApi();
_api = new DefaultApi();
_api.Configuration.ApiKeyPrefix["Authorization"] = "Bearer";
}
#region event handler
@ -67,6 +68,7 @@ namespace BreCalClient
if(loginResult.Id > 0)
{
this.busyIndicator.IsBusy = false;
this._api.Configuration.ApiKey["Authorization"] = loginResult.Token;
this.LoadStaticLists();
}
}