Skip to content

Commit

Permalink
fix: Fixed some Obsolete warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jun 15, 2024
1 parent effbcd2 commit 528aa4f
Show file tree
Hide file tree
Showing 86 changed files with 171 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<PropertyGroup Label="Versioning">
<Version>0.10.7</Version>
<Version>0.10.8</Version>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerDefaultPreReleaseIdentifiers>dev</MinVerDefaultPreReleaseIdentifiers>
Expand Down
2 changes: 2 additions & 0 deletions src/libs/OpenApiGenerator.Core/Generation/Sources.Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public static string GenerateModel(
CancellationToken cancellationToken = default)
{
return $@"
{(modelData.Properties.Any(x => x.Type.CSharpType.Contains("AnyOf<") || x.Type.CSharpType.Contains("OneOf<") || x.Type.CSharpType.Contains("AllOf<")) ? @"#pragma warning disable CS0618 // Type or member is obsolete
" : " ")}
#nullable enable
namespace {modelData.Namespace}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.ValidationErrorErrors.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.ValidationErrorErrors.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateChatCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.RunCreateSchemaExtended.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.RunUpdateSchemaExtended.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.ValidationError.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateChatCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.RunCreateSchemaExtended.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.RunUpdateSchemaExtended.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.ValidationError.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.GenerateChatCompletionResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.PullModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.PushModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.GenerateChatCompletionResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.PullModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.PushModelResponse.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.AssistantObject.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.ChatCompletionRequestUserMessage.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateAssistantRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateChatCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateCompletionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateEmbeddingRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateFineTuningJobRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateFineTuningJobRequestHyperparameters.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateFineTuningJobRequestIntegrations.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateImageEditRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateImageRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateImageVariationRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateMessageRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateMessageRequestAttachments.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateModerationRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateRunRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateSpeechRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateThreadAndRunRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateTranscriptionRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.CreateTranslationRequest.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.FineTuningJob.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.FineTuningJobHyperparameters.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.FinetuneChatRequestInput.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.MessageContentTextObjectText.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.MessageDeltaContentTextObjectText.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.MessageDeltaObjectDelta.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//HintName: G.Models.MessageObject.g.cs

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace G
Expand Down
Loading

0 comments on commit 528aa4f

Please sign in to comment.