From 7dc08a5c811e97117a8d7d42dd87f9ef34a3e7e9 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Sat, 11 May 2024 10:31:10 +0400 Subject: [PATCH] feat: Added Settings.UseRequiredKeyword. --- .../Commands/GenerateCommand.cs | 1 + .../Generation/Sources.Models.cs | 30 +- .../Json/IJsonSerializer.cs | 3 +- .../Json/NewtonsoftJsonSerializer.cs | 10 +- .../Json/SystemTextJsonSerializer.cs | 7 +- .../OpenApiGenerator.Core/Models/ModelData.cs | 6 + .../Models/SdkFeatureUsage.cs | 8 + .../OpenApiGenerator.Core/Models/Settings.cs | 1 + .../OpenApiGenerator/OpenApiGenerator.props | 2 + .../OpenApiGenerator/OptionsExtensions.cs | 20 +- .../OpenApiGenerator.SnapshotTests.csproj | 1 + .../Tests.Empty_Diagnostics.verified.txt | 0 .../Tests.Empty_Diagnostics.verified.txt} | 0 .../Tests.Ollama_Diagnostics.verified.txt} | 0 .../_#G.Models.CopyModelRequest.g.verified.cs | 32 ++ ...#G.Models.CreateModelRequest.g.verified.cs | 40 +++ ...G.Models.CreateModelResponse.g.verified.cs | 24 ++ ...ls.CreateModelResponseStatus.g.verified.cs | 29 ++ ..._#G.Models.CreateModelStatus.g.verified.cs | 19 ++ ...#G.Models.DeleteModelRequest.g.verified.cs | 26 ++ ...enerateChatCompletionRequest.g.verified.cs | 63 ++++ ...eChatCompletionRequestFormat.g.verified.cs | 21 ++ ...nerateChatCompletionResponse.g.verified.cs | 88 ++++++ ...ls.GenerateCompletionRequest.g.verified.cs | 95 ++++++ ...erateCompletionRequestFormat.g.verified.cs | 21 ++ ...s.GenerateCompletionResponse.g.verified.cs | 96 ++++++ ...els.GenerateEmbeddingRequest.g.verified.cs | 39 +++ ...ls.GenerateEmbeddingResponse.g.verified.cs | 25 ++ .../_#G.Models.Message.g.verified.cs | 37 +++ .../_#G.Models.MessageRole.g.verified.cs | 29 ++ .../_#G.Models.Model.g.verified.cs | 40 +++ .../_#G.Models.ModelInfo.g.verified.cs | 46 +++ .../_#G.Models.ModelInfoRequest.g.verified.cs | 26 ++ .../_#G.Models.ModelsResponse.g.verified.cs | 24 ++ .../_#G.Models.PullModelRequest.g.verified.cs | 41 +++ ..._#G.Models.PullModelResponse.g.verified.cs | 48 +++ ...dels.PullModelResponseStatus.g.verified.cs | 45 +++ .../_#G.Models.PullModelStatus.g.verified.cs | 20 ++ .../_#G.Models.PushModelRequest.g.verified.cs | 40 +++ ..._#G.Models.PushModelResponse.g.verified.cs | 38 +++ ...dels.PushModelResponseStatus.g.verified.cs | 34 +++ .../_#G.Models.PushModelStatus.g.verified.cs | 19 ++ .../_#G.Models.RequestOptions.g.verified.cs | 216 +++++++++++++ .../_#G.Models.ResponseFormat.g.verified.cs | 21 ++ .../Tests.Ollama_Diagnostics.verified.txt} | 0 .../_#G.Models.CopyModelRequest.g.verified.cs | 2 + ...#G.Models.CreateModelRequest.g.verified.cs | 2 + ...G.Models.CreateModelResponse.g.verified.cs | 0 ...ls.CreateModelResponseStatus.g.verified.cs | 0 ..._#G.Models.CreateModelStatus.g.verified.cs | 0 ...#G.Models.DeleteModelRequest.g.verified.cs | 1 + ...enerateChatCompletionRequest.g.verified.cs | 2 + ...eChatCompletionRequestFormat.g.verified.cs | 0 ...nerateChatCompletionResponse.g.verified.cs | 0 ...ls.GenerateCompletionRequest.g.verified.cs | 2 + ...erateCompletionRequestFormat.g.verified.cs | 0 ...s.GenerateCompletionResponse.g.verified.cs | 0 ...els.GenerateEmbeddingRequest.g.verified.cs | 2 + ...ls.GenerateEmbeddingResponse.g.verified.cs | 0 .../_#G.Models.Message.g.verified.cs | 2 + .../_#G.Models.MessageRole.g.verified.cs | 0 .../_#G.Models.Model.g.verified.cs | 0 .../_#G.Models.ModelInfo.g.verified.cs | 0 .../_#G.Models.ModelInfoRequest.g.verified.cs | 1 + .../_#G.Models.ModelsResponse.g.verified.cs | 0 .../_#G.Models.PullModelRequest.g.verified.cs | 1 + ..._#G.Models.PullModelResponse.g.verified.cs | 0 ...dels.PullModelResponseStatus.g.verified.cs | 0 .../_#G.Models.PullModelStatus.g.verified.cs | 0 .../_#G.Models.PushModelRequest.g.verified.cs | 1 + ..._#G.Models.PushModelResponse.g.verified.cs | 0 ...dels.PushModelResponseStatus.g.verified.cs | 0 .../_#G.Models.PushModelStatus.g.verified.cs | 0 .../_#G.Models.RequestOptions.g.verified.cs | 0 .../_#G.Models.ResponseFormat.g.verified.cs | 0 .../Tests.OpenAi_Diagnostics.verified.txt} | 0 ..._#G.Api.EndPoints.ListModels.g.verified.cs | 0 ...dels.CreateCompletionRequest.g.verified.cs | 153 ++++++++++ ...teCompletionRequestLogitBias.g.verified.cs | 22 ++ ...CreateCompletionRequestModel.g.verified.cs | 64 ++++ ...els.CreateModerationResponse.g.verified.cs | 36 +++ ...ateModerationResponseResults.g.verified.cs | 36 +++ ...ionResponseResultsCategories.g.verified.cs | 84 ++++++ ...esponseResultsCategoryScores.g.verified.cs | 84 ++++++ ...G.Models.DeleteModelResponse.g.verified.cs | 36 +++ .../_#G.Models.Error.g.verified.cs | 42 +++ .../_#G.Models.ErrorResponse.g.verified.cs | 24 ++ ...#G.Models.ListModelsResponse.g.verified.cs | 30 ++ ...els.ListModelsResponseObject.g.verified.cs | 19 ++ .../_#G.Models.Model.g.verified.cs | 42 +++ .../_#G.Models.ModelObject.g.verified.cs | 19 ++ .../Tests.OpenAi_Diagnostics.verified.txt} | 0 ..._#G.Api.EndPoints.ListModels.g.verified.cs | 13 + ...dels.CreateCompletionRequest.g.verified.cs | 2 + ...teCompletionRequestLogitBias.g.verified.cs | 0 ...CreateCompletionRequestModel.g.verified.cs | 0 ...els.CreateModerationResponse.g.verified.cs | 3 + ...ateModerationResponseResults.g.verified.cs | 3 + ...ionResponseResultsCategories.g.verified.cs | 11 + ...esponseResultsCategoryScores.g.verified.cs | 11 + ...G.Models.DeleteModelResponse.g.verified.cs | 3 + .../_#G.Models.Error.g.verified.cs | 4 + .../_#G.Models.ErrorResponse.g.verified.cs | 1 + ...#G.Models.ListModelsResponse.g.verified.cs | 2 + ...els.ListModelsResponseObject.g.verified.cs | 0 .../_#G.Models.Model.g.verified.cs | 4 + .../_#G.Models.ModelObject.g.verified.cs | 0 ...mpletionResponse_Diagnostics.verified.txt} | 0 .../_#G.Models.CompletionUsage.g.verified.cs | 36 +++ ...els.CreateCompletionResponse.g.verified.cs | 61 ++++ ...ateCompletionResponseChoices.g.verified.cs | 44 +++ ...nResponseChoicesFinishReason.g.verified.cs | 31 ++ ...etionResponseChoicesLogprobs.g.verified.cs | 42 +++ ...seChoicesLogprobsTopLogprobs.g.verified.cs | 19 ++ ...eateCompletionResponseObject.g.verified.cs | 19 ++ ...mpletionResponse_Diagnostics.verified.txt} | 0 .../_#G.Models.CompletionUsage.g.verified.cs | 3 + ...els.CreateCompletionResponse.g.verified.cs | 5 + ...ateCompletionResponseChoices.g.verified.cs | 4 + ...nResponseChoicesFinishReason.g.verified.cs | 0 ...etionResponseChoicesLogprobs.g.verified.cs | 0 ...seChoicesLogprobsTopLogprobs.g.verified.cs | 0 ...eateCompletionResponseObject.g.verified.cs | 0 ...s.OpenApi3_0_Yaml_Diagnostics.verified.txt | 1 + ...s.OpenApi3_0_Yaml_Diagnostics.verified.txt | 1 + ...YamlWithLocalFile_Diagnostics.verified.txt | 1 + .../_#G.Models.AbuseResponse.g.verified.cs | 54 ++++ .../_#G.Models.AsnResponse.g.verified.cs | 102 +++++++ .../_#G.Models.AsnResponseType.g.verified.cs | 39 +++ .../_#G.Models.Carrier.g.verified.cs | 36 +++ .../_#G.Models.Company.g.verified.cs | 36 +++ .../_#G.Models.CompanyType.g.verified.cs | 34 +++ .../_#G.Models.DomainsResponse.g.verified.cs | 42 +++ .../_#G.Models.Error.g.verified.cs | 24 ++ .../_#G.Models.ErrorError.g.verified.cs | 30 ++ .../_#G.Models.FullResponse.g.verified.cs | 108 +++++++ .../_#G.Models.Prefix.g.verified.cs | 60 ++++ .../_#G.Models.Prefix6.g.verified.cs | 60 ++++ .../_#G.Models.PrivacyResponse.g.verified.cs | 54 ++++ .../_#G.Models.RangesResponse.g.verified.cs | 36 +++ ...YamlWithLocalFile_Diagnostics.verified.txt | 1 + .../_#G.Models.AbuseResponse.g.verified.cs | 0 .../_#G.Models.AsnResponse.g.verified.cs | 4 + .../_#G.Models.AsnResponseType.g.verified.cs | 0 .../_#G.Models.Carrier.g.verified.cs | 3 + .../_#G.Models.Company.g.verified.cs | 3 + .../_#G.Models.CompanyType.g.verified.cs | 0 .../_#G.Models.DomainsResponse.g.verified.cs | 1 + .../_#G.Models.Error.g.verified.cs | 1 + .../_#G.Models.ErrorError.g.verified.cs | 2 + .../_#G.Models.FullResponse.g.verified.cs | 1 + .../_#G.Models.Prefix.g.verified.cs | 4 + .../_#G.Models.Prefix6.g.verified.cs | 4 + .../_#G.Models.PrivacyResponse.g.verified.cs | 6 + .../_#G.Models.RangesResponse.g.verified.cs | 3 + .../_#G.Models.AbuseResponse.verified.cs | 84 ------ .../_#G.Models.AsnResponse.verified.cs | 150 ---------- .../_#G.Models.Carrier.verified.cs | 72 ----- .../_#G.Models.Company.verified.cs | 91 ------ .../_#G.Models.DomainsResponse.verified.cs | 74 ----- .../_#G.Models.Error.verified.cs | 87 ------ .../_#G.Models.FullResponse.verified.cs | 130 -------- .../_#G.Models.Prefix.verified.cs | 93 ------ .../_#G.Models.Prefix6.verified.cs | 93 ------ .../_#G.Models.PrivacyResponse.verified.cs | 85 ------ .../_#G.Models.RangesResponse.verified.cs | 72 ----- ...Tests.YamlWithUrl_Diagnostics.verified.txt | 1 + ...Tests.YamlWithUrl_Diagnostics.verified.txt | 1 + .../Tests.Helpers.cs | 25 +- .../OpenApiGenerator.SnapshotTests/Tests.cs | 62 ++-- .../OpenApiGenerator.UnitTests/ModelTests.cs | 1 + .../Snapshots/Ollama/_.verified.txt | 30 ++ .../Snapshots/OpenAi/_.verified.txt | 283 ++++++++++++++++++ 173 files changed, 3576 insertions(+), 1068 deletions(-) create mode 100644 src/libs/OpenApiGenerator.Core/Models/SdkFeatureUsage.cs rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/{ => NewtonsoftJson}/Tests.Empty_Diagnostics.verified.txt (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{Ollama/Tests.Ollama_Diagnostics.verified.txt => Empty/SystemTextJson/Tests.Empty_Diagnostics.verified.txt} (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{OpenAi/Tests.OpenAi_Diagnostics.verified.txt => Ollama/NewtonsoftJson/Tests.Ollama_Diagnostics.verified.txt} (100%) create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CopyModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.DeleteModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Model.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfo.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfoRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.RequestOptions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{OpenAi_CreateCompletionResponse/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt => Ollama/SystemTextJson/Tests.Ollama_Diagnostics.verified.txt} (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.CopyModelRequest.g.verified.cs (89%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.CreateModelRequest.g.verified.cs (93%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.CreateModelResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.CreateModelResponseStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.CreateModelStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.DeleteModelRequest.g.verified.cs (94%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateChatCompletionRequest.g.verified.cs (96%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateChatCompletionResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateCompletionRequest.g.verified.cs (97%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateCompletionResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateEmbeddingRequest.g.verified.cs (92%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.GenerateEmbeddingResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.Message.g.verified.cs (91%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.MessageRole.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.Model.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.ModelInfo.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.ModelInfoRequest.g.verified.cs (94%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.ModelsResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PullModelRequest.g.verified.cs (96%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PullModelResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PullModelResponseStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PullModelStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PushModelRequest.g.verified.cs (96%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PushModelResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PushModelResponseStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.PushModelStatus.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.RequestOptions.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/{ => SystemTextJson}/_#G.Models.ResponseFormat.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{OpenApi3_0_Yaml/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt => OpenAi/NewtonsoftJson/Tests.OpenAi_Diagnostics.verified.txt} (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => NewtonsoftJson}/_#G.Api.EndPoints.ListModels.g.verified.cs (100%) create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResults.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.DeleteModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Error.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponseObject.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Model.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ModelObject.g.verified.cs rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{YamlWithLocalFile/Tests.YamlWithLocalFile_Diagnostics.verified.txt => OpenAi/SystemTextJson/Tests.OpenAi_Diagnostics.verified.txt} (100%) create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Api.EndPoints.ListModels.g.verified.cs rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateCompletionRequest.g.verified.cs (98%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateCompletionRequestModel.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateModerationResponse.g.verified.cs (88%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateModerationResponseResults.g.verified.cs (88%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs (86%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs (83%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.DeleteModelResponse.g.verified.cs (85%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.Error.g.verified.cs (83%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.ErrorResponse.g.verified.cs (92%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.ListModelsResponse.g.verified.cs (88%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.ListModelsResponseObject.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.Model.g.verified.cs (86%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/{ => SystemTextJson}/_#G.Models.ModelObject.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{YamlWithLocalFileUseNSwag/Tests.YamlWithLocalFileUseNSwag_Diagnostics.verified.txt => OpenAi_CreateCompletionResponse/NewtonsoftJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt} (100%) create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CompletionUsage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/{YamlWithUrl/Tests.YamlWithUrl_Diagnostics.verified.txt => OpenAi_CreateCompletionResponse/SystemTextJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt} (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CompletionUsage.g.verified.cs (87%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponse.g.verified.cs (89%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponseChoices.g.verified.cs (87%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/{ => SystemTextJson}/_#G.Models.CreateCompletionResponseObject.g.verified.cs (100%) create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AbuseResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Carrier.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Company.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.CompanyType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.DomainsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Error.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.ErrorError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.FullResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.PrivacyResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.RangesResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.AbuseResponse.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.AsnResponse.g.verified.cs (93%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.AsnResponseType.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.Carrier.g.verified.cs (86%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.Company.g.verified.cs (86%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.CompanyType.g.verified.cs (100%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.DomainsResponse.g.verified.cs (95%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.Error.g.verified.cs (92%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.ErrorError.g.verified.cs (88%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.FullResponse.g.verified.cs (98%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.Prefix.g.verified.cs (88%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.Prefix6.g.verified.cs (89%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.PrivacyResponse.g.verified.cs (82%) rename src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/{ => SystemTextJson}/_#G.Models.RangesResponse.g.verified.cs (86%) delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AbuseResponse.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AsnResponse.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Carrier.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Company.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.DomainsResponse.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Error.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.FullResponse.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix6.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.PrivacyResponse.verified.cs delete mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.RangesResponse.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/NewtonsoftJson/Tests.YamlWithUrl_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/SystemTextJson/Tests.YamlWithUrl_Diagnostics.verified.txt diff --git a/src/apps/OpenApiGenerator.Cli/Commands/GenerateCommand.cs b/src/apps/OpenApiGenerator.Cli/Commands/GenerateCommand.cs index 0d3088e38e..047ff8fe0a 100644 --- a/src/apps/OpenApiGenerator.Cli/Commands/GenerateCommand.cs +++ b/src/apps/OpenApiGenerator.Cli/Commands/GenerateCommand.cs @@ -54,6 +54,7 @@ private static async Task HandleAsync(string inputPath, string outputPath, strin ClassName: clientClassName, NamingConvention: default, JsonSerializerType: default, + UseRequiredKeyword: default, IncludeOperationIds: [], GenerateModels: true, ModelStyle: default, diff --git a/src/libs/OpenApiGenerator.Core/Generation/Sources.Models.cs b/src/libs/OpenApiGenerator.Core/Generation/Sources.Models.cs index 4a88037b68..708236812a 100644 --- a/src/libs/OpenApiGenerator.Core/Generation/Sources.Models.cs +++ b/src/libs/OpenApiGenerator.Core/Generation/Sources.Models.cs @@ -72,12 +72,37 @@ public abstract class {modelData.ClassName} ").Inject()} }}".RemoveBlankLinesWhereOnlyWhitespaces(); } + + private static bool IsSupported(SdkFeatureUsage usage, string targetFramework) + { + return usage switch + { + SdkFeatureUsage.Always => true, + SdkFeatureUsage.InSupportedTargetFrameworks + when targetFramework.StartsWith("net8", StringComparison.OrdinalIgnoreCase) => true, + _ => false, + }; + } + + private static string GetDefaultValue(PropertyData property, bool isRequiredKeywordSupported) + { + if (property.IsRequired && !isRequiredKeywordSupported) + { + return " = default!;"; + } + + return property.IsRequired || property.DefaultValue == null ? string.Empty : $" = {property.DefaultValue};"; + } public static string GenerateClassModel( ModelData modelData, CancellationToken cancellationToken = default) { var jsonSerializer = modelData.JsonSerializerType.GetSerializer(); + var isRequiredKeywordSupported = IsSupported(modelData.UseRequiredKeyword, modelData.TargetFramework); + var requiredKeyword = isRequiredKeywordSupported + ? " required" + : string.Empty; return $@" {modelData.Summary.ToXmlDocumentationSummary(level: 4)} @@ -85,8 +110,9 @@ public sealed partial class {modelData.ClassName} {{ {modelData.Properties.Select(property => @$" {property.Summary.ToXmlDocumentationSummary(level: 8)} - {jsonSerializer.GeneratePropertyAttribute(property.Id)} - public{(property.IsRequired ? " required" : "")} {property.Type} {property.Name} {{ get; set; }}{(property.IsRequired || property.DefaultValue == null ? string.Empty : $" = {property.DefaultValue};")} + {jsonSerializer.GeneratePropertyAttribute(property.Id, property.IsRequired)} + {(property.IsRequired ? jsonSerializer.GenerateRequiredAttribute() : string.Empty)} + public{(property.IsRequired ? requiredKeyword : "")} {property.Type} {property.Name} {{ get; set; }}{GetDefaultValue(property, isRequiredKeywordSupported)} ").Inject()} {"Additional properties that are not explicitly defined in the schema".ToXmlDocumentationSummary(level: 8)} diff --git a/src/libs/OpenApiGenerator.Core/Json/IJsonSerializer.cs b/src/libs/OpenApiGenerator.Core/Json/IJsonSerializer.cs index 745afbbfe6..476a7fa497 100644 --- a/src/libs/OpenApiGenerator.Core/Json/IJsonSerializer.cs +++ b/src/libs/OpenApiGenerator.Core/Json/IJsonSerializer.cs @@ -2,6 +2,7 @@ namespace OpenApiGenerator.Core.Json; public interface IJsonSerializer { - public string GeneratePropertyAttribute(string id); + public string GeneratePropertyAttribute(string id, bool isRequired); string GenerateExtensionDataAttribute(); + string GenerateRequiredAttribute(); } \ No newline at end of file diff --git a/src/libs/OpenApiGenerator.Core/Json/NewtonsoftJsonSerializer.cs b/src/libs/OpenApiGenerator.Core/Json/NewtonsoftJsonSerializer.cs index e719936298..d18a080f93 100644 --- a/src/libs/OpenApiGenerator.Core/Json/NewtonsoftJsonSerializer.cs +++ b/src/libs/OpenApiGenerator.Core/Json/NewtonsoftJsonSerializer.cs @@ -4,13 +4,19 @@ public class NewtonsoftJsonSerializer : IJsonSerializer { public static IJsonSerializer Instance { get; } = new NewtonsoftJsonSerializer(); - public string GeneratePropertyAttribute(string id) + public string GeneratePropertyAttribute(string id, bool isRequired) { - return $"[global::Newtonsoft.Json.JsonProperty(\"{id}\")]"; + var required = isRequired ? ", Required = global::Newtonsoft.Json.Required.Always" : string.Empty; + return $"[global::Newtonsoft.Json.JsonProperty(\"{id}\"{required})]"; } public string GenerateExtensionDataAttribute() { return "[global::Newtonsoft.Json.JsonExtensionData]"; } + + public string GenerateRequiredAttribute() + { + return string.Empty; + } } \ No newline at end of file diff --git a/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs b/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs index a55500a36a..04fb5a98c9 100644 --- a/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs +++ b/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs @@ -4,7 +4,7 @@ public class SystemTextJsonSerializer : IJsonSerializer { public static IJsonSerializer Instance { get; } = new SystemTextJsonSerializer(); - public string GeneratePropertyAttribute(string id) + public string GeneratePropertyAttribute(string id, bool isRequired) { return $"[global::System.Text.Json.Serialization.JsonPropertyName(\"{id}\")]"; } @@ -13,4 +13,9 @@ public string GenerateExtensionDataAttribute() { return "[global::System.Text.Json.Serialization.JsonExtensionData]"; } + + public string GenerateRequiredAttribute() + { + return "[global::System.Text.Json.Serialization.JsonRequired]"; + } } \ No newline at end of file diff --git a/src/libs/OpenApiGenerator.Core/Models/ModelData.cs b/src/libs/OpenApiGenerator.Core/Models/ModelData.cs index 9152a9dbe6..feb2129020 100644 --- a/src/libs/OpenApiGenerator.Core/Models/ModelData.cs +++ b/src/libs/OpenApiGenerator.Core/Models/ModelData.cs @@ -10,10 +10,12 @@ public readonly record struct ModelData( string Id, bool AddTypeName, ImmutableArray Parents, + string TargetFramework, string Namespace, NamingConvention NamingConvention, ModelStyle Style, JsonSerializerType JsonSerializerType, + SdkFeatureUsage UseRequiredKeyword, ImmutableArray Properties, string Summary, ImmutableArray AdditionalModels, @@ -45,9 +47,11 @@ public static ModelData FromKey( Id: key, AddTypeName: false, Parents: parents.ToImmutableArray(), + TargetFramework: settings.TargetFramework, Namespace: settings.Namespace, NamingConvention: settings.NamingConvention, JsonSerializerType: settings.JsonSerializerType, + UseRequiredKeyword: settings.UseRequiredKeyword, Style: settings.ModelStyle, Properties: ImmutableArray.Empty, Summary: string.Empty, @@ -66,9 +70,11 @@ public static ModelData FromSchema( Id: schema.Key, AddTypeName: false, Parents: parents.ToImmutableArray(), + TargetFramework: settings.TargetFramework, Namespace: settings.Namespace, NamingConvention: settings.NamingConvention, JsonSerializerType: settings.JsonSerializerType, + UseRequiredKeyword: settings.UseRequiredKeyword, Style: settings.ModelStyle, Properties: ImmutableArray.Empty, Summary: schema.Value.GetSummary(), diff --git a/src/libs/OpenApiGenerator.Core/Models/SdkFeatureUsage.cs b/src/libs/OpenApiGenerator.Core/Models/SdkFeatureUsage.cs new file mode 100644 index 0000000000..4c25ad6706 --- /dev/null +++ b/src/libs/OpenApiGenerator.Core/Models/SdkFeatureUsage.cs @@ -0,0 +1,8 @@ +namespace OpenApiGenerator.Core.Models; + +public enum SdkFeatureUsage +{ + InSupportedTargetFrameworks, + Never, + Always, +} \ No newline at end of file diff --git a/src/libs/OpenApiGenerator.Core/Models/Settings.cs b/src/libs/OpenApiGenerator.Core/Models/Settings.cs index c1a3039cb7..731d8667e9 100644 --- a/src/libs/OpenApiGenerator.Core/Models/Settings.cs +++ b/src/libs/OpenApiGenerator.Core/Models/Settings.cs @@ -9,6 +9,7 @@ public readonly record struct Settings( string ClassName, NamingConvention NamingConvention, JsonSerializerType JsonSerializerType, + SdkFeatureUsage UseRequiredKeyword, ImmutableArray IncludeOperationIds, diff --git a/src/libs/OpenApiGenerator/OpenApiGenerator.props b/src/libs/OpenApiGenerator/OpenApiGenerator.props index cbd62af94a..083fd8265b 100644 --- a/src/libs/OpenApiGenerator/OpenApiGenerator.props +++ b/src/libs/OpenApiGenerator/OpenApiGenerator.props @@ -22,6 +22,8 @@ + + diff --git a/src/libs/OpenApiGenerator/OptionsExtensions.cs b/src/libs/OpenApiGenerator/OptionsExtensions.cs index 3aa414a96f..3b61c49d40 100644 --- a/src/libs/OpenApiGenerator/OptionsExtensions.cs +++ b/src/libs/OpenApiGenerator/OptionsExtensions.cs @@ -36,9 +36,10 @@ public static Settings GetSettings( $"{default(JsonSerializerType):G}", ignoreCase: true, out var jsonSerializerType) ? jsonSerializerType : default, + UseRequiredKeyword: options.GetEnumGlobalOption(nameof(Settings.UseRequiredKeyword), prefix), IncludeOperationIds: (options.GetGlobalOption(nameof(Settings.IncludeOperationIds), prefix)?.Split(';') ?? - Array.Empty()).ToImmutableArray(), + []).ToImmutableArray(), GenerateModels: bool.TryParse( options.GetGlobalOption(nameof(Settings.GenerateModels), prefix), @@ -49,10 +50,25 @@ public static Settings GetSettings( ignoreCase: true, out var modelStyle) ? modelStyle : default, IncludeModels: (options.GetGlobalOption(nameof(Settings.IncludeModels), prefix)?.Split(';') ?? - Array.Empty()).ToImmutableArray() + []).ToImmutableArray() ); } + + public static T GetEnumGlobalOption( + this AnalyzerConfigOptionsProvider provider, + string name, + string? prefix = null) where T : struct, Enum + { + provider = provider ?? throw new ArgumentNullException(nameof(provider)); + name = name ?? throw new ArgumentNullException(nameof(name)); + + return Enum.TryParse( + provider.GetGlobalOption(name, prefix) ?? + $"{default(T):G}", + ignoreCase: true, + out var value) ? value : default; + } public static IncrementalValueProvider DetectSettings( this IncrementalGeneratorInitializationContext context) diff --git a/src/tests/OpenApiGenerator.SnapshotTests/OpenApiGenerator.SnapshotTests.csproj b/src/tests/OpenApiGenerator.SnapshotTests/OpenApiGenerator.SnapshotTests.csproj index f16bf84d50..034c6ccbd3 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/OpenApiGenerator.SnapshotTests.csproj +++ b/src/tests/OpenApiGenerator.SnapshotTests/OpenApiGenerator.SnapshotTests.csproj @@ -35,6 +35,7 @@ + diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/Tests.Empty_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/Tests.Empty_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/Tests.Empty_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/Tests.Empty_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/Tests.Ollama_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/Tests.Empty_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/Tests.Ollama_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/Tests.Empty_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/Tests.OpenAi_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/Tests.Ollama_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/Tests.OpenAi_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/Tests.Ollama_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CopyModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CopyModelRequest.g.verified.cs new file mode 100644 index 0000000000..9e79a6d41b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CopyModelRequest.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.CopyModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for copying a model. + /// + public sealed partial class CopyModelRequest + { + /// + /// Name of the model to copy. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("source", Required = global::Newtonsoft.Json.Required.Always)] + public string Source { get; set; } = default!; + + /// + /// Name of the new model. + ///
Example: llama2-backup + ///
+ [global::Newtonsoft.Json.JsonProperty("destination", Required = global::Newtonsoft.Json.Required.Always)] + public string Destination { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelRequest.g.verified.cs new file mode 100644 index 0000000000..bd216d3f07 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelRequest.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.CreateModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Create model request object. + /// + public sealed partial class CreateModelRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: mario + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// The contents of the Modelfile. + ///
Example: FROM llama2\nSYSTEM You are mario from Super Mario Bros. + ///
+ [global::Newtonsoft.Json.JsonProperty("modelfile", Required = global::Newtonsoft.Json.Required.Always)] + public string Modelfile { get; set; } = default!; + + /// + /// If `false` the response will be returned as a single response object, otherwise the response will be streamed as a series of objects. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponse.g.verified.cs new file mode 100644 index 0000000000..9feeb3153e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response object for creating a model. When finished, `status` is `success`. + /// + public sealed partial class CreateModelResponse + { + /// + /// Status creating the model + /// + [global::Newtonsoft.Json.JsonProperty("status")] + public CreateModelResponseStatus? Status { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponseStatus.g.verified.cs new file mode 100644 index 0000000000..d49c59a40c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelResponseStatus.g.verified.cs @@ -0,0 +1,29 @@ +//HintName: G.Models.CreateModelResponseStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status creating the model + /// + [global::System.Runtime.Serialization.DataContract] + public enum CreateModelResponseStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="creating system layer")] + CreatingSystemLayer, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="parsing modelfile")] + ParsingModelfile, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="success")] + Success, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelStatus.g.verified.cs new file mode 100644 index 0000000000..491f2e7f79 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.CreateModelStatus.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.CreateModelStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status creating the model + /// + public sealed partial class CreateModelStatus + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.DeleteModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.DeleteModelRequest.g.verified.cs new file mode 100644 index 0000000000..1f21794a73 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.DeleteModelRequest.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.DeleteModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for deleting a model. + /// + public sealed partial class DeleteModelRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:13b + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs new file mode 100644 index 0000000000..31d28d979e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.GenerateChatCompletionRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for the chat endpoint. + /// + public sealed partial class GenerateChatCompletionRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// The messages of the chat, this can be used to keep a chat memory + /// + [global::Newtonsoft.Json.JsonProperty("messages", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Messages { get; set; } = default!; + + /// + /// The format to return a response in. Currently the only accepted value is json. + /// Enable JSON mode by setting the format parameter to json. This will structure the response as valid JSON. + /// Note: it's important to instruct the model to use JSON in the prompt. Otherwise, the model may generate large amounts whitespace. + /// + [global::Newtonsoft.Json.JsonProperty("format")] + public GenerateChatCompletionRequestFormat? Format { get; set; } + + /// + /// Additional model parameters listed in the documentation for the Modelfile such as `temperature`. + /// + [global::Newtonsoft.Json.JsonProperty("options")] + public RequestOptions? Options { get; set; } + + /// + /// If `false` the response will be returned as a single response object, otherwise the response will be streamed as a series of objects. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// How long (in minutes) to keep the model loaded in memory. + /// - If set to a positive duration (e.g. 20), the model will stay loaded for the provided duration. + /// - If set to a negative duration (e.g. -1), the model will stay loaded indefinitely. + /// - If set to 0, the model will be unloaded immediately once finished. + /// - If not set, the model will stay loaded for 5 minutes by default + /// + [global::Newtonsoft.Json.JsonProperty("keep_alive")] + public int KeepAlive { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs new file mode 100644 index 0000000000..5caa80ec18 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.Models.GenerateChatCompletionRequestFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// The format to return a response in. Currently the only accepted value is json. + /// Enable JSON mode by setting the format parameter to json. This will structure the response as valid JSON. + /// Note: it's important to instruct the model to use JSON in the prompt. Otherwise, the model may generate large amounts whitespace. + /// + [global::System.Runtime.Serialization.DataContract] + public enum GenerateChatCompletionRequestFormat + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="json")] + Json, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs new file mode 100644 index 0000000000..40808a39af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.GenerateChatCompletionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The response class for the chat endpoint. + /// + public sealed partial class GenerateChatCompletionResponse + { + /// + /// A message in the chat endpoint + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public Message? Message { get; set; } + + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// Date on which a model was created. + ///
Example: + ///
+ [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Whether the response has completed. + ///
Example: true + ///
+ [global::Newtonsoft.Json.JsonProperty("done")] + public bool Done { get; set; } + + /// + /// Time spent generating the response. + ///
Example: 5589157167 + ///
+ [global::Newtonsoft.Json.JsonProperty("total_duration")] + public int TotalDuration { get; set; } + + /// + /// Time spent in nanoseconds loading the model. + ///
Example: 3013701500 + ///
+ [global::Newtonsoft.Json.JsonProperty("load_duration")] + public int LoadDuration { get; set; } + + /// + /// Number of tokens in the prompt. + ///
Example: 46 + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_eval_count")] + public int PromptEvalCount { get; set; } + + /// + /// Time spent in nanoseconds evaluating the prompt. + ///
Example: 1160282000 + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_eval_duration")] + public int PromptEvalDuration { get; set; } + + /// + /// Number of tokens the response. + ///
Example: 113 + ///
+ [global::Newtonsoft.Json.JsonProperty("eval_count")] + public int EvalCount { get; set; } + + /// + /// Time in nanoseconds spent generating the response. + ///
Example: 1325948000 + ///
+ [global::Newtonsoft.Json.JsonProperty("eval_duration")] + public int EvalDuration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequest.g.verified.cs new file mode 100644 index 0000000000..3a90b29854 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequest.g.verified.cs @@ -0,0 +1,95 @@ +//HintName: G.Models.GenerateCompletionRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for the generate endpoint. + /// + public sealed partial class GenerateCompletionRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// The prompt to generate a response. + ///
Example: Why is the sky blue? + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// (optional) a list of Base64-encoded images to include in the message (for multimodal models such as llava) + /// + [global::Newtonsoft.Json.JsonProperty("images")] + public global::System.Collections.Generic.IList? Images { get; set; } + + /// + /// The system prompt to (overrides what is defined in the Modelfile). + /// + [global::Newtonsoft.Json.JsonProperty("system")] + public string? System { get; set; } + + /// + /// The full prompt or prompt template (overrides what is defined in the Modelfile). + /// + [global::Newtonsoft.Json.JsonProperty("template")] + public string? Template { get; set; } + + /// + /// The context parameter returned from a previous request to [generateCompletion], this can be used to keep a short conversational memory. + /// + [global::Newtonsoft.Json.JsonProperty("context")] + public global::System.Collections.Generic.IList? Context { get; set; } + + /// + /// Additional model parameters listed in the documentation for the Modelfile such as `temperature`. + /// + [global::Newtonsoft.Json.JsonProperty("options")] + public RequestOptions? Options { get; set; } + + /// + /// The format to return a response in. Currently the only accepted value is json. + /// Enable JSON mode by setting the format parameter to json. This will structure the response as valid JSON. + /// Note: it's important to instruct the model to use JSON in the prompt. Otherwise, the model may generate large amounts whitespace. + /// + [global::Newtonsoft.Json.JsonProperty("format")] + public GenerateCompletionRequestFormat? Format { get; set; } + + /// + /// If `true` no formatting will be applied to the prompt and no context will be returned. + /// You may choose to use the `raw` parameter if you are specifying a full templated prompt in your request to the API, and are managing history yourself. + /// + [global::Newtonsoft.Json.JsonProperty("raw")] + public bool Raw { get; set; } + + /// + /// If `false` the response will be returned as a single response object, otherwise the response will be streamed as a series of objects. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// How long (in minutes) to keep the model loaded in memory. + /// - If set to a positive duration (e.g. 20), the model will stay loaded for the provided duration. + /// - If set to a negative duration (e.g. -1), the model will stay loaded indefinitely. + /// - If set to 0, the model will be unloaded immediately once finished. + /// - If not set, the model will stay loaded for 5 minutes by default + /// + [global::Newtonsoft.Json.JsonProperty("keep_alive")] + public int KeepAlive { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs new file mode 100644 index 0000000000..59a27b0291 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.Models.GenerateCompletionRequestFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// The format to return a response in. Currently the only accepted value is json. + /// Enable JSON mode by setting the format parameter to json. This will structure the response as valid JSON. + /// Note: it's important to instruct the model to use JSON in the prompt. Otherwise, the model may generate large amounts whitespace. + /// + [global::System.Runtime.Serialization.DataContract] + public enum GenerateCompletionRequestFormat + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="json")] + Json, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionResponse.g.verified.cs new file mode 100644 index 0000000000..9f78629bf1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateCompletionResponse.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.Models.GenerateCompletionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// The response class for the generate endpoint. + /// + public sealed partial class GenerateCompletionResponse + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// Date on which a model was created. + ///
Example: + ///
+ [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// The response for a given prompt with a provided model. + ///
Example: The sky appears blue because of a phenomenon called Rayleigh scattering. + ///
+ [global::Newtonsoft.Json.JsonProperty("response")] + public string? Response { get; set; } + + /// + /// Whether the response has completed. + ///
Example: true + ///
+ [global::Newtonsoft.Json.JsonProperty("done")] + public bool Done { get; set; } + + /// + /// An encoding of the conversation used in this response, this can be sent in the next request to keep a conversational memory. + ///
Example: [1, 2, 3] + ///
+ [global::Newtonsoft.Json.JsonProperty("context")] + public global::System.Collections.Generic.IList? Context { get; set; } + + /// + /// Time spent generating the response. + ///
Example: 5589157167 + ///
+ [global::Newtonsoft.Json.JsonProperty("total_duration")] + public int TotalDuration { get; set; } + + /// + /// Time spent in nanoseconds loading the model. + ///
Example: 3013701500 + ///
+ [global::Newtonsoft.Json.JsonProperty("load_duration")] + public int LoadDuration { get; set; } + + /// + /// Number of tokens in the prompt. + ///
Example: 46 + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_eval_count")] + public int PromptEvalCount { get; set; } + + /// + /// Time spent in nanoseconds evaluating the prompt. + ///
Example: 1160282000 + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_eval_duration")] + public int PromptEvalDuration { get; set; } + + /// + /// Number of tokens the response. + ///
Example: 113 + ///
+ [global::Newtonsoft.Json.JsonProperty("eval_count")] + public int EvalCount { get; set; } + + /// + /// Time in nanoseconds spent generating the response. + ///
Example: 1325948000 + ///
+ [global::Newtonsoft.Json.JsonProperty("eval_duration")] + public int EvalDuration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs new file mode 100644 index 0000000000..963ef57d40 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.GenerateEmbeddingRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Generate embeddings from a model. + /// + public sealed partial class GenerateEmbeddingRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// Text to generate embeddings for. + ///
Example: Here is an article about llamas... + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// Additional model parameters listed in the documentation for the Modelfile such as `temperature`. + /// + [global::Newtonsoft.Json.JsonProperty("options")] + public RequestOptions? Options { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs new file mode 100644 index 0000000000..96090fc01d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GenerateEmbeddingResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Returns the embedding information. + /// + public sealed partial class GenerateEmbeddingResponse + { + /// + /// The embedding for the prompt. + ///
Example: [0.5670403838157654, 0.009260174818336964, ...] + ///
+ [global::Newtonsoft.Json.JsonProperty("embedding")] + public global::System.Collections.Generic.IList? Embedding { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Message.g.verified.cs new file mode 100644 index 0000000000..2003a3cddb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Message.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.Message.g.cs + +#nullable enable + +namespace G +{ + /// + /// A message in the chat endpoint + /// + public sealed partial class Message + { + /// + /// The role of the message + /// + [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public MessageRole Role { get; set; } = default!; + + /// + /// The content of the message + ///
Example: Why is the sky blue? + ///
+ [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// (optional) a list of Base64-encoded images to include in the message (for multimodal models such as llava) + /// + [global::Newtonsoft.Json.JsonProperty("images")] + public global::System.Collections.Generic.IList? Images { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs new file mode 100644 index 0000000000..76bf0b7247 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs @@ -0,0 +1,29 @@ +//HintName: G.Models.MessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of the message + /// + [global::System.Runtime.Serialization.DataContract] + public enum MessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="system")] + System, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Model.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Model.g.verified.cs new file mode 100644 index 0000000000..fb4649e569 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.Model.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.Model.g.cs + +#nullable enable + +namespace G +{ + /// + /// A model available locally. + /// + public sealed partial class Model + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// Model modification date. + ///
Example: + ///
+ [global::Newtonsoft.Json.JsonProperty("modified_at")] + public global::System.DateTime ModifiedAt { get; set; } + + /// + /// Size of the model on disk. + ///
Example: 7323310500 + ///
+ [global::Newtonsoft.Json.JsonProperty("size")] + public int Size { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfo.g.verified.cs new file mode 100644 index 0000000000..1092f132eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfo.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ModelInfo.g.cs + +#nullable enable + +namespace G +{ + /// + /// Details about a model including modelfile, template, parameters, license, and system prompt. + /// + public sealed partial class ModelInfo + { + /// + /// The model's license. + ///
Example: <contents of license block> + ///
+ [global::Newtonsoft.Json.JsonProperty("license")] + public string? License { get; set; } + + /// + /// The modelfile associated with the model. + ///
Example: Modelfile generated by \"ollama show\"\n# To build a new Modelfile based on this one, replace the FROM line with:\n# FROM llama2:latest\n\nFROM /Users/username/.ollama/models/blobs/sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8\nTEMPLATE \"\"\"[INST] {{ if and .First .System }}<<SYS>>{{ .System }}<</SYS>>\n\n{{ end }}{{ .Prompt }} [/INST] \"\"\"\nSYSTEM \"\"\"\"\"\"\nPARAMETER stop [INST]\nPARAMETER stop [/INST]\nPARAMETER stop <<SYS>>\nPARAMETER stop <</SYS>>\n" + ///
+ [global::Newtonsoft.Json.JsonProperty("modelfile")] + public string? Modelfile { get; set; } + + /// + /// The model parameters. + ///
Example: stop [INST]\nstop [/INST]\nstop <<SYS>>\nstop <</SYS>> + ///
+ [global::Newtonsoft.Json.JsonProperty("parameters")] + public string? Parameters { get; set; } + + /// + /// The prompt template for the model. + ///
Example: [INST] {{ if and .First .System }}<<SYS>>{{ .System }}<</SYS>>\n\n{{ end }}{{ .Prompt }} [/INST] + ///
+ [global::Newtonsoft.Json.JsonProperty("template")] + public string? Template { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfoRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfoRequest.g.verified.cs new file mode 100644 index 0000000000..3295757f6d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelInfoRequest.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.ModelInfoRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for the show model info endpoint. + /// + public sealed partial class ModelInfoRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelsResponse.g.verified.cs new file mode 100644 index 0000000000..2f5ace62c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ModelsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response class for the list models endpoint. + /// + public sealed partial class ModelsResponse + { + /// + /// List of models available locally. + /// + [global::Newtonsoft.Json.JsonProperty("models")] + public global::System.Collections.Generic.IList? Models { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelRequest.g.verified.cs new file mode 100644 index 0000000000..417fdf25ce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelRequest.g.verified.cs @@ -0,0 +1,41 @@ +//HintName: G.Models.PullModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for pulling a model. + /// + public sealed partial class PullModelRequest + { + /// + /// The model name. + /// Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version. + ///
Example: llama2:7b + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// Allow insecure connections to the library. + /// Only use this if you are pulling from your own library during development. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("insecure")] + public bool Insecure { get; set; } = false; + + /// + /// If `false` the response will be returned as a single response object, otherwise the response will be streamed as a series of objects. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponse.g.verified.cs new file mode 100644 index 0000000000..e26d563312 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponse.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.PullModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response class for pulling a model. + /// The first object is the manifest. Then there is a series of downloading responses. Until any of the download is completed, the `completed` key may not be included. + /// The number of files to be downloaded depends on the number of layers specified in the manifest. + /// + public sealed partial class PullModelResponse + { + /// + /// Status pulling the model. + ///
Example: pulling manifest + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public PullModelResponseStatus? Status { get; set; } + + /// + /// The model's digest. + ///
Example: sha256:bc07c81de745696fdf5afca05e065818a8149fb0c77266fb584d9b2cba3711a + ///
+ [global::Newtonsoft.Json.JsonProperty("digest")] + public string? Digest { get; set; } + + /// + /// Total size of the model. + ///
Example: 2142590208 + ///
+ [global::Newtonsoft.Json.JsonProperty("total")] + public int Total { get; set; } + + /// + /// Total bytes transferred. + ///
Example: 2142590208 + ///
+ [global::Newtonsoft.Json.JsonProperty("completed")] + public int Completed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponseStatus.g.verified.cs new file mode 100644 index 0000000000..ce34fea000 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelResponseStatus.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.PullModelResponseStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status pulling the model. + ///
Example: pulling manifest + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum PullModelResponseStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="pulling manifest")] + PullingManifest, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="downloading digestname")] + DownloadingDigestname, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="verifying sha256 digest")] + VerifyingSha256Digest, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="writing manifest")] + WritingManifest, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="removing any unused layers")] + RemovingAnyUnusedLayers, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="success")] + Success, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelStatus.g.verified.cs new file mode 100644 index 0000000000..b6d5761dea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PullModelStatus.g.verified.cs @@ -0,0 +1,20 @@ +//HintName: G.Models.PullModelStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status pulling the model. + ///
Example: pulling manifest + ///
+ public sealed partial class PullModelStatus + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelRequest.g.verified.cs new file mode 100644 index 0000000000..c400a3758f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelRequest.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.PushModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// Request class for pushing a model. + /// + public sealed partial class PushModelRequest + { + /// + /// The name of the model to push in the form of <namespace>/<model>:<tag>. + ///
Example: mattw/pygmalion:latest + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// Allow insecure connections to the library. + /// Only use this if you are pushing to your library during development. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("insecure")] + public bool Insecure { get; set; } = false; + + /// + /// If `false` the response will be returned as a single response object, otherwise the response will be streamed as a series of objects. + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponse.g.verified.cs new file mode 100644 index 0000000000..9f62001fe4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponse.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.PushModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response class for pushing a model. + /// + public sealed partial class PushModelResponse + { + /// + /// Status pushing the model. + /// + [global::Newtonsoft.Json.JsonProperty("status")] + public PushModelResponseStatus? Status { get; set; } + + /// + /// the model's digest + ///
Example: sha256:bc07c81de745696fdf5afca05e065818a8149fb0c77266fb584d9b2cba3711a + ///
+ [global::Newtonsoft.Json.JsonProperty("digest")] + public string? Digest { get; set; } + + /// + /// total size of the model + ///
Example: 2142590208 + ///
+ [global::Newtonsoft.Json.JsonProperty("total")] + public int Total { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponseStatus.g.verified.cs new file mode 100644 index 0000000000..efaed21f2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelResponseStatus.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.PushModelResponseStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status pushing the model. + /// + [global::System.Runtime.Serialization.DataContract] + public enum PushModelResponseStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="retrieving manifest")] + RetrievingManifest, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="starting upload")] + StartingUpload, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="pushing manifest")] + PushingManifest, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="success")] + Success, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelStatus.g.verified.cs new file mode 100644 index 0000000000..deada8f42e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.PushModelStatus.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.PushModelStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// Status pushing the model. + /// + public sealed partial class PushModelStatus + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.RequestOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.RequestOptions.g.verified.cs new file mode 100644 index 0000000000..592ebda224 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.RequestOptions.g.verified.cs @@ -0,0 +1,216 @@ +//HintName: G.Models.RequestOptions.g.cs + +#nullable enable + +namespace G +{ + /// + /// Additional model parameters listed in the documentation for the Modelfile such as `temperature`. + /// + public sealed partial class RequestOptions + { + /// + /// Number of tokens to keep from the prompt. + /// + [global::Newtonsoft.Json.JsonProperty("num_keep")] + public int NumKeep { get; set; } + + /// + /// Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt. (Default: 0) + /// + [global::Newtonsoft.Json.JsonProperty("seed")] + public int Seed { get; set; } + + /// + /// Maximum number of tokens to predict when generating text. (Default: 128, -1 = infinite generation, -2 = fill context) + /// + [global::Newtonsoft.Json.JsonProperty("num_predict")] + public int NumPredict { get; set; } + + /// + /// Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. (Default: 40) + /// + [global::Newtonsoft.Json.JsonProperty("top_k")] + public int TopK { get; set; } + + /// + /// Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text. (Default: 0.9) + /// + [global::Newtonsoft.Json.JsonProperty("top_p")] + public float TopP { get; set; } + + /// + /// Tail free sampling is used to reduce the impact of less probable tokens from the output. A higher value (e.g., 2.0) will reduce the impact more, while a value of 1.0 disables this setting. (default: 1) + /// + [global::Newtonsoft.Json.JsonProperty("tfs_z")] + public float TfsZ { get; set; } + + /// + /// Typical p is used to reduce the impact of less probable tokens from the output. + /// + [global::Newtonsoft.Json.JsonProperty("typical_p")] + public float TypicalP { get; set; } + + /// + /// Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx) + /// + [global::Newtonsoft.Json.JsonProperty("repeat_last_n")] + public int RepeatLastN { get; set; } + + /// + /// The temperature of the model. Increasing the temperature will make the model answer more creatively. (Default: 0.8) + /// + [global::Newtonsoft.Json.JsonProperty("temperature")] + public float Temperature { get; set; } + + /// + /// Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.1) + /// + [global::Newtonsoft.Json.JsonProperty("repeat_penalty")] + public float RepeatPenalty { get; set; } + + /// + /// Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. + /// + [global::Newtonsoft.Json.JsonProperty("presence_penalty")] + public float PresencePenalty { get; set; } + + /// + /// Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + /// + [global::Newtonsoft.Json.JsonProperty("frequency_penalty")] + public float FrequencyPenalty { get; set; } + + /// + /// Enable Mirostat sampling for controlling perplexity. (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0) + /// + [global::Newtonsoft.Json.JsonProperty("mirostat")] + public int Mirostat { get; set; } + + /// + /// Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text. (Default: 5.0) + /// + [global::Newtonsoft.Json.JsonProperty("mirostat_tau")] + public float MirostatTau { get; set; } + + /// + /// Influences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive. (Default: 0.1) + /// + [global::Newtonsoft.Json.JsonProperty("mirostat_eta")] + public float MirostatEta { get; set; } + + /// + /// Penalize newlines in the output. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("penalize_newline")] + public bool PenalizeNewline { get; set; } + + /// + /// Sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. + /// + [global::Newtonsoft.Json.JsonProperty("stop")] + public global::System.Collections.Generic.IList? Stop { get; set; } + + /// + /// Enable NUMA support. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("numa")] + public bool Numa { get; set; } + + /// + /// Sets the size of the context window used to generate the next token. + /// + [global::Newtonsoft.Json.JsonProperty("num_ctx")] + public int NumCtx { get; set; } + + /// + /// Sets the number of batches to use for generation. (Default: 1) + /// + [global::Newtonsoft.Json.JsonProperty("num_batch")] + public int NumBatch { get; set; } + + /// + /// The number of GQA groups in the transformer layer. Required for some models, for example it is 8 for `llama2:70b`. + /// + [global::Newtonsoft.Json.JsonProperty("num_gqa")] + public int NumGqa { get; set; } + + /// + /// The number of layers to send to the GPU(s). On macOS it defaults to 1 to enable metal support, 0 to disable. + /// + [global::Newtonsoft.Json.JsonProperty("num_gpu")] + public int NumGpu { get; set; } + + /// + /// The GPU to use for the main model. Default is 0. + /// + [global::Newtonsoft.Json.JsonProperty("main_gpu")] + public int MainGpu { get; set; } + + /// + /// Enable low VRAM mode. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("low_vram")] + public bool LowVram { get; set; } + + /// + /// Enable f16 key/value. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("f16_kv")] + public bool F16Kv { get; set; } + + /// + /// Enable logits all. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("logits_all")] + public bool LogitsAll { get; set; } + + /// + /// Enable vocab only. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("vocab_only")] + public bool VocabOnly { get; set; } + + /// + /// Enable mmap. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("use_mmap")] + public bool UseMmap { get; set; } + + /// + /// Enable mlock. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("use_mlock")] + public bool UseMlock { get; set; } + + /// + /// Enable embedding only. (Default: false) + /// + [global::Newtonsoft.Json.JsonProperty("embedding_only")] + public bool EmbeddingOnly { get; set; } + + /// + /// The base of the rope frequency scale. (Default: 1.0) + /// + [global::Newtonsoft.Json.JsonProperty("rope_frequency_base")] + public float RopeFrequencyBase { get; set; } + + /// + /// The scale of the rope frequency. (Default: 1.0) + /// + [global::Newtonsoft.Json.JsonProperty("rope_frequency_scale")] + public float RopeFrequencyScale { get; set; } + + /// + /// Sets the number of threads to use during computation. By default, Ollama will detect this for optimal performance. It is recommended to set this value to the number of physical CPU cores your system has (as opposed to the logical number of cores). + /// + [global::Newtonsoft.Json.JsonProperty("num_thread")] + public int NumThread { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..23e7a7bb93 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs @@ -0,0 +1,21 @@ +//HintName: G.Models.ResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// The format to return a response in. Currently the only accepted value is json. + /// Enable JSON mode by setting the format parameter to json. This will structure the response as valid JSON. + /// Note: it's important to instruct the model to use JSON in the prompt. Otherwise, the model may generate large amounts whitespace. + /// + public sealed partial class ResponseFormat + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/Tests.Ollama_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/Tests.Ollama_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CopyModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CopyModelRequest.g.verified.cs similarity index 89% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CopyModelRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CopyModelRequest.g.verified.cs index a0c1b81aae..105ee5af22 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CopyModelRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CopyModelRequest.g.verified.cs @@ -14,6 +14,7 @@ public sealed partial class CopyModelRequest ///
Example: llama2:7b /// [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Source { get; set; } /// @@ -21,6 +22,7 @@ public sealed partial class CopyModelRequest ///
Example: llama2-backup ///
[global::System.Text.Json.Serialization.JsonPropertyName("destination")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Destination { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelRequest.g.verified.cs similarity index 93% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelRequest.g.verified.cs index 56424b8c0f..837a78dc7f 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class CreateModelRequest ///
Example: mario ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// @@ -22,6 +23,7 @@ public sealed partial class CreateModelRequest ///
Example: FROM llama2\nSYSTEM You are mario from Super Mario Bros. ///
[global::System.Text.Json.Serialization.JsonPropertyName("modelfile")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Modelfile { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelResponseStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelResponseStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelResponseStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.CreateModelStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.CreateModelStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.DeleteModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.DeleteModelRequest.g.verified.cs similarity index 94% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.DeleteModelRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.DeleteModelRequest.g.verified.cs index 253fbab06c..5f19c5ee2d 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.DeleteModelRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.DeleteModelRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class DeleteModelRequest ///
Example: llama2:13b ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs similarity index 96% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs index cfa0d6314d..52e82ec242 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionRequest.g.verified.cs @@ -15,12 +15,14 @@ public sealed partial class GenerateChatCompletionRequest ///
Example: llama2:7b ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } /// /// The messages of the chat, this can be used to keep a chat memory /// [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Messages { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionRequestFormat.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateChatCompletionResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateChatCompletionResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionRequest.g.verified.cs similarity index 97% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionRequest.g.verified.cs index 53d8aeb7d4..39bab9106b 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class GenerateCompletionRequest ///
Example: llama2:7b ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } /// @@ -22,6 +23,7 @@ public sealed partial class GenerateCompletionRequest ///
Example: Why is the sky blue? ///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Prompt { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionRequestFormat.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateCompletionResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateCompletionResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateEmbeddingRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs similarity index 92% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateEmbeddingRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs index f03cbf28bc..df8599e9d6 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateEmbeddingRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateEmbeddingRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class GenerateEmbeddingRequest ///
Example: llama2:7b ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } /// @@ -22,6 +23,7 @@ public sealed partial class GenerateEmbeddingRequest ///
Example: Here is an article about llamas... ///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Prompt { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateEmbeddingResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.GenerateEmbeddingResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.GenerateEmbeddingResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.Message.g.verified.cs similarity index 91% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.Message.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.Message.g.verified.cs index dc33b93ea5..e044b301fc 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.Message.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.Message.g.verified.cs @@ -13,6 +13,7 @@ public sealed partial class Message /// The role of the message /// [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Role { get; set; } /// @@ -20,6 +21,7 @@ public sealed partial class Message ///
Example: Why is the sky blue? ///
[global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Content { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.MessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.MessageRole.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.MessageRole.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.MessageRole.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.Model.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.Model.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.Model.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.Model.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelInfo.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelInfo.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelInfo.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelInfoRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelInfoRequest.g.verified.cs similarity index 94% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelInfoRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelInfoRequest.g.verified.cs index ba3fa19485..751c809da2 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelInfoRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelInfoRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class ModelInfoRequest ///
Example: llama2:7b ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelsResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ModelsResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ModelsResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelRequest.g.verified.cs similarity index 96% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelRequest.g.verified.cs index 428ff7a358..3eff30e667 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelRequest.g.verified.cs @@ -15,6 +15,7 @@ public sealed partial class PullModelRequest ///
Example: llama2:7b ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelResponseStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelResponseStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelResponseStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PullModelStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PullModelStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelRequest.g.verified.cs similarity index 96% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelRequest.g.verified.cs index 25dfa5e58c..c7ff2aef4d 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelRequest.g.verified.cs @@ -14,6 +14,7 @@ public sealed partial class PushModelRequest ///
Example: mattw/pygmalion:latest ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelResponseStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelResponseStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelResponseStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelStatus.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.PushModelStatus.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.PushModelStatus.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.RequestOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.RequestOptions.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.RequestOptions.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.RequestOptions.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/_#G.Models.ResponseFormat.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/Tests.OpenAi_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/Tests.OpenAi_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Api.EndPoints.ListModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Api.EndPoints.ListModels.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Api.EndPoints.ListModels.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Api.EndPoints.ListModels.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequest.g.verified.cs new file mode 100644 index 0000000000..5c8790a05c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequest.g.verified.cs @@ -0,0 +1,153 @@ +//HintName: G.Models.CreateCompletionRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateCompletionRequest + { + /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public object Model { get; set; } = default!; + + /// + /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. + /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. + ///
Default Value: <|endoftext|> + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public object? Prompt { get; set; } = default!; + + /// + /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. + /// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. + /// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. + ///
Default Value: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("best_of")] + public int? BestOf { get; set; } = 1; + + /// + /// Echo back the prompt in addition to the completion + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("echo")] + public bool? Echo { get; set; } = false; + + /// + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + /// [See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details) + ///
Default Value: 0 + ///
+ [global::Newtonsoft.Json.JsonProperty("frequency_penalty")] + public double? FrequencyPenalty { get; set; } = 0; + + /// + /// Modify the likelihood of specified tokens appearing in the completion. + /// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + ///
Default Value: + ///
+ [global::Newtonsoft.Json.JsonProperty("logit_bias")] + public CreateCompletionRequestLogitBias? LogitBias { get; set; } + + /// + /// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. + /// The maximum value for `logprobs` is 5. + ///
Default Value: + ///
+ [global::Newtonsoft.Json.JsonProperty("logprobs")] + public int? Logprobs { get; set; } + + /// + /// The maximum number of [tokens](/tokenizer) that can be generated in the completion. + /// The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. + ///
Default Value: 16 + ///
Example: 16 + ///
+ [global::Newtonsoft.Json.JsonProperty("max_tokens")] + public int? MaxTokens { get; set; } = 16; + + /// + /// How many completions to generate for each prompt. + /// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. + ///
Default Value: 1 + ///
Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("n")] + public int? N { get; set; } = 1; + + /// + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. + /// [See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details) + ///
Default Value: 0 + ///
+ [global::Newtonsoft.Json.JsonProperty("presence_penalty")] + public double? PresencePenalty { get; set; } = 0; + + /// + /// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + /// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + /// + [global::Newtonsoft.Json.JsonProperty("seed")] + public int? Seed { get; set; } + + /// + /// Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. + ///
Default Value: + ///
+ [global::Newtonsoft.Json.JsonProperty("stop")] + public object? Stop { get; set; } + + /// + /// Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + ///
Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool? Stream { get; set; } = false; + + /// + /// The suffix that comes after a completion of inserted text. + ///
Default Value: + ///
Example: test. + ///
+ [global::Newtonsoft.Json.JsonProperty("suffix")] + public string? Suffix { get; set; } + + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + /// We generally recommend altering this or `top_p` but not both. + ///
Default Value: 1 + ///
Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public double? Temperature { get; set; } = 1; + + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. + /// We generally recommend altering this or `temperature` but not both. + ///
Default Value: 1 + ///
Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("top_p")] + public double? TopP { get; set; } = 1; + + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids). + ///
Example: user-1234 + ///
+ [global::Newtonsoft.Json.JsonProperty("user")] + public string? User { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs new file mode 100644 index 0000000000..9f6bc3def8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs @@ -0,0 +1,22 @@ +//HintName: G.Models.CreateCompletionRequestLogitBias.g.cs + +#nullable enable + +namespace G +{ + /// + /// Modify the likelihood of specified tokens appearing in the completion. + /// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + ///
Default Value: + ///
+ public sealed partial class CreateCompletionRequestLogitBias + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs new file mode 100644 index 0000000000..cb41a5e36d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.CreateCompletionRequestModel.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum CreateCompletionRequestModel + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="babbage-002")] + Babbage002, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="davinci-002")] + Davinci002, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="gpt-3.5-turbo-instruct")] + Gpt35TurboInstruct, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-davinci-003")] + TextDavinci003, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-davinci-002")] + TextDavinci002, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-davinci-001")] + TextDavinci001, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="code-davinci-002")] + CodeDavinci002, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-curie-001")] + TextCurie001, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-babbage-001")] + TextBabbage001, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-ada-001")] + TextAda001, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponse.g.verified.cs new file mode 100644 index 0000000000..835fc394a6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.CreateModerationResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents policy compliance report by OpenAI's content moderation model against a given input. + /// + public sealed partial class CreateModerationResponse + { + /// + /// The unique identifier for the moderation request. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The model used to generate the moderation results. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// A list of moderation objects. + /// + [global::Newtonsoft.Json.JsonProperty("results", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Results { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResults.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResults.g.verified.cs new file mode 100644 index 0000000000..f531c9e13f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResults.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.CreateModerationResponseResults.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateModerationResponseResults + { + /// + /// Whether the content violates [OpenAI's usage policies](/policies/usage-policies). + /// + [global::Newtonsoft.Json.JsonProperty("flagged", Required = global::Newtonsoft.Json.Required.Always)] + public bool Flagged { get; set; } = default!; + + /// + /// A list of the categories, and whether they are flagged or not. + /// + [global::Newtonsoft.Json.JsonProperty("categories", Required = global::Newtonsoft.Json.Required.Always)] + public CreateModerationResponseResultsCategories Categories { get; set; } = default!; + + /// + /// A list of the categories along with their scores as predicted by model. + /// + [global::Newtonsoft.Json.JsonProperty("category_scores", Required = global::Newtonsoft.Json.Required.Always)] + public CreateModerationResponseResultsCategoryScores CategoryScores { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs new file mode 100644 index 0000000000..f9b5ca8dd1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.Models.CreateModerationResponseResultsCategories.g.cs + +#nullable enable + +namespace G +{ + /// + /// A list of the categories, and whether they are flagged or not. + /// + public sealed partial class CreateModerationResponseResultsCategories + { + /// + /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. + /// + [global::Newtonsoft.Json.JsonProperty("hate", Required = global::Newtonsoft.Json.Required.Always)] + public bool Hate { get; set; } = default!; + + /// + /// Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. + /// + [global::Newtonsoft.Json.JsonProperty("hate/threatening", Required = global::Newtonsoft.Json.Required.Always)] + public bool HateThreatening { get; set; } = default!; + + /// + /// Content that expresses, incites, or promotes harassing language towards any target. + /// + [global::Newtonsoft.Json.JsonProperty("harassment", Required = global::Newtonsoft.Json.Required.Always)] + public bool Harassment { get; set; } = default!; + + /// + /// Harassment content that also includes violence or serious harm towards any target. + /// + [global::Newtonsoft.Json.JsonProperty("harassment/threatening", Required = global::Newtonsoft.Json.Required.Always)] + public bool HarassmentThreatening { get; set; } = default!; + + /// + /// Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm", Required = global::Newtonsoft.Json.Required.Always)] + public bool SelfHarm { get; set; } = default!; + + /// + /// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm/intent", Required = global::Newtonsoft.Json.Required.Always)] + public bool SelfHarmIntent { get; set; } = default!; + + /// + /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm/instructions", Required = global::Newtonsoft.Json.Required.Always)] + public bool SelfHarmInstructions { get; set; } = default!; + + /// + /// Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). + /// + [global::Newtonsoft.Json.JsonProperty("sexual", Required = global::Newtonsoft.Json.Required.Always)] + public bool Sexual { get; set; } = default!; + + /// + /// Sexual content that includes an individual who is under 18 years old. + /// + [global::Newtonsoft.Json.JsonProperty("sexual/minors", Required = global::Newtonsoft.Json.Required.Always)] + public bool SexualMinors { get; set; } = default!; + + /// + /// Content that depicts death, violence, or physical injury. + /// + [global::Newtonsoft.Json.JsonProperty("violence", Required = global::Newtonsoft.Json.Required.Always)] + public bool Violence { get; set; } = default!; + + /// + /// Content that depicts death, violence, or physical injury in graphic detail. + /// + [global::Newtonsoft.Json.JsonProperty("violence/graphic", Required = global::Newtonsoft.Json.Required.Always)] + public bool ViolenceGraphic { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs new file mode 100644 index 0000000000..416476f05e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.Models.CreateModerationResponseResultsCategoryScores.g.cs + +#nullable enable + +namespace G +{ + /// + /// A list of the categories along with their scores as predicted by model. + /// + public sealed partial class CreateModerationResponseResultsCategoryScores + { + /// + /// The score for the category 'hate'. + /// + [global::Newtonsoft.Json.JsonProperty("hate", Required = global::Newtonsoft.Json.Required.Always)] + public double Hate { get; set; } = default!; + + /// + /// The score for the category 'hate/threatening'. + /// + [global::Newtonsoft.Json.JsonProperty("hate/threatening", Required = global::Newtonsoft.Json.Required.Always)] + public double HateThreatening { get; set; } = default!; + + /// + /// The score for the category 'harassment'. + /// + [global::Newtonsoft.Json.JsonProperty("harassment", Required = global::Newtonsoft.Json.Required.Always)] + public double Harassment { get; set; } = default!; + + /// + /// The score for the category 'harassment/threatening'. + /// + [global::Newtonsoft.Json.JsonProperty("harassment/threatening", Required = global::Newtonsoft.Json.Required.Always)] + public double HarassmentThreatening { get; set; } = default!; + + /// + /// The score for the category 'self-harm'. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm", Required = global::Newtonsoft.Json.Required.Always)] + public double SelfHarm { get; set; } = default!; + + /// + /// The score for the category 'self-harm/intent'. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm/intent", Required = global::Newtonsoft.Json.Required.Always)] + public double SelfHarmIntent { get; set; } = default!; + + /// + /// The score for the category 'self-harm/instructions'. + /// + [global::Newtonsoft.Json.JsonProperty("self-harm/instructions", Required = global::Newtonsoft.Json.Required.Always)] + public double SelfHarmInstructions { get; set; } = default!; + + /// + /// The score for the category 'sexual'. + /// + [global::Newtonsoft.Json.JsonProperty("sexual", Required = global::Newtonsoft.Json.Required.Always)] + public double Sexual { get; set; } = default!; + + /// + /// The score for the category 'sexual/minors'. + /// + [global::Newtonsoft.Json.JsonProperty("sexual/minors", Required = global::Newtonsoft.Json.Required.Always)] + public double SexualMinors { get; set; } = default!; + + /// + /// The score for the category 'violence'. + /// + [global::Newtonsoft.Json.JsonProperty("violence", Required = global::Newtonsoft.Json.Required.Always)] + public double Violence { get; set; } = default!; + + /// + /// The score for the category 'violence/graphic'. + /// + [global::Newtonsoft.Json.JsonProperty("violence/graphic", Required = global::Newtonsoft.Json.Required.Always)] + public double ViolenceGraphic { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.DeleteModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.DeleteModelResponse.g.verified.cs new file mode 100644 index 0000000000..17af0bdbbf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.DeleteModelResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.DeleteModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteModelResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("deleted", Required = global::Newtonsoft.Json.Required.Always)] + public bool Deleted { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("object", Required = global::Newtonsoft.Json.Required.Always)] + public string Object { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Error.g.verified.cs new file mode 100644 index 0000000000..e0f1aa0c0d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Error.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Error.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Error + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("code", Required = global::Newtonsoft.Json.Required.Always)] + public string? Code { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message", Required = global::Newtonsoft.Json.Required.Always)] + public string Message { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("param", Required = global::Newtonsoft.Json.Required.Always)] + public string? Param { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public string Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs new file mode 100644 index 0000000000..c09885a7b1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ErrorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ErrorResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("error", Required = global::Newtonsoft.Json.Required.Always)] + public Error Error { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs new file mode 100644 index 0000000000..384bf50189 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ListModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("object", Required = global::Newtonsoft.Json.Required.Always)] + public ListModelsResponseObject Object { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Data { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponseObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponseObject.g.verified.cs new file mode 100644 index 0000000000..ae30f0db96 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ListModelsResponseObject.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ListModelsResponseObject.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ListModelsResponseObject + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="list")] + List, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Model.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Model.g.verified.cs new file mode 100644 index 0000000000..97755cdf7a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.Model.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Model.g.cs + +#nullable enable + +namespace G +{ + /// + /// Describes an OpenAI model offering that can be used with the API. + /// + public sealed partial class Model + { + /// + /// The model identifier, which can be referenced in the API endpoints. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The Unix timestamp (in seconds) when the model was created. + /// + [global::Newtonsoft.Json.JsonProperty("created", Required = global::Newtonsoft.Json.Required.Always)] + public int Created { get; set; } = default!; + + /// + /// The object type, which is always "model". + /// + [global::Newtonsoft.Json.JsonProperty("object", Required = global::Newtonsoft.Json.Required.Always)] + public ModelObject Object { get; set; } = default!; + + /// + /// The organization that owns the model. + /// + [global::Newtonsoft.Json.JsonProperty("owned_by", Required = global::Newtonsoft.Json.Required.Always)] + public string OwnedBy { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ModelObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ModelObject.g.verified.cs new file mode 100644 index 0000000000..5ff300b6aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ModelObject.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ModelObject.g.cs + +#nullable enable + +namespace G +{ + /// + /// The object type, which is always "model". + /// + [global::System.Runtime.Serialization.DataContract] + public enum ModelObject + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="model")] + Model, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/Tests.YamlWithLocalFile_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/Tests.OpenAi_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/Tests.YamlWithLocalFile_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/Tests.OpenAi_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Api.EndPoints.ListModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Api.EndPoints.ListModels.g.verified.cs new file mode 100644 index 0000000000..44a0508139 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Api.EndPoints.ListModels.g.verified.cs @@ -0,0 +1,13 @@ +//HintName: G.Api.EndPoints.ListModels.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + public void ListModels() + { + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequest.g.verified.cs similarity index 98% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequest.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequest.g.verified.cs index 0317970232..6512e53b93 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequest.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequest.g.verified.cs @@ -13,6 +13,7 @@ public sealed partial class CreateCompletionRequest /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required object Model { get; set; } /// @@ -21,6 +22,7 @@ public sealed partial class CreateCompletionRequest ///
Default Value: <|endoftext|> ///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] public required object? Prompt { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequestLogitBias.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequestModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateCompletionRequestModel.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateCompletionRequestModel.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponse.g.verified.cs similarity index 88% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponse.g.verified.cs index 63cf15ce23..9d51786d7a 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponse.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class CreateModerationResponse /// The unique identifier for the moderation request. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// /// The model used to generate the moderation results. /// [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } /// /// A list of moderation objects. /// [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Results { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResults.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResults.g.verified.cs similarity index 88% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResults.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResults.g.verified.cs index 1089d3cc32..3350c2c63e 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResults.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResults.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class CreateModerationResponseResults /// Whether the content violates [OpenAI's usage policies](/policies/usage-policies). /// [global::System.Text.Json.Serialization.JsonPropertyName("flagged")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Flagged { get; set; } /// /// A list of the categories, and whether they are flagged or not. /// [global::System.Text.Json.Serialization.JsonPropertyName("categories")] + [global::System.Text.Json.Serialization.JsonRequired] public required CreateModerationResponseResultsCategories Categories { get; set; } /// /// A list of the categories along with their scores as predicted by model. /// [global::System.Text.Json.Serialization.JsonPropertyName("category_scores")] + [global::System.Text.Json.Serialization.JsonRequired] public required CreateModerationResponseResultsCategoryScores CategoryScores { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs similarity index 86% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs index 884902cb16..28ca3c2cd4 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategories.g.verified.cs @@ -13,66 +13,77 @@ public sealed partial class CreateModerationResponseResultsCategories /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. /// [global::System.Text.Json.Serialization.JsonPropertyName("hate")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Hate { get; set; } /// /// Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. /// [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool HateThreatening { get; set; } /// /// Content that expresses, incites, or promotes harassing language towards any target. /// [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Harassment { get; set; } /// /// Harassment content that also includes violence or serious harm towards any target. /// [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool HarassmentThreatening { get; set; } /// /// Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool SelfHarm { get; set; } /// /// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool SelfHarmIntent { get; set; } /// /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool SelfHarmInstructions { get; set; } /// /// Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). /// [global::System.Text.Json.Serialization.JsonPropertyName("sexual")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Sexual { get; set; } /// /// Sexual content that includes an individual who is under 18 years old. /// [global::System.Text.Json.Serialization.JsonPropertyName("sexual/minors")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool SexualMinors { get; set; } /// /// Content that depicts death, violence, or physical injury. /// [global::System.Text.Json.Serialization.JsonPropertyName("violence")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Violence { get; set; } /// /// Content that depicts death, violence, or physical injury in graphic detail. /// [global::System.Text.Json.Serialization.JsonPropertyName("violence/graphic")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool ViolenceGraphic { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs similarity index 83% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs index 61626a6f8a..67f05f1ba4 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateModerationResponseResultsCategoryScores.g.verified.cs @@ -13,66 +13,77 @@ public sealed partial class CreateModerationResponseResultsCategoryScores /// The score for the category 'hate'. /// [global::System.Text.Json.Serialization.JsonPropertyName("hate")] + [global::System.Text.Json.Serialization.JsonRequired] public required double Hate { get; set; } /// /// The score for the category 'hate/threatening'. /// [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] + [global::System.Text.Json.Serialization.JsonRequired] public required double HateThreatening { get; set; } /// /// The score for the category 'harassment'. /// [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] + [global::System.Text.Json.Serialization.JsonRequired] public required double Harassment { get; set; } /// /// The score for the category 'harassment/threatening'. /// [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] + [global::System.Text.Json.Serialization.JsonRequired] public required double HarassmentThreatening { get; set; } /// /// The score for the category 'self-harm'. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm")] + [global::System.Text.Json.Serialization.JsonRequired] public required double SelfHarm { get; set; } /// /// The score for the category 'self-harm/intent'. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] + [global::System.Text.Json.Serialization.JsonRequired] public required double SelfHarmIntent { get; set; } /// /// The score for the category 'self-harm/instructions'. /// [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] + [global::System.Text.Json.Serialization.JsonRequired] public required double SelfHarmInstructions { get; set; } /// /// The score for the category 'sexual'. /// [global::System.Text.Json.Serialization.JsonPropertyName("sexual")] + [global::System.Text.Json.Serialization.JsonRequired] public required double Sexual { get; set; } /// /// The score for the category 'sexual/minors'. /// [global::System.Text.Json.Serialization.JsonPropertyName("sexual/minors")] + [global::System.Text.Json.Serialization.JsonRequired] public required double SexualMinors { get; set; } /// /// The score for the category 'violence'. /// [global::System.Text.Json.Serialization.JsonPropertyName("violence")] + [global::System.Text.Json.Serialization.JsonRequired] public required double Violence { get; set; } /// /// The score for the category 'violence/graphic'. /// [global::System.Text.Json.Serialization.JsonPropertyName("violence/graphic")] + [global::System.Text.Json.Serialization.JsonRequired] public required double ViolenceGraphic { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.DeleteModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.DeleteModelResponse.g.verified.cs similarity index 85% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.DeleteModelResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.DeleteModelResponse.g.verified.cs index b412364649..fd7b170949 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.DeleteModelResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.DeleteModelResponse.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class DeleteModelResponse /// /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Deleted { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Object { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Error.g.verified.cs similarity index 83% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Error.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Error.g.verified.cs index c32a4d2f67..cdb32ab895 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Error.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Error.g.verified.cs @@ -13,24 +13,28 @@ public sealed partial class Error /// /// [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonRequired] public required string? Code { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Message { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("param")] + [global::System.Text.Json.Serialization.JsonRequired] public required string? Param { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Type { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ErrorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs similarity index 92% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ErrorResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs index 94e313a7cb..497357a684 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ErrorResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs @@ -13,6 +13,7 @@ public sealed partial class ErrorResponse /// /// [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] public required Error Error { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ListModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs similarity index 88% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ListModelsResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs index 9681c95c7b..f5b5e4830f 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ListModelsResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs @@ -13,12 +13,14 @@ public sealed partial class ListModelsResponse /// /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Object { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Data { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ListModelsResponseObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ListModelsResponseObject.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ListModelsResponseObject.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ListModelsResponseObject.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Model.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Model.g.verified.cs similarity index 86% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Model.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Model.g.verified.cs index c7dfca9540..4693b325cf 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.Model.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.Model.g.verified.cs @@ -13,24 +13,28 @@ public sealed partial class Model /// The model identifier, which can be referenced in the API endpoints. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// /// The Unix timestamp (in seconds) when the model was created. /// [global::System.Text.Json.Serialization.JsonPropertyName("created")] + [global::System.Text.Json.Serialization.JsonRequired] public required int Created { get; set; } /// /// The object type, which is always "model". /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Object { get; set; } /// /// The organization that owns the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("owned_by")] + [global::System.Text.Json.Serialization.JsonRequired] public required string OwnedBy { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ModelObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ModelObject.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/_#G.Models.ModelObject.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ModelObject.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/Tests.YamlWithLocalFileUseNSwag_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/Tests.YamlWithLocalFileUseNSwag_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CompletionUsage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CompletionUsage.g.verified.cs new file mode 100644 index 0000000000..85058ba005 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CompletionUsage.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.CompletionUsage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Usage statistics for the completion request. + /// + public sealed partial class CompletionUsage + { + /// + /// Number of tokens in the generated completion. + /// + [global::Newtonsoft.Json.JsonProperty("completion_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int CompletionTokens { get; set; } = default!; + + /// + /// Number of tokens in the prompt. + /// + [global::Newtonsoft.Json.JsonProperty("prompt_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int PromptTokens { get; set; } = default!; + + /// + /// Total number of tokens used in the request (prompt + completion). + /// + [global::Newtonsoft.Json.JsonProperty("total_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int TotalTokens { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponse.g.verified.cs new file mode 100644 index 0000000000..833a8578a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponse.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.CreateCompletionResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint). + /// + public sealed partial class CreateCompletionResponse + { + /// + /// A unique identifier for the completion. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The list of completion choices the model generated for the input prompt. + /// + [global::Newtonsoft.Json.JsonProperty("choices", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Choices { get; set; } = default!; + + /// + /// The Unix timestamp (in seconds) of when the completion was created. + /// + [global::Newtonsoft.Json.JsonProperty("created", Required = global::Newtonsoft.Json.Required.Always)] + public int Created { get; set; } = default!; + + /// + /// The model used for completion. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// This fingerprint represents the backend configuration that the model runs with. + /// Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. + /// + [global::Newtonsoft.Json.JsonProperty("system_fingerprint")] + public string? SystemFingerprint { get; set; } + + /// + /// The object type, which is always "text_completion" + /// + [global::Newtonsoft.Json.JsonProperty("object", Required = global::Newtonsoft.Json.Required.Always)] + public CreateCompletionResponseObject Object { get; set; } = default!; + + /// + /// Usage statistics for the completion request. + /// + [global::Newtonsoft.Json.JsonProperty("usage")] + public CompletionUsage? Usage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs new file mode 100644 index 0000000000..9cd8826787 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.CreateCompletionResponseChoices.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateCompletionResponseChoices + { + /// + /// The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, + /// `length` if the maximum number of tokens specified in the request was reached, + /// or `content_filter` if content was omitted due to a flag from our content filters. + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason", Required = global::Newtonsoft.Json.Required.Always)] + public CreateCompletionResponseChoicesFinishReason FinishReason { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index", Required = global::Newtonsoft.Json.Required.Always)] + public int Index { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logprobs", Required = global::Newtonsoft.Json.Required.Always)] + public CreateCompletionResponseChoicesLogprobs? Logprobs { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs new file mode 100644 index 0000000000..9413e0f121 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.CreateCompletionResponseChoicesFinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, + /// `length` if the maximum number of tokens specified in the request was reached, + /// or `content_filter` if content was omitted due to a flag from our content filters. + /// + [global::System.Runtime.Serialization.DataContract] + public enum CreateCompletionResponseChoicesFinishReason + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stop")] + Stop, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="length")] + Length, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="content_filter")] + ContentFilter, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs new file mode 100644 index 0000000000..c7be78c304 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.CreateCompletionResponseChoicesLogprobs.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateCompletionResponseChoicesLogprobs + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text_offset")] + public global::System.Collections.Generic.IList? TextOffset { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("token_logprobs")] + public global::System.Collections.Generic.IList? TokenLogprobs { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tokens")] + public global::System.Collections.Generic.IList? Tokens { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("top_logprobs")] + public global::System.Collections.Generic.IList? TopLogprobs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs new file mode 100644 index 0000000000..a832f273c9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateCompletionResponseChoicesLogprobsTopLogprobs + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs new file mode 100644 index 0000000000..e8add15a88 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/NewtonsoftJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.CreateCompletionResponseObject.g.cs + +#nullable enable + +namespace G +{ + /// + /// The object type, which is always "text_completion" + /// + [global::System.Runtime.Serialization.DataContract] + public enum CreateCompletionResponseObject + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text_completion")] + TextCompletion, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/Tests.YamlWithUrl_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/Tests.YamlWithUrl_Diagnostics.verified.txt rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/Tests.OpenAi_CreateCompletionResponse_Diagnostics.verified.txt diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CompletionUsage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CompletionUsage.g.verified.cs similarity index 87% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CompletionUsage.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CompletionUsage.g.verified.cs index d3c72877e2..a1afe79f08 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CompletionUsage.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CompletionUsage.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class CompletionUsage /// Number of tokens in the generated completion. /// [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] public required int CompletionTokens { get; set; } /// /// Number of tokens in the prompt. /// [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] public required int PromptTokens { get; set; } /// /// Total number of tokens used in the request (prompt + completion). /// [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] public required int TotalTokens { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponse.g.verified.cs similarity index 89% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponse.g.verified.cs index 0654bd8f65..3a403c3636 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponse.g.verified.cs @@ -13,24 +13,28 @@ public sealed partial class CreateCompletionResponse /// A unique identifier for the completion. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// /// The list of completion choices the model generated for the input prompt. /// [global::System.Text.Json.Serialization.JsonPropertyName("choices")] + [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Choices { get; set; } /// /// The Unix timestamp (in seconds) of when the completion was created. /// [global::System.Text.Json.Serialization.JsonPropertyName("created")] + [global::System.Text.Json.Serialization.JsonRequired] public required int Created { get; set; } /// /// The model used for completion. /// [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } /// @@ -44,6 +48,7 @@ public sealed partial class CreateCompletionResponse /// The object type, which is always "text_completion" /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Object { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoices.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs similarity index 87% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoices.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs index 407e9c6be7..5bf533b871 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoices.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoices.g.verified.cs @@ -15,24 +15,28 @@ public sealed partial class CreateCompletionResponseChoices /// or `content_filter` if content was omitted due to a flag from our content filters. /// [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonRequired] public required string FinishReason { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + [global::System.Text.Json.Serialization.JsonRequired] public required CreateCompletionResponseChoicesLogprobs? Logprobs { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesFinishReason.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesLogprobs.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseChoicesLogprobsTopLogprobs.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseObject.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/_#G.Models.CreateCompletionResponseObject.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi_CreateCompletionResponse/SystemTextJson/_#G.Models.CreateCompletionResponseObject.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/Tests.OpenApi3_0_Yaml_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AbuseResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AbuseResponse.g.verified.cs new file mode 100644 index 0000000000..6c53480228 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AbuseResponse.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.AbuseResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class AbuseResponse + { + /// + ///
Example: US, CA, Mountain View, 1600 Amphitheatre Parkway, 94043 + ///
+ [global::Newtonsoft.Json.JsonProperty("address")] + public string? Address { get; set; } + + /// + ///
Example: US + ///
+ [global::Newtonsoft.Json.JsonProperty("country")] + public string? Country { get; set; } + + /// + ///
Example: network-abuse@google.com + ///
+ [global::Newtonsoft.Json.JsonProperty("email")] + public string? Email { get; set; } + + /// + ///
Example: Abuse + ///
+ [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + ///
Example: 8.8.8.0/24 + ///
+ [global::Newtonsoft.Json.JsonProperty("network")] + public string? Network { get; set; } + + /// + ///
Example: +1-650-253-0000 + ///
+ [global::Newtonsoft.Json.JsonProperty("phone")] + public string? Phone { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponse.g.verified.cs new file mode 100644 index 0000000000..87ca16db72 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponse.g.verified.cs @@ -0,0 +1,102 @@ +//HintName: G.Models.AsnResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class AsnResponse + { + /// + ///
Example: AS10507 + ///
+ [global::Newtonsoft.Json.JsonProperty("asn", Required = global::Newtonsoft.Json.Required.Always)] + public string Asn { get; set; } = default!; + + /// + ///
Example: Sprint Personal Communications Systems + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + ///
Example: US + ///
+ [global::Newtonsoft.Json.JsonProperty("country")] + public string? Country { get; set; } + + /// + ///
Example: 1997-02-14 + ///
+ [global::Newtonsoft.Json.JsonProperty("allocated")] + public string? Allocated { get; set; } + + /// + ///
Example: arin + ///
+ [global::Newtonsoft.Json.JsonProperty("registry")] + public string? Registry { get; set; } + + /// + ///
Example: sprint.net + ///
+ [global::Newtonsoft.Json.JsonProperty("domain", Required = global::Newtonsoft.Json.Required.Always)] + public string Domain { get; set; } = default!; + + /// + ///
Example: 71224576 + ///
+ [global::Newtonsoft.Json.JsonProperty("num_ips")] + public int NumIps { get; set; } + + /// + ///
Example: 66.87.125.0/24 + ///
+ [global::Newtonsoft.Json.JsonProperty("route")] + public string? Route { get; set; } + + /// + ///
Example: isp + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public AsnResponseType Type { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("prefixes")] + public global::System.Collections.Generic.IList? Prefixes { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("prefixes6")] + public global::System.Collections.Generic.IList? Prefixes6 { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("peers")] + public global::System.Collections.Generic.IList? Peers { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("upstreams")] + public global::System.Collections.Generic.IList? Upstreams { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("downstreams")] + public global::System.Collections.Generic.IList? Downstreams { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponseType.g.verified.cs new file mode 100644 index 0000000000..e7f17a6e17 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.AsnResponseType.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.AsnResponseType.g.cs + +#nullable enable + +namespace G +{ + /// + ///
Example: isp + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum AsnResponseType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="isp")] + Isp, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="business")] + Business, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="education")] + Education, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="hosting")] + Hosting, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="inactive")] + Inactive, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Carrier.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Carrier.g.verified.cs new file mode 100644 index 0000000000..76cebd5cf2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Carrier.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.Carrier.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Carrier + { + /// + ///
Example: Sprint Corporation + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + ///
Example: 310 + ///
+ [global::Newtonsoft.Json.JsonProperty("mcc", Required = global::Newtonsoft.Json.Required.Always)] + public string Mcc { get; set; } = default!; + + /// + ///
Example: 120 + ///
+ [global::Newtonsoft.Json.JsonProperty("mnc", Required = global::Newtonsoft.Json.Required.Always)] + public string Mnc { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Company.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Company.g.verified.cs new file mode 100644 index 0000000000..a531ab6d85 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Company.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.Company.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Company + { + /// + ///
Example: Sprint Springfield POP + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + ///
Example: sprint.com + ///
+ [global::Newtonsoft.Json.JsonProperty("domain", Required = global::Newtonsoft.Json.Required.Always)] + public string Domain { get; set; } = default!; + + /// + ///
Example: isp + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public CompanyType Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.CompanyType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.CompanyType.g.verified.cs new file mode 100644 index 0000000000..f99e898e4c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.CompanyType.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.CompanyType.g.cs + +#nullable enable + +namespace G +{ + /// + ///
Example: isp + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum CompanyType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="isp")] + Isp, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="business")] + Business, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="education")] + Education, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="hosting")] + Hosting, + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.DomainsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.DomainsResponse.g.verified.cs new file mode 100644 index 0000000000..314b9cb062 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.DomainsResponse.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.DomainsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DomainsResponse + { + /// + ///
Example: 1.1.1.1 + ///
+ [global::Newtonsoft.Json.JsonProperty("ip")] + public string? Ip { get; set; } + + /// + ///
Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("page")] + public int Page { get; set; } + + /// + ///
Example: 17939 + ///
+ [global::Newtonsoft.Json.JsonProperty("total", Required = global::Newtonsoft.Json.Required.Always)] + public int Total { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("domains")] + public global::System.Collections.Generic.IList? Domains { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Error.g.verified.cs new file mode 100644 index 0000000000..0ec989bcf9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Error.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Error.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Error + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("error", Required = global::Newtonsoft.Json.Required.Always)] + public ErrorError Error1 { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.ErrorError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.ErrorError.g.verified.cs new file mode 100644 index 0000000000..8f8e602168 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.ErrorError.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ErrorError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ErrorError + { + /// + ///
Example: Wrong ip + ///
+ [global::Newtonsoft.Json.JsonProperty("title", Required = global::Newtonsoft.Json.Required.Always)] + public string Title { get; set; } = default!; + + /// + ///
Example: Please provide a valid IP address + ///
+ [global::Newtonsoft.Json.JsonProperty("message", Required = global::Newtonsoft.Json.Required.Always)] + public string Message { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.FullResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.FullResponse.g.verified.cs new file mode 100644 index 0000000000..3d57834518 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.FullResponse.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.Models.FullResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FullResponse + { + /// + ///
Example: 66.87.125.72 + ///
+ [global::Newtonsoft.Json.JsonProperty("ip", Required = global::Newtonsoft.Json.Required.Always)] + public string Ip { get; set; } = default!; + + /// + ///
Example: false + ///
+ [global::Newtonsoft.Json.JsonProperty("bogon")] + public bool Bogon { get; set; } + + /// + ///
Example: ip-66-87-125-72.spfdma.spcsdns.net + ///
+ [global::Newtonsoft.Json.JsonProperty("hostname")] + public string? Hostname { get; set; } + + /// + ///
Example: Springfield + ///
+ [global::Newtonsoft.Json.JsonProperty("city")] + public string? City { get; set; } + + /// + ///
Example: Massachusetts + ///
+ [global::Newtonsoft.Json.JsonProperty("region")] + public string? Region { get; set; } + + /// + ///
Example: US + ///
+ [global::Newtonsoft.Json.JsonProperty("country")] + public string? Country { get; set; } + + /// + ///
Example: 42.0999,-72.5783 + ///
+ [global::Newtonsoft.Json.JsonProperty("loc")] + public string? Loc { get; set; } + + /// + ///
Example: 01105 + ///
+ [global::Newtonsoft.Json.JsonProperty("postal")] + public string? Postal { get; set; } + + /// + ///
Example: America/New_York + ///
+ [global::Newtonsoft.Json.JsonProperty("timezone")] + public string? Timezone { get; set; } + + /// + ///
Example: AS51501 Khabarovsk home networks Ltd + ///
+ [global::Newtonsoft.Json.JsonProperty("org")] + public string? Org { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("asn")] + public AsnResponse? Asn { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("company")] + public Company? Company { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("carrier")] + public Carrier? Carrier { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("privacy")] + public PrivacyResponse? Privacy { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("domains")] + public DomainsResponse? Domains { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix.g.verified.cs new file mode 100644 index 0000000000..a5b0d8c8cb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.Prefix.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Prefix + { + /// + ///
Example: 104.69.216.0/22 + ///
+ [global::Newtonsoft.Json.JsonProperty("netblock", Required = global::Newtonsoft.Json.Required.Always)] + public string Netblock { get; set; } = default!; + + /// + ///
Example: AKAMAI + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + ///
Example: Akamai Technologies, Inc. + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + ///
Example: US + ///
+ [global::Newtonsoft.Json.JsonProperty("country", Required = global::Newtonsoft.Json.Required.Always)] + public string Country { get; set; } = default!; + + /// + ///
Example: 256 + ///
+ [global::Newtonsoft.Json.JsonProperty("size")] + public string? Size { get; set; } + + /// + ///
Example: ALLOCATION + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public string? Status { get; set; } + + /// + ///
Example: quadranet.com + ///
+ [global::Newtonsoft.Json.JsonProperty("domain")] + public string? Domain { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix6.g.verified.cs new file mode 100644 index 0000000000..7fe9568003 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.Prefix6.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.Prefix6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Prefix6 + { + /// + ///
Example: 2601::/20 + ///
+ [global::Newtonsoft.Json.JsonProperty("netblock", Required = global::Newtonsoft.Json.Required.Always)] + public string Netblock { get; set; } = default!; + + /// + ///
Example: COMCAST6NET + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + ///
Example: Comcast Cable Communications, LLC + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + ///
Example: US + ///
+ [global::Newtonsoft.Json.JsonProperty("country", Required = global::Newtonsoft.Json.Required.Always)] + public string Country { get; set; } = default!; + + /// + ///
Example: 20282409603651670423947251286016 + ///
+ [global::Newtonsoft.Json.JsonProperty("size")] + public string? Size { get; set; } + + /// + ///
Example: ASSIGNMENT + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public string? Status { get; set; } + + /// + ///
Example: comcast.com + ///
+ [global::Newtonsoft.Json.JsonProperty("domain")] + public string? Domain { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.PrivacyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.PrivacyResponse.g.verified.cs new file mode 100644 index 0000000000..012dbf8e6b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.PrivacyResponse.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.PrivacyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class PrivacyResponse + { + /// + ///
Example: true + ///
+ [global::Newtonsoft.Json.JsonProperty("vpn", Required = global::Newtonsoft.Json.Required.Always)] + public bool Vpn { get; set; } = default!; + + /// + ///
Example: false + ///
+ [global::Newtonsoft.Json.JsonProperty("proxy", Required = global::Newtonsoft.Json.Required.Always)] + public bool Proxy { get; set; } = default!; + + /// + ///
Example: false + ///
+ [global::Newtonsoft.Json.JsonProperty("tor", Required = global::Newtonsoft.Json.Required.Always)] + public bool Tor { get; set; } = default!; + + /// + ///
Example: false + ///
+ [global::Newtonsoft.Json.JsonProperty("hosting", Required = global::Newtonsoft.Json.Required.Always)] + public bool Hosting { get; set; } = default!; + + /// + ///
Example: false + ///
+ [global::Newtonsoft.Json.JsonProperty("relay", Required = global::Newtonsoft.Json.Required.Always)] + public bool Relay { get; set; } = default!; + + /// + ///
Example: + ///
+ [global::Newtonsoft.Json.JsonProperty("service", Required = global::Newtonsoft.Json.Required.Always)] + public string Service { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.RangesResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.RangesResponse.g.verified.cs new file mode 100644 index 0000000000..d2d74e2c6e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/NewtonsoftJson/_#G.Models.RangesResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.RangesResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RangesResponse + { + /// + ///
Example: comcast.net + ///
+ [global::Newtonsoft.Json.JsonProperty("domain", Required = global::Newtonsoft.Json.Required.Always)] + public string Domain { get; set; } = default!; + + /// + ///
Example: 37330 + ///
+ [global::Newtonsoft.Json.JsonProperty("num_ranges", Required = global::Newtonsoft.Json.Required.Always)] + public string NumRanges { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("ranges", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Ranges { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/Tests.YamlWithLocalFile_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AbuseResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AbuseResponse.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AbuseResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AbuseResponse.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AsnResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AsnResponse.g.verified.cs similarity index 93% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AsnResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AsnResponse.g.verified.cs index 182d42a73a..0d592d07fb 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AsnResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AsnResponse.g.verified.cs @@ -13,12 +13,14 @@ public sealed partial class AsnResponse ///
Example: AS10507 ///
[global::System.Text.Json.Serialization.JsonPropertyName("asn")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Asn { get; set; } /// ///
Example: Sprint Personal Communications Systems ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// @@ -43,6 +45,7 @@ public sealed partial class AsnResponse ///
Example: sprint.net ///
[global::System.Text.Json.Serialization.JsonPropertyName("domain")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Domain { get; set; } /// @@ -61,6 +64,7 @@ public sealed partial class AsnResponse ///
Example: isp ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Type { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AsnResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AsnResponseType.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.AsnResponseType.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.AsnResponseType.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Carrier.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Carrier.g.verified.cs similarity index 86% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Carrier.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Carrier.g.verified.cs index 4b9c2f471c..38a1966449 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Carrier.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Carrier.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class Carrier ///
Example: Sprint Corporation ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// ///
Example: 310 ///
[global::System.Text.Json.Serialization.JsonPropertyName("mcc")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Mcc { get; set; } /// ///
Example: 120 ///
[global::System.Text.Json.Serialization.JsonPropertyName("mnc")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Mnc { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Company.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Company.g.verified.cs similarity index 86% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Company.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Company.g.verified.cs index 17230f3542..f1aa992c80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Company.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Company.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class Company ///
Example: Sprint Springfield POP ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// ///
Example: sprint.com ///
[global::System.Text.Json.Serialization.JsonPropertyName("domain")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Domain { get; set; } /// ///
Example: isp ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Type { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.CompanyType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.CompanyType.g.verified.cs similarity index 100% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.CompanyType.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.CompanyType.g.verified.cs diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.DomainsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.DomainsResponse.g.verified.cs similarity index 95% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.DomainsResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.DomainsResponse.g.verified.cs index 1c1b63f5ec..aa90cc6f1f 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.DomainsResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.DomainsResponse.g.verified.cs @@ -25,6 +25,7 @@ public sealed partial class DomainsResponse ///
Example: 17939 ///
[global::System.Text.Json.Serialization.JsonPropertyName("total")] + [global::System.Text.Json.Serialization.JsonRequired] public required int Total { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Error.g.verified.cs similarity index 92% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Error.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Error.g.verified.cs index a2ce8ff431..1f564d3f70 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Error.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Error.g.verified.cs @@ -13,6 +13,7 @@ public sealed partial class Error /// /// [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] public required ErrorError Error1 { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.ErrorError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.ErrorError.g.verified.cs similarity index 88% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.ErrorError.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.ErrorError.g.verified.cs index f0dc669a39..923100f9c1 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.ErrorError.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.ErrorError.g.verified.cs @@ -13,12 +13,14 @@ public sealed partial class ErrorError ///
Example: Wrong ip ///
[global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Title { get; set; } /// ///
Example: Please provide a valid IP address ///
[global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Message { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.FullResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.FullResponse.g.verified.cs similarity index 98% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.FullResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.FullResponse.g.verified.cs index 536ac5eede..faed064663 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.FullResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.FullResponse.g.verified.cs @@ -13,6 +13,7 @@ public sealed partial class FullResponse ///
Example: 66.87.125.72 ///
[global::System.Text.Json.Serialization.JsonPropertyName("ip")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Ip { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix.g.verified.cs similarity index 88% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix.g.verified.cs index 288889bed3..d04a6de702 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix.g.verified.cs @@ -13,24 +13,28 @@ public sealed partial class Prefix ///
Example: 104.69.216.0/22 ///
[global::System.Text.Json.Serialization.JsonPropertyName("netblock")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Netblock { get; set; } /// ///
Example: AKAMAI ///
[global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// ///
Example: Akamai Technologies, Inc. ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// ///
Example: US ///
[global::System.Text.Json.Serialization.JsonPropertyName("country")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Country { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix6.g.verified.cs similarity index 89% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix6.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix6.g.verified.cs index 7fdb572981..74dff7aca4 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.Prefix6.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.Prefix6.g.verified.cs @@ -13,24 +13,28 @@ public sealed partial class Prefix6 ///
Example: 2601::/20 ///
[global::System.Text.Json.Serialization.JsonPropertyName("netblock")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Netblock { get; set; } /// ///
Example: COMCAST6NET ///
[global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } /// ///
Example: Comcast Cable Communications, LLC ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// ///
Example: US ///
[global::System.Text.Json.Serialization.JsonPropertyName("country")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Country { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.PrivacyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.PrivacyResponse.g.verified.cs similarity index 82% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.PrivacyResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.PrivacyResponse.g.verified.cs index 7f9e097304..933c4f6c71 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.PrivacyResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.PrivacyResponse.g.verified.cs @@ -13,36 +13,42 @@ public sealed partial class PrivacyResponse ///
Example: true ///
[global::System.Text.Json.Serialization.JsonPropertyName("vpn")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Vpn { get; set; } /// ///
Example: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("proxy")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Proxy { get; set; } /// ///
Example: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("tor")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Tor { get; set; } /// ///
Example: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("hosting")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Hosting { get; set; } /// ///
Example: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("relay")] + [global::System.Text.Json.Serialization.JsonRequired] public required bool Relay { get; set; } /// ///
Example: ///
[global::System.Text.Json.Serialization.JsonPropertyName("service")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Service { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.RangesResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.RangesResponse.g.verified.cs similarity index 86% rename from src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.RangesResponse.g.verified.cs rename to src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.RangesResponse.g.verified.cs index c21a864383..a406c87b49 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/_#G.Models.RangesResponse.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFile/SystemTextJson/_#G.Models.RangesResponse.g.verified.cs @@ -13,18 +13,21 @@ public sealed partial class RangesResponse ///
Example: comcast.net ///
[global::System.Text.Json.Serialization.JsonPropertyName("domain")] + [global::System.Text.Json.Serialization.JsonRequired] public required string Domain { get; set; } /// ///
Example: 37330 ///
[global::System.Text.Json.Serialization.JsonPropertyName("num_ranges")] + [global::System.Text.Json.Serialization.JsonRequired] public required string NumRanges { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("ranges")] + [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Ranges { get; set; } /// diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AbuseResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AbuseResponse.verified.cs deleted file mode 100644 index 7bd553cfd8..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AbuseResponse.verified.cs +++ /dev/null @@ -1,84 +0,0 @@ -//HintName: G.Models.AbuseResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class AbuseResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("address")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Address { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("country")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Country { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("email")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Email { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("network")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Network { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("phone")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Phone { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AsnResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AsnResponse.verified.cs deleted file mode 100644 index a7a218b205..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.AsnResponse.verified.cs +++ /dev/null @@ -1,150 +0,0 @@ -//HintName: G.Models.AsnResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class AsnResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("asn")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Asn { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("country")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Country { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("allocated")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Allocated { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("registry")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Registry { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domain")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Domain { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("num_ips")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public int? Num_ips { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("route")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Route { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("type")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] - public AsnResponseType Type { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("prefixes")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Prefixes { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("prefixes6")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Prefixes6 { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("peers")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Peers { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("upstreams")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Upstreams { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("downstreams")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Downstreams { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum AsnResponseType - { - - [System.Runtime.Serialization.EnumMember(Value = @"isp")] - Isp = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"business")] - Business = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"education")] - Education = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"hosting")] - Hosting = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"inactive")] - Inactive = 4, - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Carrier.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Carrier.verified.cs deleted file mode 100644 index 3b37158879..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Carrier.verified.cs +++ /dev/null @@ -1,72 +0,0 @@ -//HintName: G.Models.Carrier.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Carrier - { - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("mcc")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Mcc { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("mnc")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Mnc { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Company.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Company.verified.cs deleted file mode 100644 index de25b7d067..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Company.verified.cs +++ /dev/null @@ -1,91 +0,0 @@ -//HintName: G.Models.Company.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Company - { - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domain")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Domain { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("type")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] - public CompanyType Type { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public enum CompanyType - { - - [System.Runtime.Serialization.EnumMember(Value = @"isp")] - Isp = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"business")] - Business = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"education")] - Education = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"hosting")] - Hosting = 3, - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.DomainsResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.DomainsResponse.verified.cs deleted file mode 100644 index 1802399cc0..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.DomainsResponse.verified.cs +++ /dev/null @@ -1,74 +0,0 @@ -//HintName: G.Models.DomainsResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class DomainsResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("ip")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Ip { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("page")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public int? Page { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("total")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public int Total { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domains")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public System.Collections.Generic.ICollection? Domains { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Error.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Error.verified.cs deleted file mode 100644 index a81e5bf53f..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Error.verified.cs +++ /dev/null @@ -1,87 +0,0 @@ -//HintName: G.Models.Error.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Error - { - - [System.Text.Json.Serialization.JsonPropertyName("error")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required] - public Error1 Error1 { get; set; } = new Error1(); - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Error1 - { - - [System.Text.Json.Serialization.JsonPropertyName("title")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Title { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("message")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Message { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.FullResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.FullResponse.verified.cs deleted file mode 100644 index ca803324bd..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.FullResponse.verified.cs +++ /dev/null @@ -1,130 +0,0 @@ -//HintName: G.Models.FullResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class FullResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("ip")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Ip { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("bogon")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public bool? Bogon { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("hostname")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Hostname { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("city")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? City { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("region")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Region { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("country")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Country { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("loc")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Loc { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("postal")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Postal { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("timezone")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Timezone { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("org")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Org { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("asn")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public AsnResponse? Asn { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("company")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public Company? Company { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("carrier")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public Carrier? Carrier { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("privacy")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public PrivacyResponse? Privacy { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domains")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public DomainsResponse? Domains { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix.verified.cs deleted file mode 100644 index fb944f104a..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix.verified.cs +++ /dev/null @@ -1,93 +0,0 @@ -//HintName: G.Models.Prefix.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Prefix - { - - [System.Text.Json.Serialization.JsonPropertyName("netblock")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Netblock { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("id")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Id { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("country")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Country { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("size")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Size { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("status")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Status { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domain")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Domain { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix6.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix6.verified.cs deleted file mode 100644 index 48a95fa547..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.Prefix6.verified.cs +++ /dev/null @@ -1,93 +0,0 @@ -//HintName: G.Models.Prefix6.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Prefix6 - { - - [System.Text.Json.Serialization.JsonPropertyName("netblock")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Netblock { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("id")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Id { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("name")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("country")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Country { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("size")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Size { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("status")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Status { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("domain")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] - public string? Domain { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.PrivacyResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.PrivacyResponse.verified.cs deleted file mode 100644 index 3ed861938a..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.PrivacyResponse.verified.cs +++ /dev/null @@ -1,85 +0,0 @@ -//HintName: G.Models.PrivacyResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class PrivacyResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("vpn")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public bool Vpn { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("proxy")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public bool Proxy { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("tor")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public bool Tor { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("hosting")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public bool Hosting { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("relay")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - public bool Relay { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("service")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Service { get; set; } = default!; - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.RangesResponse.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.RangesResponse.verified.cs deleted file mode 100644 index c2b2d14819..0000000000 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithLocalFileUseNSwag/_#G.Models.RangesResponse.verified.cs +++ /dev/null @@ -1,72 +0,0 @@ -//HintName: G.Models.RangesResponse.cs -//---------------------- -// -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#nullable enable - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" -#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" - -namespace G -{ - using System = global::System; - - - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class RangesResponse - { - - [System.Text.Json.Serialization.JsonPropertyName("domain")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Domain { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("num_ranges")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Num_ranges { get; set; } = default!; - - [System.Text.Json.Serialization.JsonPropertyName("ranges")] - - [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.Never)] - [System.ComponentModel.DataAnnotations.Required] - public System.Collections.Generic.ICollection Ranges { get; set; } = new System.Collections.ObjectModel.Collection(); - - private System.Collections.Generic.IDictionary? _additionalProperties; - - [System.Text.Json.Serialization.JsonExtensionData] - public System.Collections.Generic.IDictionary AdditionalProperties - { - get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } - private set { _additionalProperties = value; } - } - - } - - -} - -#pragma warning restore 108 -#pragma warning restore 114 -#pragma warning restore 472 -#pragma warning restore 612 -#pragma warning restore 1573 -#pragma warning restore 1591 -#pragma warning restore 8073 -#pragma warning restore 3016 -#pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/NewtonsoftJson/Tests.YamlWithUrl_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/NewtonsoftJson/Tests.YamlWithUrl_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/NewtonsoftJson/Tests.YamlWithUrl_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/SystemTextJson/Tests.YamlWithUrl_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/SystemTextJson/Tests.YamlWithUrl_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/YamlWithUrl/SystemTextJson/Tests.YamlWithUrl_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Tests.Helpers.cs b/src/tests/OpenApiGenerator.SnapshotTests/Tests.Helpers.cs index 4fea287005..6aa2f8bd3a 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Tests.Helpers.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Tests.Helpers.cs @@ -4,7 +4,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; -using OpenApiGenerator; +using OpenApiGenerator.Core.Json; namespace OpenApiGenerator.SnapshotTests; @@ -12,6 +12,7 @@ namespace OpenApiGenerator.SnapshotTests; public partial class Tests : VerifyBase { private async Task CheckSourceAsync( + JsonSerializerType jsonSerializerType, AdditionalText[] additionalTexts, Dictionary? globalOptions = null, [CallerMemberName] string? callerName = null, @@ -21,8 +22,22 @@ private async Task CheckSourceAsync( { globalOptions ??= new Dictionary(); globalOptions.Add("build_property.OpenApiGenerator_Namespace", "G"); - - var referenceAssemblies = LatestReferenceAssemblies.Net80; + globalOptions.Add("build_property.OpenApiGenerator_JsonSerializerType", $"{jsonSerializerType:G}"); + globalOptions.Add("build_property.TargetFramework", jsonSerializerType switch + { + JsonSerializerType.SystemTextJson => "net8.0", + JsonSerializerType.NewtonsoftJson => "net6.0", + _ => throw new ArgumentOutOfRangeException(nameof(jsonSerializerType), jsonSerializerType, null) + }); + + var referenceAssemblies = jsonSerializerType switch + { + JsonSerializerType.SystemTextJson => LatestReferenceAssemblies.Net80, + JsonSerializerType.NewtonsoftJson => ReferenceAssemblies.Net.Net60.AddPackages([ + new PackageIdentity("Newtonsoft.Json", "13.0.3") + ]), + _ => throw new ArgumentOutOfRangeException(nameof(jsonSerializerType), jsonSerializerType, null) + }; var references = await referenceAssemblies.ResolveAsync(null, cancellationToken); var compilation = (Compilation)CSharpCompilation.Create( assemblyName: "Tests", @@ -41,11 +56,11 @@ private async Task CheckSourceAsync( await Task.WhenAll( Verify(diagnostics.NormalizeLocations()) - .UseDirectory($"Snapshots/{callerName}") + .UseDirectory($"Snapshots/{callerName}/{jsonSerializerType:G}") //.AutoVerify() .UseTextForParameters("Diagnostics"), Verify(driver) - .UseDirectory($"Snapshots/{callerName}") + .UseDirectory($"Snapshots/{callerName}/{jsonSerializerType:G}") .UseFileName("_") //.AutoVerify() ); diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs b/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs index 2cdb6e1270..55231fefe8 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs @@ -1,7 +1,7 @@ -using Microsoft.CodeAnalysis; -using Microsoft.OpenApi; +using Microsoft.OpenApi; using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; +using OpenApiGenerator.Core.Json; using OpenApiGenerator.Generators; namespace OpenApiGenerator.SnapshotTests; @@ -41,16 +41,20 @@ public partial class Tests }, }; - [TestMethod] - public Task Empty() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task Empty(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([]); + return CheckSourceAsync(jsonSerializerType, []); } - [TestMethod] - public Task Ollama() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task Ollama(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText( path: H.Resources.ollamacurated_yaml.FileName, text: H.Resources.ollamacurated_yaml.AsString()) @@ -61,10 +65,12 @@ public Task Ollama() }); //, additionalGenerators: [new ClientGenerator()] } - [TestMethod] - public Task OpenAi() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task OpenAi(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText( path: H.Resources.openai_yaml.FileName, text: H.Resources.openai_yaml.AsString()) @@ -75,10 +81,12 @@ public Task OpenAi() }, additionalGenerators: [new ClientGenerator()]); } - [TestMethod] - public Task OpenAi_CreateCompletionResponse() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task OpenAi_CreateCompletionResponse(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText( path: H.Resources.openai_yaml.FileName, text: H.Resources.openai_yaml.AsString()) @@ -88,30 +96,36 @@ public Task OpenAi_CreateCompletionResponse() }); } - [TestMethod] - public Task YamlWithLocalFile() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task YamlWithLocalFile(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText( path: "openapi.yaml", text: H.Resources.ipinfo_yaml.AsString()), ]); } - [TestMethod] - public Task OpenApi3_0_Yaml() + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task OpenApi3_0_Yaml(JsonSerializerType jsonSerializerType) { var yaml = PetStore.Serialize(OpenApiSpecVersion.OpenApi3_0, OpenApiFormat.Yaml); - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText("openapi.yaml", yaml), ]); } - - [TestMethod] - public Task YamlWithUrl() + + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task YamlWithUrl(JsonSerializerType jsonSerializerType) { - return CheckSourceAsync([ + return CheckSourceAsync(jsonSerializerType, [ new CustomAdditionalText("https://dedoose-rest-api.onrender.com/swagger/v1/swagger.json", string.Empty), ]); } diff --git a/src/tests/OpenApiGenerator.UnitTests/ModelTests.cs b/src/tests/OpenApiGenerator.UnitTests/ModelTests.cs index b4fbd22bd6..6277345dd0 100644 --- a/src/tests/OpenApiGenerator.UnitTests/ModelTests.cs +++ b/src/tests/OpenApiGenerator.UnitTests/ModelTests.cs @@ -15,6 +15,7 @@ public class ModelTests : ClassName: "Api", NamingConvention: default, JsonSerializerType: default, + UseRequiredKeyword: default, IncludeOperationIds: [], GenerateModels: true, ModelStyle: default, diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ollama/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ollama/_.verified.txt index fcc3f581b0..8d4b859f9b 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ollama/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ollama/_.verified.txt @@ -3,6 +3,7 @@ Id: GenerateCompletionRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -123,6 +124,7 @@ How long (in minutes) to keep the model loaded in memory. Id: format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -152,6 +154,7 @@ Note: it's important to instruct the model to use JSON in the prompt. Otherwise, Id: RequestOptions, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -462,6 +465,7 @@ Sets the number of threads to use during computation. By default, Ollama will de Id: ResponseFormat, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -482,6 +486,7 @@ Note: it's important to instruct the model to use JSON in the prompt. Otherwise, Id: GenerateCompletionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -600,6 +605,7 @@ Time in nanoseconds spent generating the response. Id: GenerateChatCompletionRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -679,6 +685,7 @@ How long (in minutes) to keep the model loaded in memory. Id: format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -708,6 +715,7 @@ Note: it's important to instruct the model to use JSON in the prompt. Otherwise, Id: GenerateChatCompletionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -814,6 +822,7 @@ Time in nanoseconds spent generating the response. Id: Message, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -852,6 +861,7 @@ The content of the message Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -889,6 +899,7 @@ The content of the message Id: GenerateEmbeddingRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -932,6 +943,7 @@ Text to generate embeddings for. Id: GenerateEmbeddingResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -956,6 +968,7 @@ The embedding for the prompt. Id: CreateModelRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1003,6 +1016,7 @@ If `false` the response will be returned as a single response object, otherwise Id: CreateModelResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1025,6 +1039,7 @@ If `false` the response will be returned as a single response object, otherwise Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1062,6 +1077,7 @@ If `false` the response will be returned as a single response object, otherwise Id: CreateModelStatus, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: Status creating the model, @@ -1076,6 +1092,7 @@ If `false` the response will be returned as a single response object, otherwise Id: ModelsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1098,6 +1115,7 @@ If `false` the response will be returned as a single response object, otherwise Id: Model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1143,6 +1161,7 @@ Size of the model on disk. Id: ModelInfoRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1170,6 +1189,7 @@ Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` a Id: ModelInfo, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1221,6 +1241,7 @@ The prompt template for the model. Id: CopyModelRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1254,6 +1275,7 @@ Name of the new model. Id: DeleteModelRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1281,6 +1303,7 @@ Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` a Id: PullModelRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1332,6 +1355,7 @@ If `false` the response will be returned as a single response object, otherwise Id: PullModelResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1389,6 +1413,7 @@ The number of files to be downloaded depends on the number of layers specified i Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1449,6 +1474,7 @@ Status pulling the model. Id: PullModelStatus, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -1465,6 +1491,7 @@ Status pulling the model. Id: PushModelRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1513,6 +1540,7 @@ If `false` the response will be returned as a single response object, otherwise Id: PushModelResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1553,6 +1581,7 @@ total size of the model Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1597,6 +1626,7 @@ total size of the model Id: PushModelStatus, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: Status pushing the model., diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/OpenAi/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/OpenAi/_.verified.txt index 17dcd976c8..8b490d40aa 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/OpenAi/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/OpenAi/_.verified.txt @@ -3,6 +3,7 @@ Id: Error, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -46,6 +47,7 @@ Id: ErrorResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -68,6 +70,7 @@ Id: ListModelsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -97,6 +100,7 @@ Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -120,6 +124,7 @@ Id: DeleteModelResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -156,6 +161,7 @@ Id: CreateCompletionRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -379,6 +385,7 @@ A unique identifier representing your end-user, which can help OpenAI to monitor Id: logit_bias, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -400,6 +407,7 @@ As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -486,6 +494,7 @@ As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> Id: CreateCompletionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -556,6 +565,7 @@ Represents a completion response from the API. Note: both the streamed and non-s Id: choices, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -603,6 +613,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: logprobs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -646,6 +657,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: top_logprobs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: , @@ -660,6 +672,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: finish_reason, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -701,6 +714,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -724,6 +738,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: ChatCompletionRequestMessageContentPart, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: , @@ -738,6 +753,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: ChatCompletionRequestMessageContentPartImage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -767,6 +783,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: image_url, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -799,6 +816,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: detail, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -838,6 +856,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -861,6 +880,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: ChatCompletionRequestMessageContentPartText, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -890,6 +910,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -913,6 +934,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: ChatCompletionRequestMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: , @@ -927,6 +949,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: ChatCompletionRequestSystemMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -963,6 +986,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -986,6 +1010,7 @@ Specifies the detail level of the image. Learn more in the [Vision guide](/docs/ Id: ChatCompletionRequestUserMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1024,6 +1049,7 @@ The contents of the user message. Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1047,6 +1073,7 @@ The contents of the user message. Id: ChatCompletionRequestAssistantMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1099,6 +1126,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: function_call, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1128,6 +1156,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1151,6 +1180,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: ChatCompletionRequestToolMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1187,6 +1217,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1210,6 +1241,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: ChatCompletionRequestFunctionMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1246,6 +1278,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1269,6 +1302,7 @@ The contents of the assistant message. Required unless `tool_calls` or `function Id: FunctionParameters, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -1286,6 +1320,7 @@ Omitting `parameters` defines a function with an empty parameter list., Id: ChatCompletionFunctions, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1325,6 +1360,7 @@ Omitting `parameters` defines a function with an empty parameter list. Id: ChatCompletionFunctionCallOption, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1349,6 +1385,7 @@ Specifying a particular function via `{"name": "my_function"}` forces the model Id: ChatCompletionTool, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1378,6 +1415,7 @@ Specifying a particular function via `{"name": "my_function"}` forces the model Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1401,6 +1439,7 @@ Specifying a particular function via `{"name": "my_function"}` forces the model Id: FunctionObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1440,6 +1479,7 @@ Omitting `parameters` defines a function with an empty parameter list. Id: ChatCompletionToolChoiceOption, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -1461,6 +1501,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionNamedToolChoice, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1490,6 +1531,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: function, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1512,6 +1554,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1535,6 +1578,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionMessageToolCalls, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: The tool calls generated by the model, such as function calls., @@ -1549,6 +1593,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionMessageToolCall, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1585,6 +1630,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: function, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1614,6 +1660,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1637,6 +1684,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionMessageToolCallChunk, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1680,6 +1728,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: function, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1709,6 +1758,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1732,6 +1782,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionRole, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: The role of the author of a message, @@ -1746,6 +1797,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionResponseMessage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1789,6 +1841,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: function_call, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1818,6 +1871,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1841,6 +1895,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: ChatCompletionStreamResponseDelta, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1884,6 +1939,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: function_call, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -1913,6 +1969,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -1957,6 +2014,7 @@ Specifying a particular function via `{"type: "function", "function": {"name": " Id: CreateChatCompletionRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2198,6 +2256,7 @@ A list of functions the model may generate JSON inputs for. Id: logit_bias, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -2217,6 +2276,7 @@ Accepts a JSON object that maps tokens (specified by their token ID in the token Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2249,6 +2309,7 @@ Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the m Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2282,6 +2343,7 @@ Must be one of `text` or `json_object`. Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2396,6 +2458,7 @@ Must be one of `text` or `json_object`. Id: tool_choice, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2428,6 +2491,7 @@ Must be one of `text` or `json_object`. Id: function_call, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2460,6 +2524,7 @@ Must be one of `text` or `json_object`. Id: CreateChatCompletionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2528,6 +2593,7 @@ Can be used in conjunction with the `seed` request parameter to understand when Id: choices, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2576,6 +2642,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: logprobs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2598,6 +2665,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: finish_reason, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2654,6 +2722,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2677,6 +2746,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: CreateChatCompletionFunctionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2745,6 +2815,7 @@ Can be used in conjunction with the `seed` request parameter to understand when Id: choices, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2783,6 +2854,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: finish_reason, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2829,6 +2901,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2852,6 +2925,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: ChatCompletionTokenLogprob, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2895,6 +2969,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: top_logprobs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2931,6 +3006,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: ListPaginatedFineTuningJobsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -2967,6 +3043,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -2990,6 +3067,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: CreateChatCompletionStreamResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3050,6 +3128,7 @@ Can be used in conjunction with the `seed` request parameter to understand when Id: choices, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3098,6 +3177,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: logprobs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3120,6 +3200,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: finish_reason, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3176,6 +3257,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3199,6 +3281,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: CreateChatCompletionImageResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: Represents a streamed chunk of a chat completion response returned by model, based on the provided input., @@ -3213,6 +3296,7 @@ The reason the model stopped generating tokens. This will be `stop` if the model Id: CreateEditRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3296,6 +3380,7 @@ We generally recommend altering this or `temperature` but not both. Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3326,6 +3411,7 @@ We generally recommend altering this or `temperature` but not both. Id: CreateEditResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3369,6 +3455,7 @@ We generally recommend altering this or `temperature` but not both. Id: choices, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3409,6 +3496,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: finish_reason, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3443,6 +3531,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3466,6 +3555,7 @@ or `content_filter` if content was omitted due to a flag from our content filter Id: CreateImageRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3566,6 +3656,7 @@ A unique identifier representing your end-user, which can help OpenAI to monitor Id: quality, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3599,6 +3690,7 @@ The quality of the image that will be generated. `hd` creates images with finer Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3632,6 +3724,7 @@ The format in which the generated images are returned. Must be one of `url` or ` Id: size, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3686,6 +3779,7 @@ The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x Id: style, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3719,6 +3813,7 @@ The style of the generated images. Must be one of `vivid` or `natural`. Vivid ca Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3749,6 +3844,7 @@ The style of the generated images. Must be one of `vivid` or `natural`. Vivid ca Id: ImagesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3778,6 +3874,7 @@ The style of the generated images. Must be one of `vivid` or `natural`. Vivid ca Id: Image, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3814,6 +3911,7 @@ The style of the generated images. Must be one of `vivid` or `natural`. Vivid ca Id: CreateImageEditRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -3906,6 +4004,7 @@ A unique identifier representing your end-user, which can help OpenAI to monitor Id: size, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3946,6 +4045,7 @@ The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -3979,6 +4079,7 @@ The format in which the generated images are returned. Must be one of `url` or ` Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4002,6 +4103,7 @@ The format in which the generated images are returned. Must be one of `url` or ` Id: CreateImageVariationRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4078,6 +4180,7 @@ A unique identifier representing your end-user, which can help OpenAI to monitor Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4111,6 +4214,7 @@ The format in which the generated images are returned. Must be one of `url` or ` Id: size, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4151,6 +4255,7 @@ The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4174,6 +4279,7 @@ The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x Id: CreateModerationRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4210,6 +4316,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4240,6 +4347,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: CreateModerationResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4276,6 +4384,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: results, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4312,6 +4421,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: categories, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4404,6 +4514,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: category_scores, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4496,6 +4607,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: ListFilesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4525,6 +4637,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4548,6 +4661,7 @@ The default is `text-moderation-latest` which will be automatically upgraded ove Id: CreateFileRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4583,6 +4697,7 @@ Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistan Id: purpose, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4617,6 +4732,7 @@ Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistan Id: DeleteFileResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4653,6 +4769,7 @@ Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistan Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4676,6 +4793,7 @@ Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistan Id: CreateFineTuningJobRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4756,6 +4874,7 @@ See the [fine-tuning guide](/docs/guides/fine-tuning) for more details. Id: hyperparameters, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4807,6 +4926,7 @@ through the training dataset. Id: batch_size, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4830,6 +4950,7 @@ through the training dataset. Id: learning_rate_multiplier, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4853,6 +4974,7 @@ through the training dataset. Id: n_epochs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4876,6 +4998,7 @@ through the training dataset. Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4913,6 +5036,7 @@ through the training dataset. Id: ListFineTuningJobEventsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -4942,6 +5066,7 @@ through the training dataset. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -4965,6 +5090,7 @@ through the training dataset. Id: CreateFineTuneRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5166,6 +5292,7 @@ See the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-da Id: hyperparameters, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5193,6 +5320,7 @@ full cycle through the training dataset. Id: n_epochs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5216,6 +5344,7 @@ full cycle through the training dataset. Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5260,6 +5389,7 @@ full cycle through the training dataset. Id: ListFineTunesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5289,6 +5419,7 @@ full cycle through the training dataset. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5312,6 +5443,7 @@ full cycle through the training dataset. Id: ListFineTuneEventsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5341,6 +5473,7 @@ full cycle through the training dataset. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5364,6 +5497,7 @@ full cycle through the training dataset. Id: CreateEmbeddingRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5420,6 +5554,7 @@ A unique identifier representing your end-user, which can help OpenAI to monitor Id: encoding_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5453,6 +5588,7 @@ The format to return the embeddings in. Can be either `float` or [`base64`](http Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5476,6 +5612,7 @@ The format to return the embeddings in. Can be either `float` or [`base64`](http Id: CreateEmbeddingResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5519,6 +5656,7 @@ The format to return the embeddings in. Can be either `float` or [`base64`](http Id: usage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5548,6 +5686,7 @@ The format to return the embeddings in. Can be either `float` or [`base64`](http Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5571,6 +5710,7 @@ The format to return the embeddings in. Can be either `float` or [`base64`](http Id: CreateTranscriptionRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5645,6 +5785,7 @@ The sampling temperature, between 0 and 1. Higher values like 0.8 will make the Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5699,6 +5840,7 @@ The format of the transcript output, in one of these options: `json`, `text`, `s Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5722,6 +5864,7 @@ The format of the transcript output, in one of these options: `json`, `text`, `s Id: CreateTranscriptionResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5744,6 +5887,7 @@ The format of the transcript output, in one of these options: `json`, `text`, `s Id: CreateTranslationRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5809,6 +5953,7 @@ The sampling temperature, between 0 and 1. Higher values like 0.8 will make the Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5832,6 +5977,7 @@ The sampling temperature, between 0 and 1. Higher values like 0.8 will make the Id: CreateTranslationResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5854,6 +6000,7 @@ The sampling temperature, between 0 and 1. Higher values like 0.8 will make the Id: CreateSpeechRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -5912,6 +6059,7 @@ The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is Id: voice, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -5970,6 +6118,7 @@ The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is Id: response_format, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6016,6 +6165,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6046,6 +6196,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: Model, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6089,6 +6240,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6112,6 +6264,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: OpenAIFile, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6183,6 +6336,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6206,6 +6360,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: purpose, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6250,6 +6405,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6287,6 +6443,7 @@ The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. Id: Embedding, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6327,6 +6484,7 @@ Represents an embedding vector returned by embedding endpoint. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6350,6 +6508,7 @@ Represents an embedding vector returned by embedding endpoint. Id: FineTuningJob, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6465,6 +6624,7 @@ The `fine_tuning.job` object represents a fine-tuning job that has been created Id: error, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6501,6 +6661,7 @@ The `fine_tuning.job` object represents a fine-tuning job that has been created Id: hyperparameters, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6527,6 +6688,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: n_epochs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6550,6 +6712,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6573,6 +6736,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6631,6 +6795,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: FineTuningJobEvent, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6681,6 +6846,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: level, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6718,6 +6884,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6741,6 +6908,7 @@ The number of epochs to train the model for. An epoch refers to one full cycle t Id: FineTune, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6849,6 +7017,7 @@ The `FineTune` object represents a legacy fine-tune job that has been created th Id: hyperparams, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6929,6 +7098,7 @@ The weight to use for loss on the prompt tokens. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -6952,6 +7122,7 @@ The weight to use for loss on the prompt tokens. Id: FineTuneEvent, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -6995,6 +7166,7 @@ The weight to use for loss on the prompt tokens. Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7018,6 +7190,7 @@ The weight to use for loss on the prompt tokens. Id: CompletionUsage, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7054,6 +7227,7 @@ The weight to use for loss on the prompt tokens. Id: AssistantObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7157,6 +7331,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -7173,6 +7348,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7196,6 +7372,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: CreateAssistantRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7278,6 +7455,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -7294,6 +7472,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ModifyAssistantRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7376,6 +7555,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -7392,6 +7572,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: DeleteAssistantResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7428,6 +7609,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7451,6 +7633,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ListAssistantsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7505,6 +7688,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: AssistantToolsCode, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7527,6 +7711,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7550,6 +7735,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: AssistantToolsRetrieval, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7572,6 +7758,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7595,6 +7782,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: AssistantToolsFunction, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7624,6 +7812,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7647,6 +7836,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: RunObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7796,6 +7986,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: required_action, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7825,6 +8016,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: submit_tool_outputs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7847,6 +8039,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7870,6 +8063,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: last_error, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -7899,6 +8093,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: code, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7929,6 +8124,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -7945,6 +8141,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -7968,6 +8165,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8040,6 +8238,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: CreateRunRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8099,6 +8298,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8115,6 +8315,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ListRunsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8169,6 +8370,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ModifyRunRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8193,6 +8395,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8209,6 +8412,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: SubmitToolOutputsRunRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8231,6 +8435,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: tool_outputs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8260,6 +8465,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: RunToolCallObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8296,6 +8502,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: function, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8325,6 +8532,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8348,6 +8556,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: CreateThreadAndRunRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8407,6 +8616,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8423,6 +8633,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ThreadObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8468,6 +8679,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8484,6 +8696,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8507,6 +8720,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: CreateThreadRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8538,6 +8752,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8554,6 +8769,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ModifyThreadRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8578,6 +8794,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8594,6 +8811,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: DeleteThreadResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8630,6 +8848,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8653,6 +8872,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ListThreadsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8707,6 +8927,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: MessageObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8797,6 +9018,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8813,6 +9035,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8836,6 +9059,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8866,6 +9090,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: CreateMessageRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8914,6 +9139,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8930,6 +9156,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: role, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -8953,6 +9180,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ModifyMessageRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -8977,6 +9205,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -8993,6 +9222,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: DeleteMessageResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9029,6 +9259,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9052,6 +9283,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ListMessagesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9106,6 +9338,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: MessageContentImageFileObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9135,6 +9368,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: image_file, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9157,6 +9391,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9180,6 +9415,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: MessageContentTextObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9209,6 +9445,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: text, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9238,6 +9475,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9261,6 +9499,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: MessageContentTextAnnotationsFileCitationObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9311,6 +9550,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: file_citation, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9340,6 +9580,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9363,6 +9604,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: MessageContentTextAnnotationsFilePathObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9413,6 +9655,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: file_path, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9435,6 +9678,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9458,6 +9702,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: RunStepObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9582,6 +9827,7 @@ Represents a step in execution of a run. Id: step_details, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: The details of the run step., @@ -9596,6 +9842,7 @@ Represents a step in execution of a run. Id: last_error, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9625,6 +9872,7 @@ Represents a step in execution of a run. Id: code, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9655,6 +9903,7 @@ Represents a step in execution of a run. Id: metadata, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: @@ -9671,6 +9920,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9694,6 +9944,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9724,6 +9975,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: status, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9775,6 +10027,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: ListRunStepsResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9829,6 +10082,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: RunStepDetailsMessageCreationObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9858,6 +10112,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: message_creation, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9880,6 +10135,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9903,6 +10159,7 @@ Set of 16 key-value pairs that can be attached to an object. This can be useful Id: RunStepDetailsToolCallsObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -9934,6 +10191,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: tool_calls, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: , @@ -9948,6 +10206,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -9971,6 +10230,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: RunStepDetailsToolCallsCodeObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10007,6 +10267,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: code_interpreter, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10036,6 +10297,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: outputs, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: , @@ -10050,6 +10312,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10073,6 +10336,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: RunStepDetailsToolCallsCodeOutputLogsObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10102,6 +10366,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10125,6 +10390,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: RunStepDetailsToolCallsCodeOutputImageObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10154,6 +10420,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: image, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10176,6 +10443,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10199,6 +10467,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: RunStepDetailsToolCallsRetrievalObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10235,6 +10504,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: retrieval, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: null, Summary: For now, this is always going to be an empty object., @@ -10249,6 +10519,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10272,6 +10543,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: RunStepDetailsToolCallsFunctionObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10308,6 +10580,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: function, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10344,6 +10617,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: type, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10367,6 +10641,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: AssistantFileObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10410,6 +10685,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10433,6 +10709,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: CreateAssistantFileRequest, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10455,6 +10732,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: DeleteAssistantFileResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10491,6 +10769,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10514,6 +10793,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: ListAssistantFilesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10568,6 +10848,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: MessageFileObject, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ { @@ -10611,6 +10892,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: object, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Style: Enumeration, Properties: [ @@ -10634,6 +10916,7 @@ An array of tool calls the run step was involved in. These can be associated wit Id: ListMessageFilesResponse, AddTypeName: false, Parents: null, + TargetFramework: netstandard2.0, Namespace: G, Properties: [ {