Skip to content

Commit

Permalink
fix: Prevent OpenApiGenerator generating new project IDs (#1675)
Browse files Browse the repository at this point in the history
Co-authored-by: fundthmcalculus <fundthmcalculus@users.noreply.github.com>
  • Loading branch information
fundthmcalculus and fundthmcalculus committed Jun 17, 2024
1 parent dc4a023 commit b3b2c08
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
1 change: 1 addition & 0 deletions connect/config-csharp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ additionalProperties:
packageAuthors: Trinsic
packageDescription: Trinsic Connect SDK
packageRepositoryUrl: https://github.com/trinsic-id/sdk.git
packageGuid: eae0c21a-20c5-476c-b681-16260b12bf24 # This prevents `openapi-generator-cli` from generating a new GUID each time
netCoreProjectFile: true
optionalProjectFile: true
library: httpclient
Expand Down
2 changes: 1 addition & 1 deletion connect/dotnet/src/Trinsic.Connect/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private static HttpContent PrepareMultipartFormDataContent(RequestOptions option
}
}
}


_ = new List<Tuple<HttpContent, string, string>>();

string contentType = null;
Expand Down
20 changes: 4 additions & 16 deletions connect/dotnet/src/Trinsic.Connect/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,7 @@ public virtual string DateTimeFormat
public virtual IDictionary<string, string> ApiKeyPrefix
{
get => _apiKeyPrefix;
set
{
_apiKeyPrefix = value ?? throw new InvalidOperationException("ApiKeyPrefix collection may not be null.");
}
set => _apiKeyPrefix = value ?? throw new InvalidOperationException("ApiKeyPrefix collection may not be null.");
}

/// <summary>
Expand All @@ -375,10 +372,7 @@ public virtual string DateTimeFormat
public virtual IDictionary<string, string> ApiKey
{
get => _apiKey;
set
{
_apiKey = value ?? throw new InvalidOperationException("ApiKey collection may not be null.");
}
set => _apiKey = value ?? throw new InvalidOperationException("ApiKey collection may not be null.");
}

/// <summary>
Expand All @@ -388,10 +382,7 @@ public virtual string DateTimeFormat
public virtual IList<IReadOnlyDictionary<string, object>> Servers
{
get => _servers;
set
{
_servers = value ?? throw new InvalidOperationException("Servers may not be null.");
}
set => _servers = value ?? throw new InvalidOperationException("Servers may not be null.");
}

/// <summary>
Expand All @@ -401,10 +392,7 @@ public virtual string DateTimeFormat
public virtual IReadOnlyDictionary<string, List<IReadOnlyDictionary<string, object>>> OperationServers
{
get => _operationServers;
set
{
_operationServers = value ?? throw new InvalidOperationException("Operation servers may not be null.");
}
set => _operationServers = value ?? throw new InvalidOperationException("Operation servers may not be null.");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using System.Collections.Generic;
using System.Net;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

Expand Down

0 comments on commit b3b2c08

Please sign in to comment.