From 56f4491df706fa34ad08bc12cf7b43ea000be354 Mon Sep 17 00:00:00 2001 From: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:45:52 -0500 Subject: [PATCH] feat(csharp): Update main dependencies + misc changes (#5279) feat(csharp): Update dependencies and patch vulnerable transitive dependencies by promoting them --- .../changelogs/csharp-sdk/2024-11-25.mdx | 11 + .../asIs/test/EnumSerializerTests.Template.cs | 2 +- .../StringEnumSerializerTests.Template.cs | 4 +- .../src/asIs/test/Template.Test.csproj | 18 +- .../codegen/src/project/CsharpProject.ts | 31 +- generators/csharp/playground/.gitignore | 32 -- .../Playground.Test/GlobalUsings.cs | 1 - .../Playground.Test/Playground.Test.csproj | 25 - .../playground/Playground.Test/UnitTest1.cs | 10 - .../playground/Playground/Playground.csproj | 10 - .../csharp/playground/Playground/Program.cs | 2 - .../BaseMockServerTestGenerator.ts | 1 + generators/csharp/sdk/versions.yml | 14 + pnpm-lock.yaml | 2 + seed/csharp-model/.gitignore | 1 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedAliasExtends.Test.csproj | 18 +- .../alias-extends/src/SeedAliasExtends.sln | 28 + .../SeedAliasExtends/SeedAliasExtends.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedAlias.Test/SeedAlias.Test.csproj | 18 +- seed/csharp-model/alias/src/SeedAlias.sln | 28 + .../alias/src/SeedAlias/SeedAlias.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAnyAuth.Test/SeedAnyAuth.Test.csproj | 18 +- .../csharp-model/any-auth/src/SeedAnyAuth.sln | 28 + .../src/SeedAnyAuth/SeedAnyAuth.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedApiWideBasePath.Test.csproj | 18 +- .../src/SeedApiWideBasePath.sln | 28 + .../SeedApiWideBasePath.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAudiences.Test.csproj | 18 +- .../audiences/src/SeedAudiences.sln | 28 + .../src/SeedAudiences/SeedAudiences.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAuthEnvironmentVariables.Test.csproj | 18 +- .../src/SeedAuthEnvironmentVariables.sln | 28 + .../SeedAuthEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dBasicAuthEnvironmentVariables.Test.csproj | 18 +- .../src/SeedBasicAuthEnvironmentVariables.sln | 28 + .../SeedBasicAuthEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedBasicAuth.Test.csproj | 18 +- .../basic-auth/src/SeedBasicAuth.sln | 28 + .../src/SeedBasicAuth/SeedBasicAuth.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...BearerTokenEnvironmentVariable.Test.csproj | 18 +- .../SeedBearerTokenEnvironmentVariable.sln | 28 + .../SeedBearerTokenEnvironmentVariable.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedBytes.Test/SeedBytes.Test.csproj | 18 +- seed/csharp-model/bytes/src/SeedBytes.sln | 28 + .../bytes/src/SeedBytes/SeedBytes.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../circular-references/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../code-samples/.github/workflows/ci.yml | 69 --- seed/csharp-model/code-samples/.gitignore | 484 ------------------ .../code-samples/.mock/definition/api.yml | 3 - .../code-samples/.mock/definition/service.yml | 43 -- .../code-samples/.mock/fern.config.json | 1 - .../code-samples/.mock/generators.yml | 1 - .../code-samples/snippet-templates.json | 0 seed/csharp-model/code-samples/snippet.json | 0 .../SeedCodeSamples.Test.csproj | 26 - .../Core/CollectionItemSerializer.cs | 91 ---- .../SeedCodeSamples/Core/OneOfSerializer.cs | 67 --- .../Core/StringEnumSerializer.cs | 53 -- .../SeedCodeSamples/SeedCodeSamples.csproj | 50 -- .../src/SeedCodeSamples/Service/MyResponse.cs | 14 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedCrossPackageTypeNames.Test.csproj | 18 +- .../src/SeedCrossPackageTypeNames.sln | 28 + .../SeedCrossPackageTypeNames.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../csharp-grpc-proto/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedCsharpNamespaceConflict.Test.csproj | 18 +- .../src/SeedCsharpNamespaceConflict.sln | 28 + .../SeedCsharpNamespaceConflict.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedCustomAuth.Test.csproj | 18 +- .../custom-auth/src/SeedCustomAuth.sln | 28 + .../src/SeedCustomAuth/SeedCustomAuth.csproj | 23 +- .../enum/.github/workflows/ci.yml | 69 --- seed/csharp-model/enum/.gitignore | 484 ------------------ .../enum/.mock/definition/__package__.yml | 38 -- .../enum/.mock/definition/api.yml | 1 - .../enum/.mock/definition/inlined-request.yml | 24 - .../enum/.mock/definition/path-param.yml | 17 - .../enum/.mock/definition/query-param.yml | 40 -- seed/csharp-model/enum/.mock/fern.config.json | 1 - seed/csharp-model/enum/.mock/generators.yml | 1 - .../Core/StringEnumSerializerTests.cs | 4 +- .../src/SeedEnum.Test/SeedEnum.Test.csproj | 18 +- .../forward-compatible-enums/src/SeedEnum.sln | 28 + .../src/SeedEnum/SeedEnum.csproj | 23 +- .../SeedEnum.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedEnum.Test/SeedEnum.Test.csproj | 18 +- .../enum/plain-enums/src/SeedEnum.sln | 28 + .../plain-enums/src/SeedEnum/SeedEnum.csproj | 23 +- seed/csharp-model/enum/snippet-templates.json | 0 seed/csharp-model/enum/snippet.json | 0 .../Core/EnumSerializerTests.cs | 2 +- .../SeedErrorProperty.Test.csproj | 18 +- .../error-property/src/SeedErrorProperty.sln | 28 + .../SeedErrorProperty.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExamples.Test.csproj | 18 +- .../examples/src/SeedExamples.sln | 28 + .../src/SeedExamples/SeedExamples.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExhaustive.Test.csproj | 18 +- .../exhaustive/src/SeedExhaustive.sln | 28 + .../src/SeedExhaustive/SeedExhaustive.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExtends.Test/SeedExtends.Test.csproj | 18 +- seed/csharp-model/extends/src/SeedExtends.sln | 28 + .../src/SeedExtends/SeedExtends.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExtraProperties.Test.csproj | 18 +- .../src/SeedExtraProperties.sln | 28 + .../SeedExtraProperties.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedFileDownload.Test.csproj | 18 +- .../file-download/src/SeedFileDownload.sln | 28 + .../SeedFileDownload/SeedFileDownload.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedFileUpload.Test.csproj | 18 +- .../file-upload/src/SeedFileUpload.sln | 28 + .../src/SeedFileUpload/SeedFileUpload.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- seed/csharp-model/folders/src/SeedApi.sln | 28 + .../folders/src/SeedApi/SeedApi.csproj | 23 +- .../no-custom-config/.github/workflows/ci.yml | 69 --- .../no-custom-config/.gitignore | 484 ------------------ .../no-custom-config/.mock/fern.config.json | 1 - .../no-custom-config/.mock/generators.yml | 7 - .../.mock/openapi/openapi.yml | 33 -- .../no-custom-config/.mock/overrides.yml | 56 -- .../.mock/proto/data/v1/data.proto | 213 -------- .../.mock/proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../.mock/proto/google/api/http.proto | 379 -------------- .../no-custom-config/proto/data/v1/data.proto | 213 -------- .../proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../proto/google/api/http.proto | 379 -------------- .../no-custom-config/snippet-templates.json | 0 .../no-custom-config/snippet.json | 0 .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/SeedApi.Test.csproj | 26 - .../no-custom-config/src/SeedApi/Column.cs | 64 --- .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/Version.cs | 6 - .../src/SeedApi/DeleteResponse.cs | 30 -- .../src/SeedApi/DescribeResponse.cs | 73 --- .../src/SeedApi/FetchResponse.cs | 65 --- .../src/SeedApi/IndexedData.cs | 50 -- .../src/SeedApi/ListElement.cs | 39 -- .../src/SeedApi/ListResponse.cs | 66 --- .../no-custom-config/src/SeedApi/Metadata.cs | 39 -- .../src/SeedApi/MetadataValue.cs | 91 ---- .../src/SeedApi/NamespaceSummary.cs | 39 -- .../src/SeedApi/Pagination.cs | 39 -- .../src/SeedApi/QueryColumn.cs | 75 --- .../src/SeedApi/QueryResponse.cs | 66 --- .../src/SeedApi/QueryResult.cs | 50 -- .../src/SeedApi/ScoredColumn.cs | 72 --- .../src/SeedApi/SeedApi.csproj | 71 --- .../src/SeedApi/UpdateResponse.cs | 30 -- .../src/SeedApi/UploadResponse.cs | 39 -- .../no-custom-config/src/SeedApi/Usage.cs | 39 -- .../read-only-memory/.github/workflows/ci.yml | 69 --- .../read-only-memory/.gitignore | 484 ------------------ .../read-only-memory/.mock/fern.config.json | 1 - .../read-only-memory/.mock/generators.yml | 7 - .../.mock/openapi/openapi.yml | 33 -- .../read-only-memory/.mock/overrides.yml | 56 -- .../.mock/proto/data/v1/data.proto | 213 -------- .../.mock/proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../.mock/proto/google/api/http.proto | 379 -------------- .../read-only-memory/proto/data/v1/data.proto | 213 -------- .../proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../proto/google/api/http.proto | 379 -------------- .../read-only-memory/snippet-templates.json | 0 .../read-only-memory/snippet.json | 0 .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/SeedApi.Test.csproj | 26 - .../read-only-memory/src/SeedApi/Column.cs | 64 --- .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/Version.cs | 6 - .../src/SeedApi/DeleteResponse.cs | 30 -- .../src/SeedApi/DescribeResponse.cs | 73 --- .../src/SeedApi/FetchResponse.cs | 65 --- .../src/SeedApi/IndexedData.cs | 50 -- .../src/SeedApi/ListElement.cs | 39 -- .../src/SeedApi/ListResponse.cs | 66 --- .../read-only-memory/src/SeedApi/Metadata.cs | 39 -- .../src/SeedApi/MetadataValue.cs | 91 ---- .../src/SeedApi/NamespaceSummary.cs | 39 -- .../src/SeedApi/Pagination.cs | 39 -- .../src/SeedApi/QueryColumn.cs | 75 --- .../src/SeedApi/QueryResponse.cs | 66 --- .../src/SeedApi/QueryResult.cs | 50 -- .../src/SeedApi/ScoredColumn.cs | 72 --- .../src/SeedApi/SeedApi.csproj | 71 --- .../src/SeedApi/UpdateResponse.cs | 30 -- .../src/SeedApi/UploadResponse.cs | 39 -- .../read-only-memory/src/SeedApi/Usage.cs | 39 -- .../grpc-proto/.github/workflows/ci.yml | 69 --- seed/csharp-model/grpc-proto/.gitignore | 484 ------------------ .../grpc-proto/.mock/fern.config.json | 1 - .../grpc-proto/.mock/generators.yml | 6 - .../grpc-proto/.mock/overrides.yml | 31 -- .../.mock/proto/google/api/annotations.proto | 31 -- .../.mock/proto/google/api/http.proto | 379 -------------- .../grpc-proto/.mock/proto/user/v1/user.proto | 38 -- .../proto/google/api/annotations.proto | 31 -- .../grpc-proto/proto/google/api/http.proto | 379 -------------- .../grpc-proto/proto/user/v1/user.proto | 38 -- .../grpc-proto/snippet-templates.json | 0 seed/csharp-model/grpc-proto/snippet.json | 0 .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/SeedApi.Test.csproj | 26 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../grpc-proto/src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/Version.cs | 6 - .../grpc-proto/src/SeedApi/CreateResponse.cs | 42 -- .../grpc-proto/src/SeedApi/Metadata.cs | 39 -- .../grpc-proto/src/SeedApi/MetadataValue.cs | 91 ---- .../grpc-proto/src/SeedApi/SeedApi.csproj | 69 --- .../grpc-proto/src/SeedApi/UserModel.cs | 74 --- .../grpc/.github/workflows/ci.yml | 69 --- seed/csharp-model/grpc/.gitignore | 484 ------------------ .../grpc/.mock/definition/api.yml | 4 - .../grpc/.mock/definition/user.yml | 61 --- seed/csharp-model/grpc/.mock/fern.config.json | 1 - seed/csharp-model/grpc/.mock/generators.yml | 1 - seed/csharp-model/grpc/snippet-templates.json | 0 seed/csharp-model/grpc/snippet.json | 0 .../grpc/src/SeedApi.Test/SeedApi.Test.csproj | 26 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../grpc/src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../grpc/src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../grpc/src/SeedApi/Core/Public/Version.cs | 6 - .../src/SeedApi/Core/StringEnumSerializer.cs | 53 -- .../grpc/src/SeedApi/SeedApi.csproj | 50 -- .../src/SeedApi/User/CreateUserResponse.cs | 17 - .../grpc/src/SeedApi/User/Metadata.cs | 39 -- .../grpc/src/SeedApi/User/MetadataValue.cs | 91 ---- .../grpc/src/SeedApi/User/User.cs | 32 -- .../Core/EnumSerializerTests.cs | 2 +- .../SeedIdempotencyHeaders.Test.csproj | 18 +- .../src/SeedIdempotencyHeaders.sln | 28 + .../SeedIdempotencyHeaders.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../imdb/src/SeedApi.Test/SeedApi.Test.csproj | 18 +- seed/csharp-model/imdb/src/SeedApi.sln | 28 + .../imdb/src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedLicense.Test/SeedLicense.Test.csproj | 18 +- seed/csharp-model/license/src/SeedLicense.sln | 28 + .../src/SeedLicense/SeedLicense.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedLiteral.Test/SeedLiteral.Test.csproj | 18 +- seed/csharp-model/literal/src/SeedLiteral.sln | 28 + .../src/SeedLiteral/SeedLiteral.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMixedCase.Test.csproj | 18 +- .../mixed-case/src/SeedMixedCase.sln | 28 + .../src/SeedMixedCase/SeedMixedCase.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMixedFileDirectory.Test.csproj | 18 +- .../src/SeedMixedFileDirectory.sln | 28 + .../SeedMixedFileDirectory.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMultiLineDocs.Test.csproj | 18 +- .../multi-line-docs/src/SeedMultiLineDocs.sln | 28 + .../SeedMultiLineDocs.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...edMultiUrlEnvironmentNoDefault.Test.csproj | 18 +- .../src/SeedMultiUrlEnvironmentNoDefault.sln | 28 + .../SeedMultiUrlEnvironmentNoDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMultiUrlEnvironment.Test.csproj | 18 +- .../src/SeedMultiUrlEnvironment.sln | 28 + .../SeedMultiUrlEnvironment.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedNoEnvironment.Test.csproj | 18 +- .../no-environment/src/SeedNoEnvironment.sln | 28 + .../SeedNoEnvironment.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dOauthClientCredentialsDefault.Test.csproj | 18 +- .../src/SeedOauthClientCredentialsDefault.sln | 28 + .../SeedOauthClientCredentialsDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...redentialsEnvironmentVariables.Test.csproj | 18 +- ...hClientCredentialsEnvironmentVariables.sln | 28 + ...ientCredentialsEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedOauthClientCredentials.Test.csproj | 18 +- .../src/SeedOauthClientCredentials.sln | 28 + .../SeedOauthClientCredentials.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedOauthClientCredentials.Test.csproj | 18 +- .../src/SeedOauthClientCredentials.sln | 28 + .../SeedOauthClientCredentials.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedObject.Test/SeedObject.Test.csproj | 18 +- seed/csharp-model/object/src/SeedObject.sln | 28 + .../object/src/SeedObject/SeedObject.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedObjectsWithImports.Test.csproj | 18 +- .../src/SeedObjectsWithImports.sln | 28 + .../SeedObjectsWithImports.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedObjectsWithImports.Test.csproj | 18 +- .../optional/src/SeedObjectsWithImports.sln | 28 + .../SeedObjectsWithImports.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPackageYml.Test.csproj | 18 +- .../package-yml/src/SeedPackageYml.sln | 28 + .../src/SeedPackageYml/SeedPackageYml.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPagination.Test.csproj | 18 +- .../pagination/src/SeedPagination.sln | 28 + .../src/SeedPagination/SeedPagination.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPathParameters.Test.csproj | 18 +- .../src/SeedPathParameters.sln | 28 + .../SeedPathParameters.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPlainText.Test.csproj | 18 +- .../plain-text/src/SeedPlainText.sln | 28 + .../src/SeedPlainText/SeedPlainText.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedQueryParameters.Test.csproj | 18 +- .../src/SeedQueryParameters.sln | 28 + .../SeedQueryParameters.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedNurseryApi.Test.csproj | 18 +- .../reserved-keywords/src/SeedNurseryApi.sln | 28 + .../src/SeedNurseryApi/SeedNurseryApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedResponseProperty.Test.csproj | 18 +- .../src/SeedResponseProperty.sln | 28 + .../SeedResponseProperty.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedServerSentEvents.Test.csproj | 18 +- .../src/SeedServerSentEvents.sln | 28 + .../SeedServerSentEvents.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedServerSentEvents.Test.csproj | 18 +- .../src/SeedServerSentEvents.sln | 28 + .../SeedServerSentEvents.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- seed/csharp-model/simple-fhir/src/SeedApi.sln | 28 + .../simple-fhir/src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...eedSingleUrlEnvironmentDefault.Test.csproj | 18 +- .../src/SeedSingleUrlEnvironmentDefault.sln | 28 + .../SeedSingleUrlEnvironmentDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dSingleUrlEnvironmentNoDefault.Test.csproj | 18 +- .../src/SeedSingleUrlEnvironmentNoDefault.sln | 28 + .../SeedSingleUrlEnvironmentNoDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedStreaming.Test.csproj | 18 +- .../streaming-parameter/src/SeedStreaming.sln | 28 + .../src/SeedStreaming/SeedStreaming.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedStreaming.Test.csproj | 18 +- .../streaming/src/SeedStreaming.sln | 28 + .../src/SeedStreaming/SeedStreaming.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedTrace.Test/SeedTrace.Test.csproj | 18 +- seed/csharp-model/trace/src/SeedTrace.sln | 28 + .../trace/src/SeedTrace/SeedTrace.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUndiscriminatedUnions.Test.csproj | 18 +- .../src/SeedUndiscriminatedUnions.sln | 28 + .../SeedUndiscriminatedUnions.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUnions.Test/SeedUnions.Test.csproj | 18 +- seed/csharp-model/unions/src/SeedUnions.sln | 28 + .../unions/src/SeedUnions/SeedUnions.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUnknownAsAny.Test.csproj | 18 +- .../unknown/src/SeedUnknownAsAny.sln | 28 + .../SeedUnknownAsAny/SeedUnknownAsAny.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedValidation.Test.csproj | 18 +- .../validation/src/SeedValidation.sln | 28 + .../src/SeedValidation/SeedValidation.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVariables.Test.csproj | 18 +- .../variables/src/SeedVariables.sln | 28 + .../src/SeedVariables/SeedVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVersion.Test/SeedVersion.Test.csproj | 18 +- .../version-no-default/src/SeedVersion.sln | 28 + .../src/SeedVersion/SeedVersion.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVersion.Test/SeedVersion.Test.csproj | 18 +- seed/csharp-model/version/src/SeedVersion.sln | 28 + .../src/SeedVersion/SeedVersion.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedWebsocket.Test.csproj | 18 +- .../websocket/src/SeedWebsocket.sln | 28 + .../src/SeedWebsocket/SeedWebsocket.csproj | 23 +- seed/csharp-sdk/.gitignore | 1 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedAliasExtends.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../alias-extends/src/SeedAliasExtends.sln | 28 + .../SeedAliasExtends/SeedAliasExtends.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedAlias.Test/SeedAlias.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/alias/src/SeedAlias.sln | 28 + .../alias/src/SeedAlias/SeedAlias.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAnyAuth.Test/SeedAnyAuth.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/any-auth/src/SeedAnyAuth.sln | 28 + .../src/SeedAnyAuth/SeedAnyAuth.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedApiWideBasePath.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedApiWideBasePath.sln | 28 + .../SeedApiWideBasePath.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAudiences.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../audiences/src/SeedAudiences.sln | 28 + .../src/SeedAudiences/SeedAudiences.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedAuthEnvironmentVariables.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedAuthEnvironmentVariables.sln | 28 + .../SeedAuthEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dBasicAuthEnvironmentVariables.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedBasicAuthEnvironmentVariables.sln | 28 + .../SeedBasicAuthEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedBasicAuth.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../basic-auth/src/SeedBasicAuth.sln | 28 + .../src/SeedBasicAuth/SeedBasicAuth.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...BearerTokenEnvironmentVariable.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../SeedBearerTokenEnvironmentVariable.sln | 28 + .../SeedBearerTokenEnvironmentVariable.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedBytes.Test/SeedBytes.Test.csproj | 18 +- seed/csharp-sdk/bytes/src/SeedBytes.sln | 28 + .../bytes/src/SeedBytes/SeedBytes.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../circular-references/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../code-samples/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/code-samples/.gitignore | 484 ------------------ .../code-samples/.mock/definition/api.yml | 3 - .../code-samples/.mock/definition/service.yml | 43 -- .../code-samples/.mock/fern.config.json | 1 - .../code-samples/.mock/generators.yml | 1 - .../code-samples/snippet-templates.json | 0 seed/csharp-sdk/code-samples/snippet.json | 0 .../SeedCodeSamples.Test.csproj | 26 - .../src/SeedCodeSamples.Test/TestClient.cs | 8 - .../Unit/MockServer/BaseMockServerTest.cs | 39 -- .../Unit/MockServer/HelloTest.cs | 97 ---- .../Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedCodeSamples/Core/Constants.cs | 7 - .../Core/DateTimeSerializer.cs | 22 - .../src/SeedCodeSamples/Core/Extensions.cs | 14 - .../Core/HttpMethodExtensions.cs | 8 - .../SeedCodeSamples/Core/JsonConfiguration.cs | 32 -- .../SeedCodeSamples/Core/OneOfSerializer.cs | 67 --- .../Core/Public/ClientOptions.cs | 29 -- .../Core/Public/RequestOptions.cs | 29 -- .../Public/SeedCodeSamplesApiException.cs | 18 - .../Core/Public/SeedCodeSamplesException.cs | 11 - .../src/SeedCodeSamples/Core/RawClient.cs | 159 ------ .../Core/StringEnumSerializer.cs | 53 -- .../SeedCodeSamples/SeedCodeSamples.csproj | 50 -- .../SeedCodeSamples/SeedCodeSamplesClient.cs | 23 - .../Service/Requests/MyRequest.cs | 11 - .../SeedCodeSamples/Service/ServiceClient.cs | 55 -- .../Service/Types/MyResponse.cs | 14 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedCrossPackageTypeNames.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedCrossPackageTypeNames.sln | 28 + .../SeedCrossPackageTypeNames.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../csharp-grpc-proto/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedCsharpNamespaceConflict.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedCsharpNamespaceConflict.sln | 28 + .../SeedCsharpNamespaceConflict.csproj | 23 +- .../.github/workflows/ci.yml | 69 --- .../extra-dependencies/.gitignore | 477 ----------------- .../.mock/definition/api.yml | 4 - .../.mock/definition/imdb.yml | 42 -- .../extra-dependencies/.mock/fern.config.json | 1 - .../extra-dependencies/.mock/generators.yml | 1 - .../extra-dependencies/snippet-templates.json | 0 .../extra-dependencies/snippet.json | 0 .../src/SeedApi.Test/SeedApi.Test.csproj | 24 - .../src/SeedApi.Test/TestClient.cs | 8 - .../src/SeedApi/Core/ClientOptions.cs | 28 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 6 - .../src/SeedApi/Core/DateTimeSerializer.cs | 21 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/JsonConfiguration.cs | 30 -- .../src/SeedApi/Core/OneOfSerializer.cs | 67 --- .../src/SeedApi/Core/RawClient.cs | 129 ----- .../src/SeedApi/Core/StringEnumSerializer.cs | 53 -- .../src/SeedApi/Imdb/ImdbClient.cs | 57 --- .../SeedApi/Imdb/Types/CreateMovieRequest.cs | 14 - .../src/SeedApi/Imdb/Types/Movie.cs | 20 - .../src/SeedApi/SeedApi.csproj | 47 -- .../src/SeedApi/SeedApiClient.cs | 24 - .../no-custom-config/.github/workflows/ci.yml | 69 --- .../no-custom-config/.gitignore | 477 ----------------- .../no-custom-config/.mock/definition/api.yml | 4 - .../.mock/definition/imdb.yml | 42 -- .../no-custom-config/.mock/fern.config.json | 1 - .../no-custom-config/.mock/generators.yml | 1 - .../no-custom-config/snippet-templates.json | 0 .../no-custom-config/snippet.json | 0 .../src/SeedApi.Test/SeedApi.Test.csproj | 25 - .../src/SeedApi.Test/TestClient.cs | 8 - .../src/SeedApi.Test/Utils/JsonDiffChecker.cs | 88 ---- .../src/SeedApi.Test/Wire/GlobalTestSetup.cs | 32 -- .../src/SeedApi.Test/Wire/SampleTest.cs | 90 ---- .../src/SeedApi/Core/ClientOptions.cs | 28 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 6 - .../src/SeedApi/Core/DateTimeSerializer.cs | 21 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/JsonConfiguration.cs | 30 -- .../src/SeedApi/Core/OneOfSerializer.cs | 67 --- .../src/SeedApi/Core/RawClient.cs | 129 ----- .../src/SeedApi/Core/StringEnumSerializer.cs | 53 -- .../src/SeedApi/Imdb/ImdbClient.cs | 57 --- .../SeedApi/Imdb/Types/CreateMovieRequest.cs | 14 - .../src/SeedApi/Imdb/Types/Movie.cs | 20 - .../src/SeedApi/SeedApi.csproj | 45 -- .../src/SeedApi/SeedApiClient.cs | 24 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedCustomAuth.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../custom-auth/src/SeedCustomAuth.sln | 28 + .../src/SeedCustomAuth/SeedCustomAuth.csproj | 23 +- seed/csharp-sdk/enum/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/enum/.gitignore | 484 ------------------ .../enum/.mock/definition/__package__.yml | 38 -- seed/csharp-sdk/enum/.mock/definition/api.yml | 1 - .../enum/.mock/definition/inlined-request.yml | 24 - .../enum/.mock/definition/path-param.yml | 17 - .../enum/.mock/definition/query-param.yml | 40 -- seed/csharp-sdk/enum/.mock/fern.config.json | 1 - seed/csharp-sdk/enum/.mock/generators.yml | 1 - seed/csharp-sdk/enum/README.md | 89 ---- .../Core/StringEnumSerializerTests.cs | 4 +- .../src/SeedEnum.Test/SeedEnum.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../forward-compatible-enums/src/SeedEnum.sln | 28 + .../src/SeedEnum/SeedEnum.csproj | 23 +- .../SeedEnum.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedEnum.Test/SeedEnum.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../enum/plain-enums/src/SeedEnum.sln | 28 + .../plain-enums/src/SeedEnum/SeedEnum.csproj | 23 +- seed/csharp-sdk/enum/reference.md | 183 ------- seed/csharp-sdk/enum/snippet-templates.json | 0 seed/csharp-sdk/enum/snippet.json | 53 -- .../Core/EnumSerializerTests.cs | 2 +- .../SeedErrorProperty.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../error-property/src/SeedErrorProperty.sln | 28 + .../SeedErrorProperty.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExamples.Test.csproj | 18 +- .../no-custom-config/src/SeedExamples.sln | 28 + .../src/SeedExamples/SeedExamples.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExamples.Test.csproj | 18 +- .../readme-config/src/SeedExamples.sln | 28 + .../src/SeedExamples/SeedExamples.csproj | 23 +- .../exhaustive/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/exhaustive/.gitignore | 477 ----------------- .../exhaustive/.mock/definition/api.yml | 4 - .../.mock/definition/endpoints/container.yml | 48 -- .../.mock/definition/endpoints/enum.yml | 12 - .../definition/endpoints/http-methods.yml | 43 -- .../.mock/definition/endpoints/object.yml | 44 -- .../.mock/definition/endpoints/params.yml | 57 --- .../.mock/definition/endpoints/primitive.yml | 60 --- .../.mock/definition/endpoints/union.yml | 12 - .../.mock/definition/general-errors.yml | 9 - .../.mock/definition/inlined-requests.yml | 25 - .../exhaustive/.mock/definition/no-auth.yml | 20 - .../.mock/definition/no-req-body.yml | 16 - .../.mock/definition/req-with-headers.yml | 14 - .../.mock/definition/types/enum.yml | 12 - .../.mock/definition/types/object.yml | 59 --- .../.mock/definition/types/union.yml | 21 - .../exhaustive/.mock/fern.config.json | 1 - .../exhaustive/.mock/generators.yml | 1 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedExhaustive.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedExhaustive.sln | 28 + .../src/SeedExhaustive/SeedExhaustive.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExhaustive.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedExhaustive.sln | 28 + .../src/SeedExhaustive/SeedExhaustive.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExhaustive.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedExhaustive.sln | 28 + .../src/SeedExhaustive/SeedExhaustive.csproj | 23 +- .../exhaustive/snippet-templates.json | 0 seed/csharp-sdk/exhaustive/snippet.json | 0 .../SeedExhaustive.Test.csproj | 24 - .../src/SeedExhaustive.Test/TestClient.cs | 8 - .../src/SeedExhaustive/Core/ClientOptions.cs | 28 - .../Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedExhaustive/Core/Constants.cs | 6 - .../SeedExhaustive/Core/DateTimeSerializer.cs | 22 - .../Core/HttpMethodExtensions.cs | 8 - .../SeedExhaustive/Core/JsonConfiguration.cs | 30 -- .../SeedExhaustive/Core/OneOfSerializer.cs | 67 --- .../src/SeedExhaustive/Core/RawClient.cs | 129 ----- .../Core/StringEnumSerializer.cs | 53 -- .../Endpoints/Container/ContainerClient.cs | 164 ------ .../Endpoints/EndpointsClient.cs | 37 -- .../Endpoints/Enum/EnumClient.cs | 36 -- .../HttpMethods/HttpMethodsClient.cs | 116 ----- .../Endpoints/Object/ObjectClient.cs | 142 ----- .../Endpoints/Params/ParamsClient.cs | 119 ----- .../Params/Requests/GetWithMultipleQuery.cs | 8 - .../Params/Requests/GetWithPathAndQuery.cs | 6 - .../Endpoints/Params/Requests/GetWithQuery.cs | 8 - .../Endpoints/Primitive/PrimitiveClient.cs | 187 ------- .../Endpoints/Union/UnionClient.cs | 35 -- .../GeneralErrors/GeneralErrorsClient.cs | 15 - .../Types/BadObjectRequestInfo.cs | 11 - .../InlinedRequests/InlinedRequestsClient.cs | 42 -- .../Requests/PostWithObjectBody.cs | 18 - .../src/SeedExhaustive/NoAuth/NoAuthClient.cs | 38 -- .../NoReqBody/NoReqBodyClient.cs | 53 -- .../ReqWithHeaders/ReqWithHeadersClient.cs | 35 -- .../ReqWithHeaders/Requests/ReqWithHeaders.cs | 8 - .../src/SeedExhaustive/SeedExhaustive.csproj | 45 -- .../SeedExhaustive/SeedExhaustiveClient.cs | 44 -- .../SeedExhaustive/Types/Enum/EnumClient.cs | 15 - .../Types/Enum/Types/WeatherReport.cs | 24 - .../Types/Object/ObjectClient.cs | 15 - .../Types/Object/Types/DoubleOptional.cs | 11 - .../Types/NestedObjectWithOptionalField.cs | 15 - .../Types/NestedObjectWithRequiredField.cs | 15 - .../Types/Object/Types/ObjectWithMapOfMap.cs | 12 - .../Object/Types/ObjectWithOptionalField.cs | 50 -- .../Object/Types/ObjectWithRequiredField.cs | 11 - .../src/SeedExhaustive/Types/TypesClient.cs | 25 - .../SeedExhaustive/Types/Union/Types/Cat.cs | 14 - .../SeedExhaustive/Types/Union/Types/Dog.cs | 14 - .../SeedExhaustive/Types/Union/UnionClient.cs | 15 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedExtends.Test/SeedExtends.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/extends/src/SeedExtends.sln | 28 + .../src/SeedExtends/SeedExtends.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedExtraProperties.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedExtraProperties.sln | 28 + .../SeedExtraProperties.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedFileDownload.Test.csproj | 18 +- .../file-download/src/SeedFileDownload.sln | 28 + .../SeedFileDownload/SeedFileDownload.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedFileUpload.Test.csproj | 18 +- .../file-upload/src/SeedFileUpload.sln | 28 + .../src/SeedFileUpload/SeedFileUpload.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/folders/src/SeedApi.sln | 28 + .../folders/src/SeedApi/SeedApi.csproj | 23 +- .../no-custom-config/.github/workflows/ci.yml | 69 --- .../no-custom-config/.gitignore | 484 ------------------ .../no-custom-config/.mock/fern.config.json | 1 - .../no-custom-config/.mock/generators.yml | 6 - .../no-custom-config/.mock/overrides.yml | 56 -- .../.mock/proto/data/v1/data.proto | 213 -------- .../.mock/proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../.mock/proto/google/api/http.proto | 379 -------------- .../no-custom-config/README.md | 99 ---- .../no-custom-config/proto/data/v1/data.proto | 213 -------- .../proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../proto/google/api/http.proto | 379 -------------- .../no-custom-config/reference.md | 293 ----------- .../no-custom-config/snippet-templates.json | 0 .../no-custom-config/snippet.json | 89 ---- .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/Core/RawClientTests.cs | 113 ---- .../SeedApi.Test/SeedApi.Test.Custom.props | 7 - .../src/SeedApi.Test/SeedApi.Test.csproj | 27 - .../src/SeedApi.Test/TestClient.cs | 8 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../src/SeedApi/Core/Extensions.cs | 14 - .../src/SeedApi/Core/HeaderValue.cs | 17 - .../src/SeedApi/Core/Headers.cs | 17 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/IRequestOptions.cs | 34 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/ClientOptions.cs | 56 -- .../SeedApi/Core/Public/GrpcRequestOptions.cs | 36 -- .../src/SeedApi/Core/Public/RequestOptions.cs | 35 -- .../Core/Public/SeedApiApiException.cs | 18 - .../SeedApi/Core/Public/SeedApiException.cs | 11 - .../src/SeedApi/Core/Public/Version.cs | 6 - .../src/SeedApi/Core/RawClient.cs | 196 ------- .../src/SeedApi/Core/RawGrpcClient.cs | 79 --- .../SeedApi/Dataservice/DataserviceClient.cs | 288 ----------- .../Dataservice/Requests/DeleteRequest.cs | 52 -- .../Dataservice/Requests/DescribeRequest.cs | 31 -- .../Dataservice/Requests/FetchRequest.cs | 35 -- .../Dataservice/Requests/ListRequest.cs | 47 -- .../Dataservice/Requests/QueryRequest.cs | 84 --- .../Dataservice/Requests/UpdateRequest.cs | 56 -- .../Dataservice/Requests/UploadRequest.cs | 38 -- .../src/SeedApi/SeedApi.Custom.props | 20 - .../src/SeedApi/SeedApi.csproj | 74 --- .../src/SeedApi/SeedApiClient.cs | 35 -- .../src/SeedApi/Types/Column.cs | 64 --- .../src/SeedApi/Types/DeleteResponse.cs | 30 -- .../src/SeedApi/Types/DescribeResponse.cs | 73 --- .../src/SeedApi/Types/FetchResponse.cs | 65 --- .../src/SeedApi/Types/IndexedData.cs | 50 -- .../src/SeedApi/Types/ListElement.cs | 39 -- .../src/SeedApi/Types/ListResponse.cs | 66 --- .../src/SeedApi/Types/Metadata.cs | 39 -- .../src/SeedApi/Types/MetadataValue.cs | 91 ---- .../src/SeedApi/Types/NamespaceSummary.cs | 39 -- .../src/SeedApi/Types/Pagination.cs | 39 -- .../src/SeedApi/Types/QueryColumn.cs | 75 --- .../src/SeedApi/Types/QueryResponse.cs | 66 --- .../src/SeedApi/Types/QueryResult.cs | 50 -- .../src/SeedApi/Types/ScoredColumn.cs | 72 --- .../src/SeedApi/Types/UpdateResponse.cs | 30 -- .../src/SeedApi/Types/UploadResponse.cs | 39 -- .../src/SeedApi/Types/Usage.cs | 39 -- .../package-id/.github/workflows/ci.yml | 69 --- .../package-id/.gitignore | 484 ------------------ .../package-id/.mock/fern.config.json | 1 - .../package-id/.mock/generators.yml | 6 - .../package-id/.mock/overrides.yml | 56 -- .../package-id/.mock/proto/data/v1/data.proto | 213 -------- .../.mock/proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../.mock/proto/google/api/http.proto | 379 -------------- .../package-id/README.md | 99 ---- .../package-id/proto/data/v1/data.proto | 213 -------- .../proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../package-id/proto/google/api/http.proto | 379 -------------- .../package-id/reference.md | 293 ----------- .../package-id/snippet-templates.json | 0 .../package-id/snippet.json | 89 ---- .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/Core/RawClientTests.cs | 113 ---- .../SeedApi.Test/SeedApi.Test.Custom.props | 7 - .../src/SeedApi.Test/SeedApi.Test.csproj | 27 - .../package-id/src/SeedApi.Test/TestClient.cs | 8 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../package-id/src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../package-id/src/SeedApi/Core/Extensions.cs | 14 - .../src/SeedApi/Core/HeaderValue.cs | 17 - .../package-id/src/SeedApi/Core/Headers.cs | 17 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/IRequestOptions.cs | 34 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/ClientOptions.cs | 56 -- .../SeedApi/Core/Public/GrpcRequestOptions.cs | 36 -- .../src/SeedApi/Core/Public/RequestOptions.cs | 35 -- .../Core/Public/SeedApiApiException.cs | 18 - .../SeedApi/Core/Public/SeedApiException.cs | 11 - .../src/SeedApi/Core/Public/Version.cs | 6 - .../package-id/src/SeedApi/Core/RawClient.cs | 196 ------- .../src/SeedApi/Core/RawGrpcClient.cs | 79 --- .../SeedApi/Dataservice/DataserviceClient.cs | 288 ----------- .../Dataservice/Requests/DeleteRequest.cs | 52 -- .../Dataservice/Requests/DescribeRequest.cs | 31 -- .../Dataservice/Requests/FetchRequest.cs | 35 -- .../Dataservice/Requests/ListRequest.cs | 47 -- .../Dataservice/Requests/QueryRequest.cs | 84 --- .../Dataservice/Requests/UpdateRequest.cs | 56 -- .../Dataservice/Requests/UploadRequest.cs | 38 -- .../src/SeedApi/SeedApi.Custom.props | 20 - .../package-id/src/SeedApi/SeedApi.csproj | 75 --- .../package-id/src/SeedApi/SeedApiClient.cs | 35 -- .../package-id/src/SeedApi/Types/Column.cs | 64 --- .../src/SeedApi/Types/DeleteResponse.cs | 30 -- .../src/SeedApi/Types/DescribeResponse.cs | 73 --- .../src/SeedApi/Types/FetchResponse.cs | 65 --- .../src/SeedApi/Types/IndexedData.cs | 50 -- .../src/SeedApi/Types/ListElement.cs | 39 -- .../src/SeedApi/Types/ListResponse.cs | 66 --- .../package-id/src/SeedApi/Types/Metadata.cs | 39 -- .../src/SeedApi/Types/MetadataValue.cs | 91 ---- .../src/SeedApi/Types/NamespaceSummary.cs | 39 -- .../src/SeedApi/Types/Pagination.cs | 39 -- .../src/SeedApi/Types/QueryColumn.cs | 75 --- .../src/SeedApi/Types/QueryResponse.cs | 66 --- .../src/SeedApi/Types/QueryResult.cs | 50 -- .../src/SeedApi/Types/ScoredColumn.cs | 72 --- .../src/SeedApi/Types/UpdateResponse.cs | 30 -- .../src/SeedApi/Types/UploadResponse.cs | 39 -- .../package-id/src/SeedApi/Types/Usage.cs | 39 -- .../read-only-memory/.github/workflows/ci.yml | 69 --- .../read-only-memory/.gitignore | 484 ------------------ .../read-only-memory/.mock/fern.config.json | 1 - .../read-only-memory/.mock/generators.yml | 6 - .../read-only-memory/.mock/overrides.yml | 56 -- .../.mock/proto/data/v1/data.proto | 213 -------- .../.mock/proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../.mock/proto/google/api/http.proto | 379 -------------- .../read-only-memory/README.md | 95 ---- .../read-only-memory/proto/data/v1/data.proto | 213 -------- .../proto/google/api/annotations.proto | 31 -- .../proto/google/api/field_behavior.proto | 104 ---- .../proto/google/api/http.proto | 379 -------------- .../read-only-memory/reference.md | 289 ----------- .../read-only-memory/snippet-templates.json | 0 .../read-only-memory/snippet.json | 89 ---- .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/Core/RawClientTests.cs | 113 ---- .../SeedApi.Test/SeedApi.Test.Custom.props | 7 - .../src/SeedApi.Test/SeedApi.Test.csproj | 27 - .../src/SeedApi.Test/TestClient.cs | 8 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../src/SeedApi/Core/Extensions.cs | 14 - .../src/SeedApi/Core/HeaderValue.cs | 17 - .../src/SeedApi/Core/Headers.cs | 17 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/IRequestOptions.cs | 34 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/ClientOptions.cs | 56 -- .../SeedApi/Core/Public/GrpcRequestOptions.cs | 36 -- .../src/SeedApi/Core/Public/RequestOptions.cs | 35 -- .../Core/Public/SeedApiApiException.cs | 18 - .../SeedApi/Core/Public/SeedApiException.cs | 11 - .../src/SeedApi/Core/Public/Version.cs | 6 - .../src/SeedApi/Core/RawClient.cs | 196 ------- .../src/SeedApi/Core/RawGrpcClient.cs | 79 --- .../SeedApi/Dataservice/DataserviceClient.cs | 284 ---------- .../Dataservice/Requests/DeleteRequest.cs | 52 -- .../Dataservice/Requests/DescribeRequest.cs | 31 -- .../Dataservice/Requests/FetchRequest.cs | 35 -- .../Dataservice/Requests/ListRequest.cs | 47 -- .../Dataservice/Requests/QueryRequest.cs | 84 --- .../Dataservice/Requests/UpdateRequest.cs | 56 -- .../Dataservice/Requests/UploadRequest.cs | 38 -- .../src/SeedApi/SeedApi.Custom.props | 20 - .../src/SeedApi/SeedApi.csproj | 74 --- .../src/SeedApi/SeedApiClient.cs | 35 -- .../src/SeedApi/Types/Column.cs | 64 --- .../src/SeedApi/Types/DeleteResponse.cs | 30 -- .../src/SeedApi/Types/DescribeResponse.cs | 73 --- .../src/SeedApi/Types/FetchResponse.cs | 65 --- .../src/SeedApi/Types/IndexedData.cs | 50 -- .../src/SeedApi/Types/ListElement.cs | 39 -- .../src/SeedApi/Types/ListResponse.cs | 66 --- .../src/SeedApi/Types/Metadata.cs | 39 -- .../src/SeedApi/Types/MetadataValue.cs | 91 ---- .../src/SeedApi/Types/NamespaceSummary.cs | 39 -- .../src/SeedApi/Types/Pagination.cs | 39 -- .../src/SeedApi/Types/QueryColumn.cs | 75 --- .../src/SeedApi/Types/QueryResponse.cs | 66 --- .../src/SeedApi/Types/QueryResult.cs | 50 -- .../src/SeedApi/Types/ScoredColumn.cs | 72 --- .../src/SeedApi/Types/UpdateResponse.cs | 30 -- .../src/SeedApi/Types/UploadResponse.cs | 39 -- .../src/SeedApi/Types/Usage.cs | 39 -- .../grpc-proto/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/grpc-proto/.gitignore | 484 ------------------ .../grpc-proto/.mock/fern.config.json | 1 - .../grpc-proto/.mock/generators.yml | 6 - .../csharp-sdk/grpc-proto/.mock/overrides.yml | 31 -- .../.mock/proto/google/api/annotations.proto | 31 -- .../.mock/proto/google/api/http.proto | 379 -------------- .../grpc-proto/.mock/proto/user/v1/user.proto | 38 -- seed/csharp-sdk/grpc-proto/README.md | 87 ---- .../proto/google/api/annotations.proto | 31 -- .../grpc-proto/proto/google/api/http.proto | 379 -------------- .../grpc-proto/proto/user/v1/user.proto | 38 -- seed/csharp-sdk/grpc-proto/reference.md | 41 -- .../grpc-proto/snippet-templates.json | 0 seed/csharp-sdk/grpc-proto/snippet.json | 17 - .../SeedApi.Test/Core/EnumSerializerTests.cs | 61 --- .../src/SeedApi.Test/Core/RawClientTests.cs | 113 ---- .../SeedApi.Test/SeedApi.Test.Custom.props | 7 - .../src/SeedApi.Test/SeedApi.Test.csproj | 27 - .../grpc-proto/src/SeedApi.Test/TestClient.cs | 8 - .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../grpc-proto/src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../src/SeedApi/Core/EnumSerializer.cs | 53 -- .../grpc-proto/src/SeedApi/Core/Extensions.cs | 14 - .../src/SeedApi/Core/HeaderValue.cs | 17 - .../grpc-proto/src/SeedApi/Core/Headers.cs | 17 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/IRequestOptions.cs | 34 -- .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/ClientOptions.cs | 56 -- .../SeedApi/Core/Public/GrpcRequestOptions.cs | 36 -- .../src/SeedApi/Core/Public/RequestOptions.cs | 35 -- .../Core/Public/SeedApiApiException.cs | 18 - .../SeedApi/Core/Public/SeedApiException.cs | 11 - .../src/SeedApi/Core/Public/Version.cs | 6 - .../grpc-proto/src/SeedApi/Core/RawClient.cs | 196 ------- .../src/SeedApi/Core/RawGrpcClient.cs | 79 --- .../src/SeedApi/SeedApi.Custom.props | 20 - .../grpc-proto/src/SeedApi/SeedApi.csproj | 72 --- .../grpc-proto/src/SeedApi/SeedApiClient.cs | 35 -- .../src/SeedApi/Types/CreateResponse.cs | 42 -- .../grpc-proto/src/SeedApi/Types/Metadata.cs | 39 -- .../src/SeedApi/Types/MetadataValue.cs | 91 ---- .../grpc-proto/src/SeedApi/Types/UserModel.cs | 74 --- .../Userservice/Requests/CreateRequest.cs | 59 --- .../SeedApi/Userservice/UserserviceClient.cs | 60 --- seed/csharp-sdk/grpc/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/grpc/.gitignore | 484 ------------------ seed/csharp-sdk/grpc/.mock/definition/api.yml | 4 - .../csharp-sdk/grpc/.mock/definition/user.yml | 61 --- seed/csharp-sdk/grpc/.mock/fern.config.json | 1 - seed/csharp-sdk/grpc/.mock/generators.yml | 1 - seed/csharp-sdk/grpc/README.md | 95 ---- seed/csharp-sdk/grpc/reference.md | 96 ---- seed/csharp-sdk/grpc/snippet-templates.json | 0 seed/csharp-sdk/grpc/snippet.json | 29 -- .../src/SeedApi.Test/Core/RawClientTests.cs | 113 ---- .../grpc/src/SeedApi.Test/SeedApi.Test.csproj | 26 - .../grpc/src/SeedApi.Test/TestClient.cs | 8 - .../Unit/MockServer/BaseMockServerTest.cs | 39 -- .../Unit/MockServer/CreateUserTest.cs | 70 --- .../Unit/MockServer/GetUserTest.cs | 60 --- .../SeedApi/Core/CollectionItemSerializer.cs | 91 ---- .../grpc/src/SeedApi/Core/Constants.cs | 7 - .../src/SeedApi/Core/DateTimeSerializer.cs | 22 - .../grpc/src/SeedApi/Core/Extensions.cs | 14 - .../grpc/src/SeedApi/Core/HeaderValue.cs | 17 - .../grpc/src/SeedApi/Core/Headers.cs | 17 - .../src/SeedApi/Core/HttpMethodExtensions.cs | 8 - .../src/SeedApi/Core/JsonConfiguration.cs | 32 -- .../grpc/src/SeedApi/Core/OneOfSerializer.cs | 69 --- .../src/SeedApi/Core/Public/ClientOptions.cs | 35 -- .../src/SeedApi/Core/Public/RequestOptions.cs | 35 -- .../Core/Public/SeedApiApiException.cs | 18 - .../SeedApi/Core/Public/SeedApiException.cs | 11 - .../grpc/src/SeedApi/Core/Public/Version.cs | 6 - .../grpc/src/SeedApi/Core/RawClient.cs | 185 ------- .../src/SeedApi/Core/StringEnumSerializer.cs | 53 -- .../grpc/src/SeedApi/SeedApi.csproj | 50 -- .../grpc/src/SeedApi/SeedApiClient.cs | 35 -- .../User/Requests/CreateUserRequest.cs | 26 - .../SeedApi/User/Requests/GetUserRequest.cs | 19 - .../SeedApi/User/Types/CreateUserResponse.cs | 17 - .../grpc/src/SeedApi/User/Types/Metadata.cs | 39 -- .../src/SeedApi/User/Types/MetadataValue.cs | 91 ---- .../grpc/src/SeedApi/User/Types/User.cs | 32 -- .../grpc/src/SeedApi/User/UserClient.cs | 130 ----- .../Core/EnumSerializerTests.cs | 2 +- .../SeedIdempotencyHeaders.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedIdempotencyHeaders.sln | 28 + .../SeedIdempotencyHeaders.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../exception-class-names/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../imdb/extra-dependencies/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../imdb/no-custom-config/src/SeedApi.sln | 28 + .../src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedLicense.Test/SeedLicense.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../custom-license/src/SeedLicense.sln | 28 + .../src/SeedLicense/SeedLicense.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedLicense.Test/SeedLicense.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../license/mit-license/src/SeedLicense.sln | 28 + .../src/SeedLicense/SeedLicense.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedLiteral.Test/SeedLiteral.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/literal/src/SeedLiteral.sln | 28 + .../src/SeedLiteral/SeedLiteral.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMixedCase.Test.csproj | 18 +- .../mixed-case/src/SeedMixedCase.sln | 28 + .../src/SeedMixedCase/SeedMixedCase.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMixedFileDirectory.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedMixedFileDirectory.sln | 28 + .../SeedMixedFileDirectory.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedMultiLineDocs.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../multi-line-docs/src/SeedMultiLineDocs.sln | 28 + .../SeedMultiLineDocs.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...edMultiUrlEnvironmentNoDefault.Test.csproj | 18 +- .../src/SeedMultiUrlEnvironmentNoDefault.sln | 28 + .../SeedMultiUrlEnvironmentNoDefault.csproj | 23 +- .../.github/workflows/ci.yml | 69 --- .../multi-url-environment/.gitignore | 484 ------------------ .../.mock/definition/api.yml | 14 - .../.mock/definition/ec2.yml | 16 - .../.mock/definition/s3.yml | 17 - .../.mock/fern.config.json | 1 - .../.mock/generators.yml | 1 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedMultiUrlEnvironment.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedMultiUrlEnvironment.sln | 28 + .../SeedMultiUrlEnvironment.csproj | 23 +- .../SeedMultiUrlEnvironment.Test.csproj | 29 -- .../TestClient.cs | 8 - .../Utils/JsonDiffChecker.cs | 85 --- .../Wire/BaseWireTest.cs | 39 -- .../Wire/BootInstanceTest.cs | 39 -- .../Wire/GetPresignedUrlTest.cs | 47 -- .../Core/ClientOptions.cs | 30 -- .../Core/CollectionItemSerializer.cs | 91 ---- .../SeedMultiUrlEnvironment/Core/Constants.cs | 6 - .../Core/DateTimeSerializer.cs | 22 - .../Core/HttpMethodExtensions.cs | 8 - .../Core/JsonConfiguration.cs | 32 -- .../Core/OneOfSerializer.cs | 67 --- .../SeedMultiUrlEnvironment/Core/RawClient.cs | 149 ------ .../Core/RequestOptions.cs | 29 -- .../SeedMultiUrlEnvironmentApiException.cs | 27 - .../SeedMultiUrlEnvironmentEnvironment.cs | 28 - .../Core/SeedMultiUrlEnvironmentException.cs | 11 - .../Core/StringEnumSerializer.cs | 53 -- .../SeedMultiUrlEnvironment/Ec2/Ec2Client.cs | 41 -- .../Ec2/Requests/BootInstanceRequest.cs | 11 - .../S3/Requests/GetPresignedUrlRequest.cs | 11 - .../SeedMultiUrlEnvironment/S3/S3Client.cs | 52 -- .../SeedMultiUrlEnvironment.csproj | 45 -- .../SeedMultiUrlEnvironmentClient.cs | 30 -- .../Core/EnumSerializerTests.cs | 2 +- .../SeedNoEnvironment.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../no-environment/src/SeedNoEnvironment.sln | 28 + .../SeedNoEnvironment.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dOauthClientCredentialsDefault.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedOauthClientCredentialsDefault.sln | 28 + .../SeedOauthClientCredentialsDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...redentialsEnvironmentVariables.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + ...hClientCredentialsEnvironmentVariables.sln | 28 + ...ientCredentialsEnvironmentVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedOauthClientCredentials.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedOauthClientCredentials.sln | 28 + .../SeedOauthClientCredentials.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedOauthClientCredentials.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedOauthClientCredentials.sln | 28 + .../SeedOauthClientCredentials.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedObject.Test/SeedObject.Test.csproj | 18 +- seed/csharp-sdk/object/src/SeedObject.sln | 28 + .../object/src/SeedObject/SeedObject.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedObjectsWithImports.Test.csproj | 18 +- .../src/SeedObjectsWithImports.sln | 28 + .../SeedObjectsWithImports.csproj | 23 +- .../optional/.github/workflows/ci.yml | 69 --- seed/csharp-sdk/optional/.gitignore | 484 ------------------ .../optional/.mock/definition/api.yml | 1 - .../optional/.mock/definition/optional.yml | 11 - .../optional/.mock/fern.config.json | 1 - seed/csharp-sdk/optional/.mock/generators.yml | 1 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedObjectsWithImports.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedObjectsWithImports.sln | 28 + .../SeedObjectsWithImports.csproj | 23 +- .../SeedObjectsWithImports.Test.csproj | 29 -- .../SeedObjectsWithImports.Test/TestClient.cs | 8 - .../Utils/JsonDiffChecker.cs | 85 --- .../Wire/BaseWireTest.cs | 36 -- .../Wire/SendOptionalBodyTest.cs | 56 -- .../Core/CollectionItemSerializer.cs | 91 ---- .../SeedObjectsWithImports/Core/Constants.cs | 6 - .../Core/DateTimeSerializer.cs | 22 - .../Core/HttpMethodExtensions.cs | 8 - .../Core/JsonConfiguration.cs | 32 -- .../Core/OneOfSerializer.cs | 67 --- .../Core/Public/ClientOptions.cs | 29 -- .../Core/Public/RequestOptions.cs | 29 -- .../SeedObjectsWithImportsApiException.cs | 18 - .../Public/SeedObjectsWithImportsException.cs | 11 - .../SeedObjectsWithImports/Core/RawClient.cs | 149 ------ .../Core/StringEnumSerializer.cs | 53 -- .../Optional/OptionalClient.cs | 49 -- .../SeedObjectsWithImports.csproj | 45 -- .../SeedObjectsWithImportsClient.cs | 23 - .../Core/EnumSerializerTests.cs | 2 +- .../SeedPackageYml.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../package-yml/src/SeedPackageYml.sln | 28 + .../src/SeedPackageYml/SeedPackageYml.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPagination.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../pagination/src/SeedPagination.sln | 28 + .../src/SeedPagination/SeedPagination.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPathParameters.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedPathParameters.sln | 28 + .../SeedPathParameters.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedPlainText.Test.csproj | 18 +- .../plain-text/src/SeedPlainText.sln | 28 + .../src/SeedPlainText/SeedPlainText.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedQueryParameters.Test.csproj | 18 +- .../src/SeedQueryParameters.sln | 28 + .../SeedQueryParameters.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedNurseryApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../reserved-keywords/src/SeedNurseryApi.sln | 28 + .../src/SeedNurseryApi/SeedNurseryApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedResponseProperty.Test.csproj | 18 +- .../src/SeedResponseProperty.sln | 28 + .../SeedResponseProperty.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedServerSentEvents.Test.csproj | 18 +- .../src/SeedServerSentEvents.sln | 28 + .../SeedServerSentEvents.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedServerSentEvents.Test.csproj | 18 +- .../src/SeedServerSentEvents.sln | 28 + .../SeedServerSentEvents.csproj | 23 +- .../SeedApi.Test/Core/EnumSerializerTests.cs | 2 +- .../src/SeedApi.Test/SeedApi.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/simple-fhir/src/SeedApi.sln | 28 + .../simple-fhir/src/SeedApi/SeedApi.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...eedSingleUrlEnvironmentDefault.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedSingleUrlEnvironmentDefault.sln | 28 + .../SeedSingleUrlEnvironmentDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- ...dSingleUrlEnvironmentNoDefault.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedSingleUrlEnvironmentNoDefault.sln | 28 + .../SeedSingleUrlEnvironmentNoDefault.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedStreaming.Test.csproj | 18 +- .../streaming-parameter/src/SeedStreaming.sln | 28 + .../src/SeedStreaming/SeedStreaming.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedStreaming.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../streaming/src/SeedStreaming.sln | 28 + .../src/SeedStreaming/SeedStreaming.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../src/SeedTrace.Test/SeedTrace.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/trace/src/SeedTrace.sln | 28 + .../trace/src/SeedTrace/SeedTrace.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUndiscriminatedUnions.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../src/SeedUndiscriminatedUnions.sln | 28 + .../SeedUndiscriminatedUnions.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUnions.Test/SeedUnions.Test.csproj | 18 +- seed/csharp-sdk/unions/src/SeedUnions.sln | 28 + .../unions/src/SeedUnions/SeedUnions.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedUnknownAsAny.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../unknown/src/SeedUnknownAsAny.sln | 28 + .../SeedUnknownAsAny/SeedUnknownAsAny.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedValidation.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../validation/src/SeedValidation.sln | 28 + .../src/SeedValidation/SeedValidation.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVariables.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../variables/src/SeedVariables.sln | 28 + .../src/SeedVariables/SeedVariables.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVersion.Test/SeedVersion.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + .../version-no-default/src/SeedVersion.sln | 28 + .../src/SeedVersion/SeedVersion.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedVersion.Test/SeedVersion.Test.csproj | 18 +- .../Unit/MockServer/BaseMockServerTest.cs | 1 + seed/csharp-sdk/version/src/SeedVersion.sln | 28 + .../src/SeedVersion/SeedVersion.csproj | 23 +- .../Core/EnumSerializerTests.cs | 2 +- .../SeedWebsocket.Test.csproj | 18 +- .../websocket/src/SeedWebsocket.sln | 28 + .../src/SeedWebsocket/SeedWebsocket.csproj | 23 +- 1307 files changed, 6829 insertions(+), 47469 deletions(-) create mode 100644 fern/pages/changelogs/csharp-sdk/2024-11-25.mdx delete mode 100644 generators/csharp/playground/.gitignore delete mode 100644 generators/csharp/playground/Playground.Test/GlobalUsings.cs delete mode 100644 generators/csharp/playground/Playground.Test/Playground.Test.csproj delete mode 100644 generators/csharp/playground/Playground.Test/UnitTest1.cs delete mode 100644 generators/csharp/playground/Playground/Playground.csproj delete mode 100644 generators/csharp/playground/Playground/Program.cs delete mode 100644 seed/csharp-model/.gitignore create mode 100644 seed/csharp-model/alias-extends/src/SeedAliasExtends.sln create mode 100644 seed/csharp-model/alias/src/SeedAlias.sln create mode 100644 seed/csharp-model/any-auth/src/SeedAnyAuth.sln create mode 100644 seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.sln create mode 100644 seed/csharp-model/audiences/src/SeedAudiences.sln create mode 100644 seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln create mode 100644 seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln create mode 100644 seed/csharp-model/basic-auth/src/SeedBasicAuth.sln create mode 100644 seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln create mode 100644 seed/csharp-model/bytes/src/SeedBytes.sln create mode 100644 seed/csharp-model/circular-references-advanced/src/SeedApi.sln create mode 100644 seed/csharp-model/circular-references/src/SeedApi.sln delete mode 100644 seed/csharp-model/code-samples/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/code-samples/.gitignore delete mode 100644 seed/csharp-model/code-samples/.mock/definition/api.yml delete mode 100644 seed/csharp-model/code-samples/.mock/definition/service.yml delete mode 100644 seed/csharp-model/code-samples/.mock/fern.config.json delete mode 100644 seed/csharp-model/code-samples/.mock/generators.yml delete mode 100644 seed/csharp-model/code-samples/snippet-templates.json delete mode 100644 seed/csharp-model/code-samples/snippet.json delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj delete mode 100644 seed/csharp-model/code-samples/src/SeedCodeSamples/Service/MyResponse.cs create mode 100644 seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.sln create mode 100644 seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.sln create mode 100644 seed/csharp-model/csharp-grpc-proto/src/SeedApi.sln create mode 100644 seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln create mode 100644 seed/csharp-model/custom-auth/src/SeedCustomAuth.sln delete mode 100644 seed/csharp-model/enum/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/enum/.gitignore delete mode 100644 seed/csharp-model/enum/.mock/definition/__package__.yml delete mode 100644 seed/csharp-model/enum/.mock/definition/api.yml delete mode 100644 seed/csharp-model/enum/.mock/definition/inlined-request.yml delete mode 100644 seed/csharp-model/enum/.mock/definition/path-param.yml delete mode 100644 seed/csharp-model/enum/.mock/definition/query-param.yml delete mode 100644 seed/csharp-model/enum/.mock/fern.config.json delete mode 100644 seed/csharp-model/enum/.mock/generators.yml create mode 100644 seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.sln create mode 100644 seed/csharp-model/enum/plain-enums/src/SeedEnum.sln delete mode 100644 seed/csharp-model/enum/snippet-templates.json delete mode 100644 seed/csharp-model/enum/snippet.json create mode 100644 seed/csharp-model/error-property/src/SeedErrorProperty.sln create mode 100644 seed/csharp-model/examples/src/SeedExamples.sln create mode 100644 seed/csharp-model/exhaustive/src/SeedExhaustive.sln create mode 100644 seed/csharp-model/extends/src/SeedExtends.sln create mode 100644 seed/csharp-model/extra-properties/src/SeedExtraProperties.sln create mode 100644 seed/csharp-model/file-download/src/SeedFileDownload.sln create mode 100644 seed/csharp-model/file-upload/src/SeedFileUpload.sln create mode 100644 seed/csharp-model/folders/src/SeedApi.sln delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.gitignore delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet-templates.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Column.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DeleteResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DescribeResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/FetchResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/IndexedData.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListElement.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Metadata.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/MetadataValue.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/NamespaceSummary.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Pagination.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryColumn.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResult.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ScoredColumn.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UpdateResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UploadResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Usage.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.gitignore delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet-templates.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet.json delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Column.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DeleteResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DescribeResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/FetchResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/IndexedData.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListElement.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Metadata.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/MetadataValue.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/NamespaceSummary.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Pagination.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryColumn.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResult.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ScoredColumn.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UpdateResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UploadResponse.cs delete mode 100644 seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Usage.cs delete mode 100644 seed/csharp-model/grpc-proto/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/grpc-proto/.gitignore delete mode 100644 seed/csharp-model/grpc-proto/.mock/fern.config.json delete mode 100644 seed/csharp-model/grpc-proto/.mock/generators.yml delete mode 100644 seed/csharp-model/grpc-proto/.mock/overrides.yml delete mode 100644 seed/csharp-model/grpc-proto/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto/.mock/proto/user/v1/user.proto delete mode 100644 seed/csharp-model/grpc-proto/proto/google/api/annotations.proto delete mode 100644 seed/csharp-model/grpc-proto/proto/google/api/http.proto delete mode 100644 seed/csharp-model/grpc-proto/proto/user/v1/user.proto delete mode 100644 seed/csharp-model/grpc-proto/snippet-templates.json delete mode 100644 seed/csharp-model/grpc-proto/snippet.json delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/CreateResponse.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/Metadata.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/MetadataValue.cs delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-model/grpc-proto/src/SeedApi/UserModel.cs delete mode 100644 seed/csharp-model/grpc/.github/workflows/ci.yml delete mode 100644 seed/csharp-model/grpc/.gitignore delete mode 100644 seed/csharp-model/grpc/.mock/definition/api.yml delete mode 100644 seed/csharp-model/grpc/.mock/definition/user.yml delete mode 100644 seed/csharp-model/grpc/.mock/fern.config.json delete mode 100644 seed/csharp-model/grpc/.mock/generators.yml delete mode 100644 seed/csharp-model/grpc/snippet-templates.json delete mode 100644 seed/csharp-model/grpc/snippet.json delete mode 100644 seed/csharp-model/grpc/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-model/grpc/src/SeedApi/User/CreateUserResponse.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/User/Metadata.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/User/MetadataValue.cs delete mode 100644 seed/csharp-model/grpc/src/SeedApi/User/User.cs create mode 100644 seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.sln create mode 100644 seed/csharp-model/imdb/src/SeedApi.sln create mode 100644 seed/csharp-model/license/src/SeedLicense.sln create mode 100644 seed/csharp-model/literal/src/SeedLiteral.sln create mode 100644 seed/csharp-model/mixed-case/src/SeedMixedCase.sln create mode 100644 seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.sln create mode 100644 seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.sln create mode 100644 seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln create mode 100644 seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.sln create mode 100644 seed/csharp-model/no-environment/src/SeedNoEnvironment.sln create mode 100644 seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln create mode 100644 seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln create mode 100644 seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln create mode 100644 seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.sln create mode 100644 seed/csharp-model/object/src/SeedObject.sln create mode 100644 seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.sln create mode 100644 seed/csharp-model/optional/src/SeedObjectsWithImports.sln create mode 100644 seed/csharp-model/package-yml/src/SeedPackageYml.sln create mode 100644 seed/csharp-model/pagination/src/SeedPagination.sln create mode 100644 seed/csharp-model/path-parameters/src/SeedPathParameters.sln create mode 100644 seed/csharp-model/plain-text/src/SeedPlainText.sln create mode 100644 seed/csharp-model/query-parameters/src/SeedQueryParameters.sln create mode 100644 seed/csharp-model/reserved-keywords/src/SeedNurseryApi.sln create mode 100644 seed/csharp-model/response-property/src/SeedResponseProperty.sln create mode 100644 seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.sln create mode 100644 seed/csharp-model/server-sent-events/src/SeedServerSentEvents.sln create mode 100644 seed/csharp-model/simple-fhir/src/SeedApi.sln create mode 100644 seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln create mode 100644 seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln create mode 100644 seed/csharp-model/streaming-parameter/src/SeedStreaming.sln create mode 100644 seed/csharp-model/streaming/src/SeedStreaming.sln create mode 100644 seed/csharp-model/trace/src/SeedTrace.sln create mode 100644 seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln create mode 100644 seed/csharp-model/unions/src/SeedUnions.sln create mode 100644 seed/csharp-model/unknown/src/SeedUnknownAsAny.sln create mode 100644 seed/csharp-model/validation/src/SeedValidation.sln create mode 100644 seed/csharp-model/variables/src/SeedVariables.sln create mode 100644 seed/csharp-model/version-no-default/src/SeedVersion.sln create mode 100644 seed/csharp-model/version/src/SeedVersion.sln create mode 100644 seed/csharp-model/websocket/src/SeedWebsocket.sln delete mode 100644 seed/csharp-sdk/.gitignore create mode 100644 seed/csharp-sdk/alias-extends/src/SeedAliasExtends.sln create mode 100644 seed/csharp-sdk/alias/src/SeedAlias.sln create mode 100644 seed/csharp-sdk/any-auth/src/SeedAnyAuth.sln create mode 100644 seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.sln create mode 100644 seed/csharp-sdk/audiences/src/SeedAudiences.sln create mode 100644 seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln create mode 100644 seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln create mode 100644 seed/csharp-sdk/basic-auth/src/SeedBasicAuth.sln create mode 100644 seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln create mode 100644 seed/csharp-sdk/bytes/src/SeedBytes.sln create mode 100644 seed/csharp-sdk/circular-references-advanced/src/SeedApi.sln create mode 100644 seed/csharp-sdk/circular-references/src/SeedApi.sln delete mode 100644 seed/csharp-sdk/code-samples/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/code-samples/.gitignore delete mode 100644 seed/csharp-sdk/code-samples/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/code-samples/.mock/definition/service.yml delete mode 100644 seed/csharp-sdk/code-samples/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/code-samples/.mock/generators.yml delete mode 100644 seed/csharp-sdk/code-samples/snippet-templates.json delete mode 100644 seed/csharp-sdk/code-samples/snippet.json delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/BaseMockServerTest.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/HelloTest.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Constants.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesApiException.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesException.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamplesClient.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Requests/MyRequest.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/ServiceClient.cs delete mode 100644 seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Types/MyResponse.cs create mode 100644 seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.sln create mode 100644 seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.sln create mode 100644 seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.sln create mode 100644 seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.gitignore delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/imdb.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/generators.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet-templates.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/ClientOptions.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/ImdbClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/CreateMovieRequest.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/Movie.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.gitignore delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/imdb.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/generators.yml delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet-templates.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet.json delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Utils/JsonDiffChecker.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/GlobalTestSetup.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/SampleTest.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/ClientOptions.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/ImdbClient.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/CreateMovieRequest.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/Movie.cs delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApiClient.cs create mode 100644 seed/csharp-sdk/custom-auth/src/SeedCustomAuth.sln delete mode 100644 seed/csharp-sdk/enum/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/enum/.gitignore delete mode 100644 seed/csharp-sdk/enum/.mock/definition/__package__.yml delete mode 100644 seed/csharp-sdk/enum/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/enum/.mock/definition/inlined-request.yml delete mode 100644 seed/csharp-sdk/enum/.mock/definition/path-param.yml delete mode 100644 seed/csharp-sdk/enum/.mock/definition/query-param.yml delete mode 100644 seed/csharp-sdk/enum/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/enum/.mock/generators.yml delete mode 100644 seed/csharp-sdk/enum/README.md create mode 100644 seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.sln create mode 100644 seed/csharp-sdk/enum/plain-enums/src/SeedEnum.sln delete mode 100644 seed/csharp-sdk/enum/reference.md delete mode 100644 seed/csharp-sdk/enum/snippet-templates.json delete mode 100644 seed/csharp-sdk/enum/snippet.json create mode 100644 seed/csharp-sdk/error-property/src/SeedErrorProperty.sln create mode 100644 seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.sln create mode 100644 seed/csharp-sdk/examples/readme-config/src/SeedExamples.sln delete mode 100644 seed/csharp-sdk/exhaustive/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/exhaustive/.gitignore delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/container.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/enum.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/http-methods.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/object.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/params.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/primitive.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/endpoints/union.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/general-errors.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/inlined-requests.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/no-auth.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/no-req-body.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/req-with-headers.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/types/enum.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/types/object.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/definition/types/union.yml delete mode 100644 seed/csharp-sdk/exhaustive/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/exhaustive/.mock/generators.yml create mode 100644 seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.sln create mode 100644 seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.sln create mode 100644 seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.sln delete mode 100644 seed/csharp-sdk/exhaustive/snippet-templates.json delete mode 100644 seed/csharp-sdk/exhaustive/snippet.json delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/ClientOptions.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/Constants.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/EndpointsClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Enum/EnumClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/ParamsClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithMultipleQuery.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithPathAndQuery.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithQuery.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Primitive/PrimitiveClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Union/UnionClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/GeneralErrorsClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/Types/BadObjectRequestInfo.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/Requests/PostWithObjectBody.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoAuth/NoAuthClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoReqBody/NoReqBodyClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/ReqWithHeadersClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/Requests/ReqWithHeaders.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustiveClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/EnumClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/Types/WeatherReport.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/ObjectClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/DoubleOptional.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithOptionalField.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithRequiredField.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithMapOfMap.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithOptionalField.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithRequiredField.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/TypesClient.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Cat.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Dog.cs delete mode 100644 seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/UnionClient.cs create mode 100644 seed/csharp-sdk/extends/src/SeedExtends.sln create mode 100644 seed/csharp-sdk/extra-properties/src/SeedExtraProperties.sln create mode 100644 seed/csharp-sdk/file-download/src/SeedFileDownload.sln create mode 100644 seed/csharp-sdk/file-upload/src/SeedFileUpload.sln create mode 100644 seed/csharp-sdk/folders/src/SeedApi.sln delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.gitignore delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet-templates.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/RawClientTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HeaderValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Headers.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/IRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/GrpcRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawGrpcClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DeleteRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DescribeRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/FetchRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/ListRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/QueryRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UpdateRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UploadRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Column.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DeleteResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DescribeResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/FetchResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/IndexedData.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListElement.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Metadata.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/MetadataValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/NamespaceSummary.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Pagination.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResult.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ScoredColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UploadResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Usage.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.gitignore delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/overrides.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet-templates.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/RawClientTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HeaderValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Headers.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/IRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/GrpcRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawGrpcClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DeleteRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DescribeRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/FetchRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/ListRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/QueryRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UpdateRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UploadRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Column.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DeleteResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DescribeResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/FetchResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/IndexedData.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListElement.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Metadata.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/MetadataValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/NamespaceSummary.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Pagination.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResult.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ScoredColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UploadResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Usage.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.gitignore delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet-templates.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/RawClientTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HeaderValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Headers.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/IRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/GrpcRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawGrpcClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DeleteRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DescribeRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/FetchRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/ListRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/QueryRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UpdateRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UploadRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Column.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DeleteResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DescribeResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/FetchResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/IndexedData.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListElement.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Metadata.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/MetadataValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/NamespaceSummary.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Pagination.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResult.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ScoredColumn.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UploadResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Usage.cs delete mode 100644 seed/csharp-sdk/grpc-proto/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/grpc-proto/.gitignore delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/generators.yml delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/overrides.yml delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto/.mock/proto/user/v1/user.proto delete mode 100644 seed/csharp-sdk/grpc-proto/README.md delete mode 100644 seed/csharp-sdk/grpc-proto/proto/google/api/annotations.proto delete mode 100644 seed/csharp-sdk/grpc-proto/proto/google/api/http.proto delete mode 100644 seed/csharp-sdk/grpc-proto/proto/user/v1/user.proto delete mode 100644 seed/csharp-sdk/grpc-proto/reference.md delete mode 100644 seed/csharp-sdk/grpc-proto/snippet-templates.json delete mode 100644 seed/csharp-sdk/grpc-proto/snippet.json delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/RawClientTests.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/EnumSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HeaderValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Headers.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/IRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/GrpcRequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiException.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawGrpcClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.Custom.props delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Types/CreateResponse.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Types/Metadata.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Types/MetadataValue.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Types/UserModel.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/Requests/CreateRequest.cs delete mode 100644 seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/UserserviceClient.cs delete mode 100644 seed/csharp-sdk/grpc/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/grpc/.gitignore delete mode 100644 seed/csharp-sdk/grpc/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/grpc/.mock/definition/user.yml delete mode 100644 seed/csharp-sdk/grpc/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/grpc/.mock/generators.yml delete mode 100644 seed/csharp-sdk/grpc/README.md delete mode 100644 seed/csharp-sdk/grpc/reference.md delete mode 100644 seed/csharp-sdk/grpc/snippet-templates.json delete mode 100644 seed/csharp-sdk/grpc/snippet.json delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/Core/RawClientTests.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/SeedApi.Test.csproj delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/CreateUserTest.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/GetUserTest.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Constants.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Extensions.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/HeaderValue.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Headers.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiApiException.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiException.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/Public/Version.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/SeedApi.csproj delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/SeedApiClient.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Requests/CreateUserRequest.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Requests/GetUserRequest.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Types/CreateUserResponse.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Types/Metadata.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Types/MetadataValue.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/Types/User.cs delete mode 100644 seed/csharp-sdk/grpc/src/SeedApi/User/UserClient.cs create mode 100644 seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.sln create mode 100644 seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.sln create mode 100644 seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.sln create mode 100644 seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.sln create mode 100644 seed/csharp-sdk/license/custom-license/src/SeedLicense.sln create mode 100644 seed/csharp-sdk/license/mit-license/src/SeedLicense.sln create mode 100644 seed/csharp-sdk/literal/src/SeedLiteral.sln create mode 100644 seed/csharp-sdk/mixed-case/src/SeedMixedCase.sln create mode 100644 seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.sln create mode 100644 seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.sln create mode 100644 seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln delete mode 100644 seed/csharp-sdk/multi-url-environment/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/multi-url-environment/.gitignore delete mode 100644 seed/csharp-sdk/multi-url-environment/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/multi-url-environment/.mock/definition/ec2.yml delete mode 100644 seed/csharp-sdk/multi-url-environment/.mock/definition/s3.yml delete mode 100644 seed/csharp-sdk/multi-url-environment/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/multi-url-environment/.mock/generators.yml create mode 100644 seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.sln delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Utils/JsonDiffChecker.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BaseWireTest.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BootInstanceTest.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/GetPresignedUrlTest.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/ClientOptions.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/Constants.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RequestOptions.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentApiException.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentEnvironment.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentException.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Ec2Client.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Requests/BootInstanceRequest.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/Requests/GetPresignedUrlRequest.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/S3Client.cs delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj delete mode 100644 seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironmentClient.cs create mode 100644 seed/csharp-sdk/no-environment/src/SeedNoEnvironment.sln create mode 100644 seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln create mode 100644 seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln create mode 100644 seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln create mode 100644 seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.sln create mode 100644 seed/csharp-sdk/object/src/SeedObject.sln create mode 100644 seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.sln delete mode 100644 seed/csharp-sdk/optional/.github/workflows/ci.yml delete mode 100644 seed/csharp-sdk/optional/.gitignore delete mode 100644 seed/csharp-sdk/optional/.mock/definition/api.yml delete mode 100644 seed/csharp-sdk/optional/.mock/definition/optional.yml delete mode 100644 seed/csharp-sdk/optional/.mock/fern.config.json delete mode 100644 seed/csharp-sdk/optional/.mock/generators.yml create mode 100644 seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.sln delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/TestClient.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Utils/JsonDiffChecker.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/BaseWireTest.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/SendOptionalBodyTest.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/CollectionItemSerializer.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Constants.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/DateTimeSerializer.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/HttpMethodExtensions.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/JsonConfiguration.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/OneOfSerializer.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/ClientOptions.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/RequestOptions.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsApiException.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsException.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/RawClient.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/StringEnumSerializer.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/Optional/OptionalClient.cs delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj delete mode 100644 seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImportsClient.cs create mode 100644 seed/csharp-sdk/package-yml/src/SeedPackageYml.sln create mode 100644 seed/csharp-sdk/pagination/src/SeedPagination.sln create mode 100644 seed/csharp-sdk/path-parameters/src/SeedPathParameters.sln create mode 100644 seed/csharp-sdk/plain-text/src/SeedPlainText.sln create mode 100644 seed/csharp-sdk/query-parameters/src/SeedQueryParameters.sln create mode 100644 seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.sln create mode 100644 seed/csharp-sdk/response-property/src/SeedResponseProperty.sln create mode 100644 seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.sln create mode 100644 seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.sln create mode 100644 seed/csharp-sdk/simple-fhir/src/SeedApi.sln create mode 100644 seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln create mode 100644 seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln create mode 100644 seed/csharp-sdk/streaming-parameter/src/SeedStreaming.sln create mode 100644 seed/csharp-sdk/streaming/src/SeedStreaming.sln create mode 100644 seed/csharp-sdk/trace/src/SeedTrace.sln create mode 100644 seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln create mode 100644 seed/csharp-sdk/unions/src/SeedUnions.sln create mode 100644 seed/csharp-sdk/unknown/src/SeedUnknownAsAny.sln create mode 100644 seed/csharp-sdk/validation/src/SeedValidation.sln create mode 100644 seed/csharp-sdk/variables/src/SeedVariables.sln create mode 100644 seed/csharp-sdk/version-no-default/src/SeedVersion.sln create mode 100644 seed/csharp-sdk/version/src/SeedVersion.sln create mode 100644 seed/csharp-sdk/websocket/src/SeedWebsocket.sln diff --git a/fern/pages/changelogs/csharp-sdk/2024-11-25.mdx b/fern/pages/changelogs/csharp-sdk/2024-11-25.mdx new file mode 100644 index 00000000000..99b44eafa61 --- /dev/null +++ b/fern/pages/changelogs/csharp-sdk/2024-11-25.mdx @@ -0,0 +1,11 @@ +## 1.9.11 +**`(feat):`** Add two dependencies who previously were transitive dependencies to ensure the generated SDKs use the patched versions without vulnerabilities. +- `System.Net.Http` >= `4.3.4` +- `System.Text.RegularExpressions` >= `4.3.1` +Update other dependencies to the latest version: +- `Portable.System.DateTimeOnly` = `8.0.2` (on net462 & netstandard2.0) +- `PolySharp` = `1.15.0` +- `OneOf` = `3.0.271` +- `OneOf.Extended` = `3.0.271` + + diff --git a/generators/csharp/codegen/src/asIs/test/EnumSerializerTests.Template.cs b/generators/csharp/codegen/src/asIs/test/EnumSerializerTests.Template.cs index ba021f2c82b..4d7f05154ea 100644 --- a/generators/csharp/codegen/src/asIs/test/EnumSerializerTests.Template.cs +++ b/generators/csharp/codegen/src/asIs/test/EnumSerializerTests.Template.cs @@ -38,7 +38,7 @@ public void ShouldSerializeKnownEnumValue2() { var json = JsonSerializer.SerializeToElement(new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/generators/csharp/codegen/src/asIs/test/StringEnumSerializerTests.Template.cs b/generators/csharp/codegen/src/asIs/test/StringEnumSerializerTests.Template.cs index fea7b3113f7..8ea286a1150 100644 --- a/generators/csharp/codegen/src/asIs/test/StringEnumSerializerTests.Template.cs +++ b/generators/csharp/codegen/src/asIs/test/StringEnumSerializerTests.Template.cs @@ -53,7 +53,7 @@ public void ShouldSerializeKnownEnumValue2() { var json = JsonSerializer.SerializeToElement(new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2)); @@ -64,7 +64,7 @@ public void ShouldSerializeUnknownEnum() { var json = JsonSerializer.SerializeToElement(new DummyObject { EnumProperty = UnknownEnumValue }, JsonOptions); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(UnknownEnumValue)); diff --git a/generators/csharp/codegen/src/asIs/test/Template.Test.csproj b/generators/csharp/codegen/src/asIs/test/Template.Test.csproj index 2b8f4d5d0a9..79750a6a8de 100644 --- a/generators/csharp/codegen/src/asIs/test/Template.Test.csproj +++ b/generators/csharp/codegen/src/asIs/test/Template.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/generators/csharp/codegen/src/project/CsharpProject.ts b/generators/csharp/codegen/src/project/CsharpProject.ts index eec77719c8e..ffbad660489 100644 --- a/generators/csharp/codegen/src/project/CsharpProject.ts +++ b/generators/csharp/codegen/src/project/CsharpProject.ts @@ -504,23 +504,8 @@ class CsProj { ${projectGroup.join("\n")} - - true - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + @@ -544,9 +529,17 @@ ${this.getAdditionalItemGroups().join(`\n${FOUR_SPACES}`)} private getDependencies(): string[] { const result: string[] = []; - result.push(''); - result.push(''); + result.push(''); + result.push( + `${FOUR_SPACES}runtime; build; native; contentfiles; analyzers; buildtransitive` + ); + result.push(`${FOUR_SPACES}all`); + result.push(""); + result.push(''); + result.push(''); result.push(''); + result.push(''); + result.push(''); for (const [name, version] of Object.entries(this.context.getExtraDependencies())) { result.push(``); } @@ -599,7 +592,6 @@ ${this.getAdditionalItemGroups().join(`\n${FOUR_SPACES}`)} `${FOUR_SPACES}${FOUR_SPACES}net462;net8.0;net7.0;net6.0;netstandard2.0` ); result.push(`${FOUR_SPACES}${FOUR_SPACES}enable`); - result.push(`${FOUR_SPACES}${FOUR_SPACES}false`); result.push(`${FOUR_SPACES}${FOUR_SPACES}12`); result.push(`${FOUR_SPACES}${FOUR_SPACES}enable`); @@ -638,6 +630,7 @@ ${this.getAdditionalItemGroups().join(`\n${FOUR_SPACES}`)} if (this.githubUrl != null) { result.push(`${this.githubUrl}`); } + result.push("true"); return result; } diff --git a/generators/csharp/playground/.gitignore b/generators/csharp/playground/.gitignore deleted file mode 100644 index 1f3e5c288d5..00000000000 --- a/generators/csharp/playground/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# User specific -**/.idea/**/workspace.xml -**/.idea/**/tasks.xml -**/.idea/shelf/* -**/.idea/dictionaries -**/.idea/httpRequests/ - -# Sensitive or high-churn files -**/.idea/**/dataSources/ -**/.idea/**/dataSources.ids -**/.idea/**/dataSources.xml -**/.idea/**/dataSources.local.xml -**/.idea/**/sqlDataSources.xml -**/.idea/**/dynamic.xml - -# Rider -# Rider auto-generates .iml files, and contentModel.xml -**/.idea/**/*.iml -**/.idea/**/contentModel.xml -**/.idea/**/modules.xml - -*.suo -*.user -.vs/ -[Bb]in/ -[Oo]bj/ -_UpgradeReport_Files/ -[Pp]ackages/ - -Thumbs.db -Desktop.ini -.DS_Store \ No newline at end of file diff --git a/generators/csharp/playground/Playground.Test/GlobalUsings.cs b/generators/csharp/playground/Playground.Test/GlobalUsings.cs deleted file mode 100644 index 8c927eb747a..00000000000 --- a/generators/csharp/playground/Playground.Test/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using Xunit; \ No newline at end of file diff --git a/generators/csharp/playground/Playground.Test/Playground.Test.csproj b/generators/csharp/playground/Playground.Test/Playground.Test.csproj deleted file mode 100644 index 22b0134dbdf..00000000000 --- a/generators/csharp/playground/Playground.Test/Playground.Test.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - diff --git a/generators/csharp/playground/Playground.Test/UnitTest1.cs b/generators/csharp/playground/Playground.Test/UnitTest1.cs deleted file mode 100644 index 30cdcf19479..00000000000 --- a/generators/csharp/playground/Playground.Test/UnitTest1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Playground.Test; - -public class UnitTest1 -{ - [Fact] - public void Test1() - { - - } -} \ No newline at end of file diff --git a/generators/csharp/playground/Playground/Playground.csproj b/generators/csharp/playground/Playground/Playground.csproj deleted file mode 100644 index 2150e3797ba..00000000000 --- a/generators/csharp/playground/Playground/Playground.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net8.0 - enable - enable - - - diff --git a/generators/csharp/playground/Playground/Program.cs b/generators/csharp/playground/Playground/Program.cs deleted file mode 100644 index 3751555cbd3..00000000000 --- a/generators/csharp/playground/Playground/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); diff --git a/generators/csharp/sdk/src/test-generation/mock-server/BaseMockServerTestGenerator.ts b/generators/csharp/sdk/src/test-generation/mock-server/BaseMockServerTestGenerator.ts index 7d25429181b..3a97c742112 100644 --- a/generators/csharp/sdk/src/test-generation/mock-server/BaseMockServerTestGenerator.ts +++ b/generators/csharp/sdk/src/test-generation/mock-server/BaseMockServerTestGenerator.ts @@ -149,6 +149,7 @@ export class BaseMockServerTestGenerator extends FileGenerator { writer.writeLine("Server.Stop();"); + writer.writeLine("Server.Dispose();"); }), isAsync: false, parameters: [], diff --git a/generators/csharp/sdk/versions.yml b/generators/csharp/sdk/versions.yml index b3185103fb2..35940573cb5 100644 --- a/generators/csharp/sdk/versions.yml +++ b/generators/csharp/sdk/versions.yml @@ -6,6 +6,20 @@ # The C# SDK now uses forward-compatible enums which are not compatible with the previously generated enums. # Set `enable-forward-compatible-enums` to `false` in the configuration to generate the old enums. # irVersion: 53 +- version: 1.9.11 + createdAt: "2024-11-25" + changelogEntry: + - type: feat + summary: | + Add two dependencies who previously were transitive dependencies to ensure the generated SDKs use the patched versions without vulnerabilities. + - `System.Net.Http` >= `4.3.4` + - `System.Text.RegularExpressions` >= `4.3.1` + Update other dependencies to the latest version: + - `Portable.System.DateTimeOnly` = `8.0.2` (on net462 & netstandard2.0) + - `PolySharp` = `1.15.0` + - `OneOf` = `3.0.271` + - `OneOf.Extended` = `3.0.271` + irVersion: 53 - version: 1.9.10 createdAt: "2024-11-20" changelogEntry: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80db05fcd71..c249dc0e142 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4047,6 +4047,8 @@ importers: specifier: ^2.0.5 version: 2.0.5(@types/node@18.7.18)(jsdom@20.0.3)(sass@1.72.0)(terser@5.31.5) + packages/cli/cli/dist/local: {} + packages/cli/configuration: dependencies: '@fern-api/core-utils': diff --git a/seed/csharp-model/.gitignore b/seed/csharp-model/.gitignore deleted file mode 100644 index ad136bcef66..00000000000 --- a/seed/csharp-model/.gitignore +++ /dev/null @@ -1 +0,0 @@ -**/**.sln \ No newline at end of file diff --git a/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs index e9f45b46a00..afe99daa324 100644 --- a/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj b/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj index 84a91a23f46..a096140ec2c 100644 --- a/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj +++ b/seed/csharp-model/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/alias-extends/src/SeedAliasExtends.sln b/seed/csharp-model/alias-extends/src/SeedAliasExtends.sln new file mode 100644 index 00000000000..9d4a0d7ce26 --- /dev/null +++ b/seed/csharp-model/alias-extends/src/SeedAliasExtends.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAliasExtends", "SeedAliasExtends\SeedAliasExtends.csproj", "{111D0935-08E8-4171-85B1-1C5EBFC9B523}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAliasExtends.Test", "SeedAliasExtends.Test\SeedAliasExtends.Test.csproj", "{88526FC1-4A42-42B2-AFF8-DF67B9B699CB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {111D0935-08E8-4171-85B1-1C5EBFC9B523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {111D0935-08E8-4171-85B1-1C5EBFC9B523}.Debug|Any CPU.Build.0 = Debug|Any CPU + {111D0935-08E8-4171-85B1-1C5EBFC9B523}.Release|Any CPU.ActiveCfg = Release|Any CPU + {111D0935-08E8-4171-85B1-1C5EBFC9B523}.Release|Any CPU.Build.0 = Release|Any CPU + {88526FC1-4A42-42B2-AFF8-DF67B9B699CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88526FC1-4A42-42B2-AFF8-DF67B9B699CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88526FC1-4A42-42B2-AFF8-DF67B9B699CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88526FC1-4A42-42B2-AFF8-DF67B9B699CB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj b/seed/csharp-model/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj index e2ac4b36b8a..7a4688de872 100644 --- a/seed/csharp-model/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj +++ b/seed/csharp-model/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/alias-extends/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs index 357a10f90ba..b48c2e6729a 100644 --- a/seed/csharp-model/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/alias/src/SeedAlias.Test/SeedAlias.Test.csproj b/seed/csharp-model/alias/src/SeedAlias.Test/SeedAlias.Test.csproj index 6377029a16d..4c80df47000 100644 --- a/seed/csharp-model/alias/src/SeedAlias.Test/SeedAlias.Test.csproj +++ b/seed/csharp-model/alias/src/SeedAlias.Test/SeedAlias.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/alias/src/SeedAlias.sln b/seed/csharp-model/alias/src/SeedAlias.sln new file mode 100644 index 00000000000..b713e62b29d --- /dev/null +++ b/seed/csharp-model/alias/src/SeedAlias.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAlias", "SeedAlias\SeedAlias.csproj", "{716C6252-042A-495A-A46C-3F1AD6CB49E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAlias.Test", "SeedAlias.Test\SeedAlias.Test.csproj", "{8AE7A86B-62A7-4953-B440-92444E3F73CE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {716C6252-042A-495A-A46C-3F1AD6CB49E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {716C6252-042A-495A-A46C-3F1AD6CB49E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {716C6252-042A-495A-A46C-3F1AD6CB49E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {716C6252-042A-495A-A46C-3F1AD6CB49E0}.Release|Any CPU.Build.0 = Release|Any CPU + {8AE7A86B-62A7-4953-B440-92444E3F73CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AE7A86B-62A7-4953-B440-92444E3F73CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AE7A86B-62A7-4953-B440-92444E3F73CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AE7A86B-62A7-4953-B440-92444E3F73CE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/alias/src/SeedAlias/SeedAlias.csproj b/seed/csharp-model/alias/src/SeedAlias/SeedAlias.csproj index f6d9b711c37..d4455f0f175 100644 --- a/seed/csharp-model/alias/src/SeedAlias/SeedAlias.csproj +++ b/seed/csharp-model/alias/src/SeedAlias/SeedAlias.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/alias/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs index 66af8be386b..ebde0c81c13 100644 --- a/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj b/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj index f68ccf13cf4..cb2298c52d3 100644 --- a/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj +++ b/seed/csharp-model/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/any-auth/src/SeedAnyAuth.sln b/seed/csharp-model/any-auth/src/SeedAnyAuth.sln new file mode 100644 index 00000000000..0568e63113f --- /dev/null +++ b/seed/csharp-model/any-auth/src/SeedAnyAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAnyAuth", "SeedAnyAuth\SeedAnyAuth.csproj", "{A3ACFF2B-E6C2-4F97-9E71-EC050BD15234}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAnyAuth.Test", "SeedAnyAuth.Test\SeedAnyAuth.Test.csproj", "{EC2BBDCD-9269-4733-8DF0-532666900CD4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A3ACFF2B-E6C2-4F97-9E71-EC050BD15234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3ACFF2B-E6C2-4F97-9E71-EC050BD15234}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3ACFF2B-E6C2-4F97-9E71-EC050BD15234}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3ACFF2B-E6C2-4F97-9E71-EC050BD15234}.Release|Any CPU.Build.0 = Release|Any CPU + {EC2BBDCD-9269-4733-8DF0-532666900CD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC2BBDCD-9269-4733-8DF0-532666900CD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC2BBDCD-9269-4733-8DF0-532666900CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC2BBDCD-9269-4733-8DF0-532666900CD4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj b/seed/csharp-model/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj index 17833e03e63..39464d7ee08 100644 --- a/seed/csharp-model/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj +++ b/seed/csharp-model/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/any-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs index c7dd5409d21..5f7e85954a6 100644 --- a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj index 31487789fa2..330a9298b0a 100644 --- a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj +++ b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.sln b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.sln new file mode 100644 index 00000000000..5704df97e39 --- /dev/null +++ b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApiWideBasePath", "SeedApiWideBasePath\SeedApiWideBasePath.csproj", "{767E9776-9CE5-42C8-9267-D367E9F3E7E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApiWideBasePath.Test", "SeedApiWideBasePath.Test\SeedApiWideBasePath.Test.csproj", "{E61478F8-5229-479A-9F51-6D50151F6D5E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {767E9776-9CE5-42C8-9267-D367E9F3E7E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {767E9776-9CE5-42C8-9267-D367E9F3E7E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {767E9776-9CE5-42C8-9267-D367E9F3E7E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {767E9776-9CE5-42C8-9267-D367E9F3E7E4}.Release|Any CPU.Build.0 = Release|Any CPU + {E61478F8-5229-479A-9F51-6D50151F6D5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E61478F8-5229-479A-9F51-6D50151F6D5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E61478F8-5229-479A-9F51-6D50151F6D5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E61478F8-5229-479A-9F51-6D50151F6D5E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj index 1808b454685..1aaaab00485 100644 --- a/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj +++ b/seed/csharp-model/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/api-wide-base-path/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs index 5ccfdceadda..41441c252b5 100644 --- a/seed/csharp-model/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj b/seed/csharp-model/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj index db284d1749e..efb76afe36f 100644 --- a/seed/csharp-model/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj +++ b/seed/csharp-model/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/audiences/src/SeedAudiences.sln b/seed/csharp-model/audiences/src/SeedAudiences.sln new file mode 100644 index 00000000000..3987e5ad70c --- /dev/null +++ b/seed/csharp-model/audiences/src/SeedAudiences.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAudiences", "SeedAudiences\SeedAudiences.csproj", "{C040DBFD-052A-4932-BF27-F6A718E2933F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAudiences.Test", "SeedAudiences.Test\SeedAudiences.Test.csproj", "{9175BF7E-5F09-4DE2-876B-29E47F07FA33}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C040DBFD-052A-4932-BF27-F6A718E2933F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C040DBFD-052A-4932-BF27-F6A718E2933F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C040DBFD-052A-4932-BF27-F6A718E2933F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C040DBFD-052A-4932-BF27-F6A718E2933F}.Release|Any CPU.Build.0 = Release|Any CPU + {9175BF7E-5F09-4DE2-876B-29E47F07FA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9175BF7E-5F09-4DE2-876B-29E47F07FA33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9175BF7E-5F09-4DE2-876B-29E47F07FA33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9175BF7E-5F09-4DE2-876B-29E47F07FA33}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/audiences/src/SeedAudiences/SeedAudiences.csproj b/seed/csharp-model/audiences/src/SeedAudiences/SeedAudiences.csproj index fff370d06b0..d9dc702d8fa 100644 --- a/seed/csharp-model/audiences/src/SeedAudiences/SeedAudiences.csproj +++ b/seed/csharp-model/audiences/src/SeedAudiences/SeedAudiences.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/audiences/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 2e50e637c13..d4b033842fa 100644 --- a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj index 3107b4a3359..20f810ff4fd 100644 --- a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj +++ b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln new file mode 100644 index 00000000000..400f5feb210 --- /dev/null +++ b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAuthEnvironmentVariables", "SeedAuthEnvironmentVariables\SeedAuthEnvironmentVariables.csproj", "{ADEEEAA5-31E9-4C2E-86F6-3A62692A6F83}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAuthEnvironmentVariables.Test", "SeedAuthEnvironmentVariables.Test\SeedAuthEnvironmentVariables.Test.csproj", "{8BAA0A3F-990A-4CB4-A41B-17F2974B04D9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADEEEAA5-31E9-4C2E-86F6-3A62692A6F83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADEEEAA5-31E9-4C2E-86F6-3A62692A6F83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADEEEAA5-31E9-4C2E-86F6-3A62692A6F83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADEEEAA5-31E9-4C2E-86F6-3A62692A6F83}.Release|Any CPU.Build.0 = Release|Any CPU + {8BAA0A3F-990A-4CB4-A41B-17F2974B04D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BAA0A3F-990A-4CB4-A41B-17F2974B04D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BAA0A3F-990A-4CB4-A41B-17F2974B04D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BAA0A3F-990A-4CB4-A41B-17F2974B04D9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj index 4f710b64e39..04f9e5616be 100644 --- a/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj +++ b/seed/csharp-model/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/auth-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 0ae1158e4e8..80254d3b829 100644 --- a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj index fb0674da98d..1c5ab5dcbfd 100644 --- a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj +++ b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln new file mode 100644 index 00000000000..1b38773efd2 --- /dev/null +++ b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuthEnvironmentVariables", "SeedBasicAuthEnvironmentVariables\SeedBasicAuthEnvironmentVariables.csproj", "{B4A7D432-F3D2-427F-A5E7-76CE85C808AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuthEnvironmentVariables.Test", "SeedBasicAuthEnvironmentVariables.Test\SeedBasicAuthEnvironmentVariables.Test.csproj", "{3EAA8324-C9CA-41E8-959B-9C64B6BE58FC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B4A7D432-F3D2-427F-A5E7-76CE85C808AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4A7D432-F3D2-427F-A5E7-76CE85C808AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4A7D432-F3D2-427F-A5E7-76CE85C808AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4A7D432-F3D2-427F-A5E7-76CE85C808AB}.Release|Any CPU.Build.0 = Release|Any CPU + {3EAA8324-C9CA-41E8-959B-9C64B6BE58FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EAA8324-C9CA-41E8-959B-9C64B6BE58FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EAA8324-C9CA-41E8-959B-9C64B6BE58FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EAA8324-C9CA-41E8-959B-9C64B6BE58FC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj index dc46ec3579a..a3eac4561ae 100644 --- a/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj +++ b/seed/csharp-model/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/basic-auth-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs index 1fbb498ecf2..88b2cd4defa 100644 --- a/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj b/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj index 694b87130a8..33244ffe96a 100644 --- a/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj +++ b/seed/csharp-model/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/basic-auth/src/SeedBasicAuth.sln b/seed/csharp-model/basic-auth/src/SeedBasicAuth.sln new file mode 100644 index 00000000000..4d4f12b0f02 --- /dev/null +++ b/seed/csharp-model/basic-auth/src/SeedBasicAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuth", "SeedBasicAuth\SeedBasicAuth.csproj", "{CE0F99C4-FBF1-479A-A23D-71E55AF4658B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuth.Test", "SeedBasicAuth.Test\SeedBasicAuth.Test.csproj", "{2292CEDA-51B0-4627-B9C5-A2BCF3563A35}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CE0F99C4-FBF1-479A-A23D-71E55AF4658B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE0F99C4-FBF1-479A-A23D-71E55AF4658B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE0F99C4-FBF1-479A-A23D-71E55AF4658B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE0F99C4-FBF1-479A-A23D-71E55AF4658B}.Release|Any CPU.Build.0 = Release|Any CPU + {2292CEDA-51B0-4627-B9C5-A2BCF3563A35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2292CEDA-51B0-4627-B9C5-A2BCF3563A35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2292CEDA-51B0-4627-B9C5-A2BCF3563A35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2292CEDA-51B0-4627-B9C5-A2BCF3563A35}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj b/seed/csharp-model/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj index 7706432bced..1f7fc53ae3c 100644 --- a/seed/csharp-model/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj +++ b/seed/csharp-model/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/basic-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs index 80ac0381b5f..3494293860b 100644 --- a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj index b9dc79be93f..c66ac7c4081 100644 --- a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj +++ b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln new file mode 100644 index 00000000000..e4d3f820e08 --- /dev/null +++ b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBearerTokenEnvironmentVariable", "SeedBearerTokenEnvironmentVariable\SeedBearerTokenEnvironmentVariable.csproj", "{8147352A-413A-48FC-BFB6-3816E9B914B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBearerTokenEnvironmentVariable.Test", "SeedBearerTokenEnvironmentVariable.Test\SeedBearerTokenEnvironmentVariable.Test.csproj", "{E4D7D9A5-F11D-409C-A1E9-96137DD35068}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8147352A-413A-48FC-BFB6-3816E9B914B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8147352A-413A-48FC-BFB6-3816E9B914B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8147352A-413A-48FC-BFB6-3816E9B914B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8147352A-413A-48FC-BFB6-3816E9B914B7}.Release|Any CPU.Build.0 = Release|Any CPU + {E4D7D9A5-F11D-409C-A1E9-96137DD35068}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4D7D9A5-F11D-409C-A1E9-96137DD35068}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4D7D9A5-F11D-409C-A1E9-96137DD35068}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4D7D9A5-F11D-409C-A1E9-96137DD35068}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj index 4cb2a1bfe5b..865a9d18f8c 100644 --- a/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj +++ b/seed/csharp-model/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/bearer-token-environment-variable/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs index 3365839e1f5..d208b0ed2a9 100644 --- a/seed/csharp-model/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj b/seed/csharp-model/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj index 731659024cf..40490560dbd 100644 --- a/seed/csharp-model/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj +++ b/seed/csharp-model/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/bytes/src/SeedBytes.sln b/seed/csharp-model/bytes/src/SeedBytes.sln new file mode 100644 index 00000000000..d00e908b308 --- /dev/null +++ b/seed/csharp-model/bytes/src/SeedBytes.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBytes", "SeedBytes\SeedBytes.csproj", "{C5109E3E-7062-4D68-8045-8D8365CB3667}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBytes.Test", "SeedBytes.Test\SeedBytes.Test.csproj", "{766017B7-A7CF-4B18-93B0-E8E580541042}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C5109E3E-7062-4D68-8045-8D8365CB3667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5109E3E-7062-4D68-8045-8D8365CB3667}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5109E3E-7062-4D68-8045-8D8365CB3667}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5109E3E-7062-4D68-8045-8D8365CB3667}.Release|Any CPU.Build.0 = Release|Any CPU + {766017B7-A7CF-4B18-93B0-E8E580541042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {766017B7-A7CF-4B18-93B0-E8E580541042}.Debug|Any CPU.Build.0 = Debug|Any CPU + {766017B7-A7CF-4B18-93B0-E8E580541042}.Release|Any CPU.ActiveCfg = Release|Any CPU + {766017B7-A7CF-4B18-93B0-E8E580541042}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/bytes/src/SeedBytes/SeedBytes.csproj b/seed/csharp-model/bytes/src/SeedBytes/SeedBytes.csproj index f0db1a65283..43238bb18b5 100644 --- a/seed/csharp-model/bytes/src/SeedBytes/SeedBytes.csproj +++ b/seed/csharp-model/bytes/src/SeedBytes/SeedBytes.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/bytes/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/circular-references-advanced/src/SeedApi.sln b/seed/csharp-model/circular-references-advanced/src/SeedApi.sln new file mode 100644 index 00000000000..efb2c7401eb --- /dev/null +++ b/seed/csharp-model/circular-references-advanced/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{C4D179F1-7877-4959-9203-7EA2062A983F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{FF9A4C5D-AD67-48C5-ABAA-C21AE3A76F4B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4D179F1-7877-4959-9203-7EA2062A983F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4D179F1-7877-4959-9203-7EA2062A983F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4D179F1-7877-4959-9203-7EA2062A983F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4D179F1-7877-4959-9203-7EA2062A983F}.Release|Any CPU.Build.0 = Release|Any CPU + {FF9A4C5D-AD67-48C5-ABAA-C21AE3A76F4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF9A4C5D-AD67-48C5-ABAA-C21AE3A76F4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF9A4C5D-AD67-48C5-ABAA-C21AE3A76F4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF9A4C5D-AD67-48C5-ABAA-C21AE3A76F4B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/circular-references-advanced/src/SeedApi/SeedApi.csproj b/seed/csharp-model/circular-references-advanced/src/SeedApi/SeedApi.csproj index e915f7a437d..0d98501b842 100644 --- a/seed/csharp-model/circular-references-advanced/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/circular-references-advanced/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/circular-references-advanced/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/circular-references/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/circular-references/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/circular-references/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/circular-references/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/circular-references/src/SeedApi.sln b/seed/csharp-model/circular-references/src/SeedApi.sln new file mode 100644 index 00000000000..70e4f48591f --- /dev/null +++ b/seed/csharp-model/circular-references/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{A28FD6FB-2FB9-402C-9A2E-C8ADD0D90AB2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{B8DF6682-50F8-438E-A03F-E7B0C841A873}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A28FD6FB-2FB9-402C-9A2E-C8ADD0D90AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A28FD6FB-2FB9-402C-9A2E-C8ADD0D90AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A28FD6FB-2FB9-402C-9A2E-C8ADD0D90AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A28FD6FB-2FB9-402C-9A2E-C8ADD0D90AB2}.Release|Any CPU.Build.0 = Release|Any CPU + {B8DF6682-50F8-438E-A03F-E7B0C841A873}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8DF6682-50F8-438E-A03F-E7B0C841A873}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8DF6682-50F8-438E-A03F-E7B0C841A873}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8DF6682-50F8-438E-A03F-E7B0C841A873}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/circular-references/src/SeedApi/SeedApi.csproj b/seed/csharp-model/circular-references/src/SeedApi/SeedApi.csproj index a56f586f3c7..1f0abd20675 100644 --- a/seed/csharp-model/circular-references/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/circular-references/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/circular-references/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/code-samples/.github/workflows/ci.yml b/seed/csharp-model/code-samples/.github/workflows/ci.yml deleted file mode 100644 index 0ce8a0ff0f9..00000000000 --- a/seed/csharp-model/code-samples/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedCodeSamples/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/code-samples/.gitignore b/seed/csharp-model/code-samples/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-model/code-samples/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/code-samples/.mock/definition/api.yml b/seed/csharp-model/code-samples/.mock/definition/api.yml deleted file mode 100644 index be7bbb0492a..00000000000 --- a/seed/csharp-model/code-samples/.mock/definition/api.yml +++ /dev/null @@ -1,3 +0,0 @@ -name: code-samples -error-discrimination: - strategy: status-code diff --git a/seed/csharp-model/code-samples/.mock/definition/service.yml b/seed/csharp-model/code-samples/.mock/definition/service.yml deleted file mode 100644 index a411feebe13..00000000000 --- a/seed/csharp-model/code-samples/.mock/definition/service.yml +++ /dev/null @@ -1,43 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -types: - MyResponse: - properties: - id: string - name: optional - -service: - auth: false - base-path: "" - endpoints: - hello: - path: /hello - method: POST - request: - name: MyRequest - body: - properties: - num_events: integer - response: - type: MyResponse - examples: - - request: - num_events: 5 - response: - body: - id: "123" - name: "hello" - code-samples: - - name: curl - sdk: curl - code: | - curl -X POST "http://localhost:8080/hello" - -H "Content-Type: application/json" - -d '{"num_events": 5}' - - name: python - sdk: python - code: | - import requests - response = requests.post("http://localhost:8080/hello", json={"num_events": 5}) - print(response.json()) - diff --git a/seed/csharp-model/code-samples/.mock/fern.config.json b/seed/csharp-model/code-samples/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/code-samples/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/code-samples/.mock/generators.yml b/seed/csharp-model/code-samples/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-model/code-samples/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-model/code-samples/snippet-templates.json b/seed/csharp-model/code-samples/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/code-samples/snippet.json b/seed/csharp-model/code-samples/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj b/seed/csharp-model/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj deleted file mode 100644 index f179bee1fb5..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs b/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs deleted file mode 100644 index a77d719d4b4..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs b/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs deleted file mode 100644 index a0630c35dff..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedCodeSamples.Core; - -internal class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs b/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs deleted file mode 100644 index 009bead6998..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj b/seed/csharp-model/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj deleted file mode 100644 index 84e1ad38e07..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/code-samples/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - <_Parameter1>SeedCodeSamples.Test - - - - diff --git a/seed/csharp-model/code-samples/src/SeedCodeSamples/Service/MyResponse.cs b/seed/csharp-model/code-samples/src/SeedCodeSamples/Service/MyResponse.cs deleted file mode 100644 index 17459c4b45a..00000000000 --- a/seed/csharp-model/code-samples/src/SeedCodeSamples/Service/MyResponse.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedCodeSamples; - -public record MyResponse -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("name")] - public string? Name { get; set; } -} diff --git a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs index eaadc6b488c..28e1c388aef 100644 --- a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj index 137c57edfd9..7b7fe7b3690 100644 --- a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj +++ b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.sln b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.sln new file mode 100644 index 00000000000..9c1866e89be --- /dev/null +++ b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCrossPackageTypeNames", "SeedCrossPackageTypeNames\SeedCrossPackageTypeNames.csproj", "{56426A53-89B0-4ECD-A002-98B6A52159C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCrossPackageTypeNames.Test", "SeedCrossPackageTypeNames.Test\SeedCrossPackageTypeNames.Test.csproj", "{A88D2EEE-3D08-446B-8CF0-0AD5DC642F3E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56426A53-89B0-4ECD-A002-98B6A52159C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56426A53-89B0-4ECD-A002-98B6A52159C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56426A53-89B0-4ECD-A002-98B6A52159C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56426A53-89B0-4ECD-A002-98B6A52159C4}.Release|Any CPU.Build.0 = Release|Any CPU + {A88D2EEE-3D08-446B-8CF0-0AD5DC642F3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A88D2EEE-3D08-446B-8CF0-0AD5DC642F3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A88D2EEE-3D08-446B-8CF0-0AD5DC642F3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A88D2EEE-3D08-446B-8CF0-0AD5DC642F3E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj index 8f2ef56e991..05c930a2105 100644 --- a/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj +++ b/seed/csharp-model/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/cross-package-type-names/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.sln b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.sln new file mode 100644 index 00000000000..165b1d00c35 --- /dev/null +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{DB10066E-891B-41AA-BA78-666C1409F9FA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{A6AA020C-500E-45B5-9825-B418AD88EF91}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB10066E-891B-41AA-BA78-666C1409F9FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB10066E-891B-41AA-BA78-666C1409F9FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB10066E-891B-41AA-BA78-666C1409F9FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB10066E-891B-41AA-BA78-666C1409F9FA}.Release|Any CPU.Build.0 = Release|Any CPU + {A6AA020C-500E-45B5-9825-B418AD88EF91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6AA020C-500E-45B5-9825-B418AD88EF91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6AA020C-500E-45B5-9825-B418AD88EF91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6AA020C-500E-45B5-9825-B418AD88EF91}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj index d1e83db655b..27e8ffa242d 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-grpc-proto-exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/csharp-grpc-proto/src/SeedApi.sln b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.sln new file mode 100644 index 00000000000..3e683b26c5a --- /dev/null +++ b/seed/csharp-model/csharp-grpc-proto/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{F1FAE48E-4136-4E77-A90F-94911794009E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{0439F39A-FE7B-4B83-AC1F-458CFDF523EB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F1FAE48E-4136-4E77-A90F-94911794009E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1FAE48E-4136-4E77-A90F-94911794009E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1FAE48E-4136-4E77-A90F-94911794009E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1FAE48E-4136-4E77-A90F-94911794009E}.Release|Any CPU.Build.0 = Release|Any CPU + {0439F39A-FE7B-4B83-AC1F-458CFDF523EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0439F39A-FE7B-4B83-AC1F-458CFDF523EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0439F39A-FE7B-4B83-AC1F-458CFDF523EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0439F39A-FE7B-4B83-AC1F-458CFDF523EB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/csharp-grpc-proto/src/SeedApi/SeedApi.csproj b/seed/csharp-model/csharp-grpc-proto/src/SeedApi/SeedApi.csproj index 8fc89259558..9ee3df12ef3 100644 --- a/seed/csharp-model/csharp-grpc-proto/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/csharp-grpc-proto/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-grpc-proto/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs index 4cff59e7004..dfbfba5f6c5 100644 --- a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj index 1b69fae24ba..653ea9acc8e 100644 --- a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj +++ b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln new file mode 100644 index 00000000000..35425aaa102 --- /dev/null +++ b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCsharpNamespaceConflict", "SeedCsharpNamespaceConflict\SeedCsharpNamespaceConflict.csproj", "{7F730939-7691-4FAB-82DC-77EE0149583A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCsharpNamespaceConflict.Test", "SeedCsharpNamespaceConflict.Test\SeedCsharpNamespaceConflict.Test.csproj", "{73E805EA-C549-4FFC-9E7F-E24FCD804F2B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F730939-7691-4FAB-82DC-77EE0149583A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F730939-7691-4FAB-82DC-77EE0149583A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F730939-7691-4FAB-82DC-77EE0149583A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F730939-7691-4FAB-82DC-77EE0149583A}.Release|Any CPU.Build.0 = Release|Any CPU + {73E805EA-C549-4FFC-9E7F-E24FCD804F2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73E805EA-C549-4FFC-9E7F-E24FCD804F2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73E805EA-C549-4FFC-9E7F-E24FCD804F2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73E805EA-C549-4FFC-9E7F-E24FCD804F2B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj index 501a86ce67e..3cbc7fffdb3 100644 --- a/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj +++ b/seed/csharp-model/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-namespace-conflict/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs index f33b6d6036b..4cc169e0b1e 100644 --- a/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj b/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj index 276ad5d69f6..1138d192410 100644 --- a/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj +++ b/seed/csharp-model/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/custom-auth/src/SeedCustomAuth.sln b/seed/csharp-model/custom-auth/src/SeedCustomAuth.sln new file mode 100644 index 00000000000..5b62037f62a --- /dev/null +++ b/seed/csharp-model/custom-auth/src/SeedCustomAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCustomAuth", "SeedCustomAuth\SeedCustomAuth.csproj", "{63EF239A-C65B-498E-B0A6-D5470527F772}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCustomAuth.Test", "SeedCustomAuth.Test\SeedCustomAuth.Test.csproj", "{87F8E6F2-7570-4B2C-B2C6-50AD539AD112}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63EF239A-C65B-498E-B0A6-D5470527F772}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63EF239A-C65B-498E-B0A6-D5470527F772}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63EF239A-C65B-498E-B0A6-D5470527F772}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63EF239A-C65B-498E-B0A6-D5470527F772}.Release|Any CPU.Build.0 = Release|Any CPU + {87F8E6F2-7570-4B2C-B2C6-50AD539AD112}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87F8E6F2-7570-4B2C-B2C6-50AD539AD112}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87F8E6F2-7570-4B2C-B2C6-50AD539AD112}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87F8E6F2-7570-4B2C-B2C6-50AD539AD112}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj b/seed/csharp-model/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj index 5ccc5ff3b27..73fe9306405 100644 --- a/seed/csharp-model/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj +++ b/seed/csharp-model/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/custom-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/enum/.github/workflows/ci.yml b/seed/csharp-model/enum/.github/workflows/ci.yml deleted file mode 100644 index 93b0b62c5cb..00000000000 --- a/seed/csharp-model/enum/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedEnum/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/enum/.gitignore b/seed/csharp-model/enum/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-model/enum/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/enum/.mock/definition/__package__.yml b/seed/csharp-model/enum/.mock/definition/__package__.yml deleted file mode 100644 index a72e076f94d..00000000000 --- a/seed/csharp-model/enum/.mock/definition/__package__.yml +++ /dev/null @@ -1,38 +0,0 @@ -types: - Operand: - docs: | - Tests enum name and value can be - different. - enum: - - value: ">" - name: GREATER_THAN - - value: "=" - name: EQUAL_TO - - value: "less_than" - docs: | - The name and value should be similar - are similar for less than. - examples: - - name: GreaterThan - value: ">" - - name: LessThan - value: "less_than" - - Color: - enum: - - value: "red" - name: RED - - value: "blue" - name: BLUE - examples: - - name: Red - value: "red" - - ColorOrOperand: - discriminated: false - union: - - Color - - Operand - examples: - - name: Red - value: "red" diff --git a/seed/csharp-model/enum/.mock/definition/api.yml b/seed/csharp-model/enum/.mock/definition/api.yml deleted file mode 100644 index 3e2ce7d17a8..00000000000 --- a/seed/csharp-model/enum/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: enum diff --git a/seed/csharp-model/enum/.mock/definition/inlined-request.yml b/seed/csharp-model/enum/.mock/definition/inlined-request.yml deleted file mode 100644 index f17deabdaaf..00000000000 --- a/seed/csharp-model/enum/.mock/definition/inlined-request.yml +++ /dev/null @@ -1,24 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /inlined - method: POST - request: - name: SendEnumInlinedRequest - body: - properties: - operand: - type: root.Operand - maybeOperand: optional - operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional - examples: - - request: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red - \ No newline at end of file diff --git a/seed/csharp-model/enum/.mock/definition/path-param.yml b/seed/csharp-model/enum/.mock/definition/path-param.yml deleted file mode 100644 index 5afc7329f1e..00000000000 --- a/seed/csharp-model/enum/.mock/definition/path-param.yml +++ /dev/null @@ -1,17 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /path/{operand}/{operandOrColor} - method: POST - path-parameters: - operand: root.Operand - operandOrColor: root.ColorOrOperand - examples: - - path-parameters: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red diff --git a/seed/csharp-model/enum/.mock/definition/query-param.yml b/seed/csharp-model/enum/.mock/definition/query-param.yml deleted file mode 100644 index 2b3724eba7e..00000000000 --- a/seed/csharp-model/enum/.mock/definition/query-param.yml +++ /dev/null @@ -1,40 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /query - method: POST - request: - name: SendEnumAsQueryParamRequest - query-parameters: - operand: root.Operand - maybeOperand: optional - operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional - examples: - - query-parameters: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red - - sendList: - path: /query-list - method: POST - request: - name: SendEnumListAsQueryParamRequest - query-parameters: - operand: - type: root.Operand - allow-multiple: true - maybeOperand: - type: optional - allow-multiple: true - operandOrColor: - type: root.ColorOrOperand - allow-multiple: true - maybeOperandOrColor: - type: optional - allow-multiple: true diff --git a/seed/csharp-model/enum/.mock/fern.config.json b/seed/csharp-model/enum/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/enum/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/enum/.mock/generators.yml b/seed/csharp-model/enum/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-model/enum/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs index e5fdf24fe97..7bfa7756e3e 100644 --- a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs +++ b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs @@ -49,7 +49,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2)); @@ -62,7 +62,7 @@ public void ShouldSerializeUnknownEnum() new DummyObject { EnumProperty = UnknownEnumValue }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(UnknownEnumValue)); diff --git a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj index 73fdda15ae5..d6faf892575 100644 --- a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj +++ b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.sln b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.sln new file mode 100644 index 00000000000..902e31f5326 --- /dev/null +++ b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum", "SeedEnum\SeedEnum.csproj", "{CD45017C-F142-4776-845A-3561A709FEF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum.Test", "SeedEnum.Test\SeedEnum.Test.csproj", "{B540CD58-DA63-4017-BBF4-C108EE1085E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD45017C-F142-4776-845A-3561A709FEF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD45017C-F142-4776-845A-3561A709FEF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD45017C-F142-4776-845A-3561A709FEF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD45017C-F142-4776-845A-3561A709FEF6}.Release|Any CPU.Build.0 = Release|Any CPU + {B540CD58-DA63-4017-BBF4-C108EE1085E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B540CD58-DA63-4017-BBF4-C108EE1085E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B540CD58-DA63-4017-BBF4-C108EE1085E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B540CD58-DA63-4017-BBF4-C108EE1085E1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj index 1ac5726bfa8..a29863a52f4 100644 --- a/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj +++ b/seed/csharp-model/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/enum/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs index 3128d125c3c..3df258e0757 100644 --- a/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj b/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj index 73fdda15ae5..d6faf892575 100644 --- a/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj +++ b/seed/csharp-model/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/enum/plain-enums/src/SeedEnum.sln b/seed/csharp-model/enum/plain-enums/src/SeedEnum.sln new file mode 100644 index 00000000000..50a6d6fd3ba --- /dev/null +++ b/seed/csharp-model/enum/plain-enums/src/SeedEnum.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum", "SeedEnum\SeedEnum.csproj", "{C46D2E55-A86E-487D-9786-61D4A59DBBCD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum.Test", "SeedEnum.Test\SeedEnum.Test.csproj", "{9B8B7AEE-C011-4468-B9D2-0351B933CFCF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C46D2E55-A86E-487D-9786-61D4A59DBBCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C46D2E55-A86E-487D-9786-61D4A59DBBCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C46D2E55-A86E-487D-9786-61D4A59DBBCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C46D2E55-A86E-487D-9786-61D4A59DBBCD}.Release|Any CPU.Build.0 = Release|Any CPU + {9B8B7AEE-C011-4468-B9D2-0351B933CFCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B8B7AEE-C011-4468-B9D2-0351B933CFCF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B8B7AEE-C011-4468-B9D2-0351B933CFCF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B8B7AEE-C011-4468-B9D2-0351B933CFCF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/enum/plain-enums/src/SeedEnum/SeedEnum.csproj b/seed/csharp-model/enum/plain-enums/src/SeedEnum/SeedEnum.csproj index 1ac5726bfa8..a29863a52f4 100644 --- a/seed/csharp-model/enum/plain-enums/src/SeedEnum/SeedEnum.csproj +++ b/seed/csharp-model/enum/plain-enums/src/SeedEnum/SeedEnum.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/enum/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/enum/snippet-templates.json b/seed/csharp-model/enum/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/enum/snippet.json b/seed/csharp-model/enum/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs index eddabd432bc..15f6b535439 100644 --- a/seed/csharp-model/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj b/seed/csharp-model/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj index 13149bb05d8..0afa998e413 100644 --- a/seed/csharp-model/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj +++ b/seed/csharp-model/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/error-property/src/SeedErrorProperty.sln b/seed/csharp-model/error-property/src/SeedErrorProperty.sln new file mode 100644 index 00000000000..b6ccdbea25b --- /dev/null +++ b/seed/csharp-model/error-property/src/SeedErrorProperty.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedErrorProperty", "SeedErrorProperty\SeedErrorProperty.csproj", "{CDD8F608-B565-4BA5-8C64-D1EC8A5C6BC4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedErrorProperty.Test", "SeedErrorProperty.Test\SeedErrorProperty.Test.csproj", "{B1D4F8EE-825C-469D-9E92-656EA0A2FF54}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CDD8F608-B565-4BA5-8C64-D1EC8A5C6BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDD8F608-B565-4BA5-8C64-D1EC8A5C6BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDD8F608-B565-4BA5-8C64-D1EC8A5C6BC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDD8F608-B565-4BA5-8C64-D1EC8A5C6BC4}.Release|Any CPU.Build.0 = Release|Any CPU + {B1D4F8EE-825C-469D-9E92-656EA0A2FF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1D4F8EE-825C-469D-9E92-656EA0A2FF54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1D4F8EE-825C-469D-9E92-656EA0A2FF54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1D4F8EE-825C-469D-9E92-656EA0A2FF54}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj b/seed/csharp-model/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj index 343237f8e57..5904847a2c1 100644 --- a/seed/csharp-model/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj +++ b/seed/csharp-model/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/error-property/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/examples/src/SeedExamples.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/examples/src/SeedExamples.Test/Core/EnumSerializerTests.cs index 68963fdc852..054ee62a369 100644 --- a/seed/csharp-model/examples/src/SeedExamples.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/examples/src/SeedExamples.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/examples/src/SeedExamples.Test/SeedExamples.Test.csproj b/seed/csharp-model/examples/src/SeedExamples.Test/SeedExamples.Test.csproj index 53949d76225..dbba8aeb890 100644 --- a/seed/csharp-model/examples/src/SeedExamples.Test/SeedExamples.Test.csproj +++ b/seed/csharp-model/examples/src/SeedExamples.Test/SeedExamples.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/examples/src/SeedExamples.sln b/seed/csharp-model/examples/src/SeedExamples.sln new file mode 100644 index 00000000000..ec81cd85115 --- /dev/null +++ b/seed/csharp-model/examples/src/SeedExamples.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples", "SeedExamples\SeedExamples.csproj", "{F001B9AB-3E8A-449F-8AFB-0853D7C7E8E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples.Test", "SeedExamples.Test\SeedExamples.Test.csproj", "{08101335-86D9-4D95-BCC7-07C2D0A9D7CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F001B9AB-3E8A-449F-8AFB-0853D7C7E8E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F001B9AB-3E8A-449F-8AFB-0853D7C7E8E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F001B9AB-3E8A-449F-8AFB-0853D7C7E8E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F001B9AB-3E8A-449F-8AFB-0853D7C7E8E8}.Release|Any CPU.Build.0 = Release|Any CPU + {08101335-86D9-4D95-BCC7-07C2D0A9D7CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08101335-86D9-4D95-BCC7-07C2D0A9D7CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08101335-86D9-4D95-BCC7-07C2D0A9D7CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08101335-86D9-4D95-BCC7-07C2D0A9D7CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/examples/src/SeedExamples/SeedExamples.csproj b/seed/csharp-model/examples/src/SeedExamples/SeedExamples.csproj index fea22d69c78..019799fa845 100644 --- a/seed/csharp-model/examples/src/SeedExamples/SeedExamples.csproj +++ b/seed/csharp-model/examples/src/SeedExamples/SeedExamples.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/examples/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs index a24f6e78ff6..5572de663e2 100644 --- a/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj b/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj index 6079b5642c6..cc628bfe61c 100644 --- a/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj +++ b/seed/csharp-model/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/exhaustive/src/SeedExhaustive.sln b/seed/csharp-model/exhaustive/src/SeedExhaustive.sln new file mode 100644 index 00000000000..0476223b761 --- /dev/null +++ b/seed/csharp-model/exhaustive/src/SeedExhaustive.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive", "SeedExhaustive\SeedExhaustive.csproj", "{7A15C171-7CAC-4B6B-B360-C403A46EAC2B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive.Test", "SeedExhaustive.Test\SeedExhaustive.Test.csproj", "{A072C902-9A9A-4235-87FA-D5F980E5FA06}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7A15C171-7CAC-4B6B-B360-C403A46EAC2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A15C171-7CAC-4B6B-B360-C403A46EAC2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A15C171-7CAC-4B6B-B360-C403A46EAC2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A15C171-7CAC-4B6B-B360-C403A46EAC2B}.Release|Any CPU.Build.0 = Release|Any CPU + {A072C902-9A9A-4235-87FA-D5F980E5FA06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A072C902-9A9A-4235-87FA-D5F980E5FA06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A072C902-9A9A-4235-87FA-D5F980E5FA06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A072C902-9A9A-4235-87FA-D5F980E5FA06}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj b/seed/csharp-model/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj index 5c9a6517d3f..9a606e36c56 100644 --- a/seed/csharp-model/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj +++ b/seed/csharp-model/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs index b0c49d38916..6d9b555b690 100644 --- a/seed/csharp-model/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/extends/src/SeedExtends.Test/SeedExtends.Test.csproj b/seed/csharp-model/extends/src/SeedExtends.Test/SeedExtends.Test.csproj index 205ec201666..b460424eab6 100644 --- a/seed/csharp-model/extends/src/SeedExtends.Test/SeedExtends.Test.csproj +++ b/seed/csharp-model/extends/src/SeedExtends.Test/SeedExtends.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/extends/src/SeedExtends.sln b/seed/csharp-model/extends/src/SeedExtends.sln new file mode 100644 index 00000000000..a0908487199 --- /dev/null +++ b/seed/csharp-model/extends/src/SeedExtends.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtends", "SeedExtends\SeedExtends.csproj", "{185687E5-D206-43B3-9CF7-655858719241}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtends.Test", "SeedExtends.Test\SeedExtends.Test.csproj", "{84B9D328-EF70-4DD8-B38D-26B5C5F01B17}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {185687E5-D206-43B3-9CF7-655858719241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {185687E5-D206-43B3-9CF7-655858719241}.Debug|Any CPU.Build.0 = Debug|Any CPU + {185687E5-D206-43B3-9CF7-655858719241}.Release|Any CPU.ActiveCfg = Release|Any CPU + {185687E5-D206-43B3-9CF7-655858719241}.Release|Any CPU.Build.0 = Release|Any CPU + {84B9D328-EF70-4DD8-B38D-26B5C5F01B17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84B9D328-EF70-4DD8-B38D-26B5C5F01B17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84B9D328-EF70-4DD8-B38D-26B5C5F01B17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84B9D328-EF70-4DD8-B38D-26B5C5F01B17}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/extends/src/SeedExtends/SeedExtends.csproj b/seed/csharp-model/extends/src/SeedExtends/SeedExtends.csproj index 7d332e1d634..51cd1db405a 100644 --- a/seed/csharp-model/extends/src/SeedExtends/SeedExtends.csproj +++ b/seed/csharp-model/extends/src/SeedExtends/SeedExtends.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/extends/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs index b0d546572c6..7c571946c86 100644 --- a/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj b/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj index 1339409021f..4b6eae5a36b 100644 --- a/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj +++ b/seed/csharp-model/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/extra-properties/src/SeedExtraProperties.sln b/seed/csharp-model/extra-properties/src/SeedExtraProperties.sln new file mode 100644 index 00000000000..c300a628c95 --- /dev/null +++ b/seed/csharp-model/extra-properties/src/SeedExtraProperties.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtraProperties", "SeedExtraProperties\SeedExtraProperties.csproj", "{F766A520-C4E5-462C-A97A-6A4AA8BBBC5D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtraProperties.Test", "SeedExtraProperties.Test\SeedExtraProperties.Test.csproj", "{39C952C5-5798-462C-AA03-B8884E0D0667}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F766A520-C4E5-462C-A97A-6A4AA8BBBC5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F766A520-C4E5-462C-A97A-6A4AA8BBBC5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F766A520-C4E5-462C-A97A-6A4AA8BBBC5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F766A520-C4E5-462C-A97A-6A4AA8BBBC5D}.Release|Any CPU.Build.0 = Release|Any CPU + {39C952C5-5798-462C-AA03-B8884E0D0667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39C952C5-5798-462C-AA03-B8884E0D0667}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39C952C5-5798-462C-AA03-B8884E0D0667}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39C952C5-5798-462C-AA03-B8884E0D0667}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj b/seed/csharp-model/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj index a45da639e5e..b085b4751cd 100644 --- a/seed/csharp-model/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj +++ b/seed/csharp-model/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/extra-properties/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs index c0a4997b9de..43ce3eef991 100644 --- a/seed/csharp-model/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj b/seed/csharp-model/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj index 4ce7f332a68..92f414fcfb7 100644 --- a/seed/csharp-model/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj +++ b/seed/csharp-model/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/file-download/src/SeedFileDownload.sln b/seed/csharp-model/file-download/src/SeedFileDownload.sln new file mode 100644 index 00000000000..9ef2340c822 --- /dev/null +++ b/seed/csharp-model/file-download/src/SeedFileDownload.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileDownload", "SeedFileDownload\SeedFileDownload.csproj", "{EC496168-D9E3-49D2-BFF6-8095AD36AC00}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileDownload.Test", "SeedFileDownload.Test\SeedFileDownload.Test.csproj", "{F962DC9D-20E0-44A6-B964-AF14882A2F0F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EC496168-D9E3-49D2-BFF6-8095AD36AC00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC496168-D9E3-49D2-BFF6-8095AD36AC00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC496168-D9E3-49D2-BFF6-8095AD36AC00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC496168-D9E3-49D2-BFF6-8095AD36AC00}.Release|Any CPU.Build.0 = Release|Any CPU + {F962DC9D-20E0-44A6-B964-AF14882A2F0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F962DC9D-20E0-44A6-B964-AF14882A2F0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F962DC9D-20E0-44A6-B964-AF14882A2F0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F962DC9D-20E0-44A6-B964-AF14882A2F0F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/file-download/src/SeedFileDownload/SeedFileDownload.csproj b/seed/csharp-model/file-download/src/SeedFileDownload/SeedFileDownload.csproj index 18ebe40da16..5e7a5f0b9b3 100644 --- a/seed/csharp-model/file-download/src/SeedFileDownload/SeedFileDownload.csproj +++ b/seed/csharp-model/file-download/src/SeedFileDownload/SeedFileDownload.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/file-download/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs index 0ead8f79135..a97647b8b1b 100644 --- a/seed/csharp-model/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj b/seed/csharp-model/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj index a11db87a960..e17786a850b 100644 --- a/seed/csharp-model/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj +++ b/seed/csharp-model/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/file-upload/src/SeedFileUpload.sln b/seed/csharp-model/file-upload/src/SeedFileUpload.sln new file mode 100644 index 00000000000..07ea7308566 --- /dev/null +++ b/seed/csharp-model/file-upload/src/SeedFileUpload.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileUpload", "SeedFileUpload\SeedFileUpload.csproj", "{6990DE37-A5FD-4356-A00C-74FB6F7D68EE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileUpload.Test", "SeedFileUpload.Test\SeedFileUpload.Test.csproj", "{19818722-5353-43EA-932A-704714BB439B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6990DE37-A5FD-4356-A00C-74FB6F7D68EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6990DE37-A5FD-4356-A00C-74FB6F7D68EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6990DE37-A5FD-4356-A00C-74FB6F7D68EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6990DE37-A5FD-4356-A00C-74FB6F7D68EE}.Release|Any CPU.Build.0 = Release|Any CPU + {19818722-5353-43EA-932A-704714BB439B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19818722-5353-43EA-932A-704714BB439B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19818722-5353-43EA-932A-704714BB439B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19818722-5353-43EA-932A-704714BB439B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/file-upload/src/SeedFileUpload/SeedFileUpload.csproj b/seed/csharp-model/file-upload/src/SeedFileUpload/SeedFileUpload.csproj index ee9fbfc593c..c1d87b48256 100644 --- a/seed/csharp-model/file-upload/src/SeedFileUpload/SeedFileUpload.csproj +++ b/seed/csharp-model/file-upload/src/SeedFileUpload/SeedFileUpload.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/file-upload/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/folders/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/folders/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/folders/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/folders/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/folders/src/SeedApi.sln b/seed/csharp-model/folders/src/SeedApi.sln new file mode 100644 index 00000000000..178600ead4a --- /dev/null +++ b/seed/csharp-model/folders/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{E31B3462-42C0-4A79-B72C-E26AAD5E4494}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{62F52778-4D28-42F5-8505-C9C3E7DC4986}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E31B3462-42C0-4A79-B72C-E26AAD5E4494}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E31B3462-42C0-4A79-B72C-E26AAD5E4494}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E31B3462-42C0-4A79-B72C-E26AAD5E4494}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E31B3462-42C0-4A79-B72C-E26AAD5E4494}.Release|Any CPU.Build.0 = Release|Any CPU + {62F52778-4D28-42F5-8505-C9C3E7DC4986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62F52778-4D28-42F5-8505-C9C3E7DC4986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62F52778-4D28-42F5-8505-C9C3E7DC4986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62F52778-4D28-42F5-8505-C9C3E7DC4986}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/folders/src/SeedApi/SeedApi.csproj b/seed/csharp-model/folders/src/SeedApi/SeedApi.csproj index bba6a3d60b7..5c67ac4ddd0 100644 --- a/seed/csharp-model/folders/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/folders/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/folders/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.gitignore b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml deleted file mode 100644 index c23323621f2..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml +++ /dev/null @@ -1,7 +0,0 @@ -api: - - path: openapi/openapi.yml - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml deleted file mode 100644 index ebc23143df3..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/openapi/openapi.yml +++ /dev/null @@ -1,33 +0,0 @@ -openapi: 3.0.3 -info: - title: Test API - version: 1.0.0 -servers: - - url: https://localhost -tags: - - name: dataservice -paths: - /foo: - post: - tag: dataservice - x-fern-sdk-group-name: - - dataservice - x-fern-sdk-method-name: foo - security: - - ApiKeyAuth: [] - operationId: foo - responses: - "200": - content: - application/json: - schema: - type: object - -security: - - ApiKeyAuth: [] -components: - securitySchemes: - ApiKeyAuth: - type: apiKey - in: header - name: X-API-Key diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml deleted file mode 100644 index 062b98c2ccb..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml +++ /dev/null @@ -1,56 +0,0 @@ - -paths: - /data/fetch: - get: - x-fern-request-name: FetchRequest - /data/list: - get: - x-fern-request-name: ListRequest -components: - schemas: - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value - DeleteRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - DescribeRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryColumn: - properties: - filter: - $ref: '#/components/schemas/Metadata' - ScoredColumn: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - UpdateRequest: - properties: - setMetadata: - $ref: '#/components/schemas/Metadata' - Column: - properties: - metadata: - $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet-templates.json b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet.json b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index c5be29f92d9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Column.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Column.cs deleted file mode 100644 index 602200b6dfb..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Column.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Column -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Column type into its Protobuf-equivalent representation. - /// - internal Proto.Column ToProto() - { - var result = new Proto.Column(); - result.Id = Id; - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new Column type from its Protobuf-equivalent representation. - /// - internal static Column FromProto(Proto.Column value) - { - return new Column - { - Id = value.Id, - Values = value.Values?.ToList() ?? new List(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DeleteResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DeleteResponse.cs deleted file mode 100644 index def64fbd896..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DeleteResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteResponse ToProto() - { - return new Proto.DeleteResponse(); - } - - /// - /// Returns a new DeleteResponse type from its Protobuf-equivalent representation. - /// - internal static DeleteResponse FromProto(Proto.DeleteResponse value) - { - return new DeleteResponse(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DescribeResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DescribeResponse.cs deleted file mode 100644 index fbd45c674b7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/DescribeResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeResponse -{ - [JsonPropertyName("namespaces")] - public Dictionary? Namespaces { get; set; } - - [JsonPropertyName("dimension")] - public uint? Dimension { get; set; } - - [JsonPropertyName("fullness")] - public float? Fullness { get; set; } - - [JsonPropertyName("totalCount")] - public uint? TotalCount { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeResponse ToProto() - { - var result = new Proto.DescribeResponse(); - if (Namespaces != null && Namespaces.Any()) - { - foreach (var kvp in Namespaces) - { - result.Namespaces.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Dimension != null) - { - result.Dimension = Dimension ?? 0; - } - if (Fullness != null) - { - result.Fullness = Fullness ?? 0.0f; - } - if (TotalCount != null) - { - result.TotalCount = TotalCount ?? 0; - } - return result; - } - - /// - /// Returns a new DescribeResponse type from its Protobuf-equivalent representation. - /// - internal static DescribeResponse FromProto(Proto.DescribeResponse value) - { - return new DescribeResponse - { - Namespaces = value.Namespaces?.ToDictionary( - kvp => kvp.Key, - kvp => NamespaceSummary.FromProto(kvp.Value) - ), - Dimension = value.Dimension, - Fullness = value.Fullness, - TotalCount = value.TotalCount, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/FetchResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/FetchResponse.cs deleted file mode 100644 index ae595dfdc41..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/FetchResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchResponse -{ - [JsonPropertyName("columns")] - public Dictionary? Columns { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchResponse type into its Protobuf-equivalent representation. - /// - internal Proto.FetchResponse ToProto() - { - var result = new Proto.FetchResponse(); - if (Columns != null && Columns.Any()) - { - foreach (var kvp in Columns) - { - result.Columns.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new FetchResponse type from its Protobuf-equivalent representation. - /// - internal static FetchResponse FromProto(Proto.FetchResponse value) - { - return new FetchResponse - { - Columns = value.Columns?.ToDictionary( - kvp => kvp.Key, - kvp => Column.FromProto(kvp.Value) - ), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/IndexedData.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/IndexedData.cs deleted file mode 100644 index 242c4d0b135..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/IndexedData.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record IndexedData -{ - [JsonPropertyName("indices")] - public IEnumerable Indices { get; set; } = new List(); - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the IndexedData type into its Protobuf-equivalent representation. - /// - internal Proto.IndexedData ToProto() - { - var result = new Proto.IndexedData(); - if (Indices.Any()) - { - result.Indices.AddRange(Indices); - } - if (Values.Any()) - { - result.Values.AddRange(Values); - } - return result; - } - - /// - /// Returns a new IndexedData type from its Protobuf-equivalent representation. - /// - internal static IndexedData FromProto(Proto.IndexedData value) - { - return new IndexedData - { - Indices = value.Indices?.ToList() ?? new List(), - Values = value.Values?.ToList() ?? new List(), - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListElement.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListElement.cs deleted file mode 100644 index 2044bd62e56..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListElement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListElement -{ - [JsonPropertyName("id")] - public string? Id { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListElement type into its Protobuf-equivalent representation. - /// - internal Proto.ListElement ToProto() - { - var result = new Proto.ListElement(); - if (Id != null) - { - result.Id = Id ?? ""; - } - return result; - } - - /// - /// Returns a new ListElement type from its Protobuf-equivalent representation. - /// - internal static ListElement FromProto(Proto.ListElement value) - { - return new ListElement { Id = value.Id }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListResponse.cs deleted file mode 100644 index 9d691519a85..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ListResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListResponse -{ - [JsonPropertyName("columns")] - public IEnumerable? Columns { get; set; } - - [JsonPropertyName("pagination")] - public Pagination? Pagination { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListResponse type into its Protobuf-equivalent representation. - /// - internal Proto.ListResponse ToProto() - { - var result = new Proto.ListResponse(); - if (Columns != null && Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Pagination != null) - { - result.Pagination = Pagination.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new ListResponse type from its Protobuf-equivalent representation. - /// - internal static ListResponse FromProto(Proto.ListResponse value) - { - return new ListResponse - { - Columns = value.Columns?.Select(ListElement.FromProto), - Pagination = value.Pagination != null ? Pagination.FromProto(value.Pagination) : null, - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Metadata.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/MetadataValue.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/NamespaceSummary.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/NamespaceSummary.cs deleted file mode 100644 index da0573827da..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/NamespaceSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record NamespaceSummary -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the NamespaceSummary type into its Protobuf-equivalent representation. - /// - internal Proto.NamespaceSummary ToProto() - { - var result = new Proto.NamespaceSummary(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new NamespaceSummary type from its Protobuf-equivalent representation. - /// - internal static NamespaceSummary FromProto(Proto.NamespaceSummary value) - { - return new NamespaceSummary { Count = value.Count }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Pagination.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Pagination.cs deleted file mode 100644 index 87a67db48af..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Pagination.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Pagination -{ - [JsonPropertyName("next")] - public string? Next { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Pagination type into its Protobuf-equivalent representation. - /// - internal Proto.Pagination ToProto() - { - var result = new Proto.Pagination(); - if (Next != null) - { - result.Next = Next ?? ""; - } - return result; - } - - /// - /// Returns a new Pagination type from its Protobuf-equivalent representation. - /// - internal static Pagination FromProto(Proto.Pagination value) - { - return new Pagination { Next = value.Next }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryColumn.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryColumn.cs deleted file mode 100644 index 94c3d4f14af..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryColumn.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryColumn -{ - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("topK")] - public uint? TopK { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryColumn type into its Protobuf-equivalent representation. - /// - internal Proto.QueryColumn ToProto() - { - var result = new Proto.QueryColumn(); - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (TopK != null) - { - result.TopK = TopK ?? 0; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryColumn type from its Protobuf-equivalent representation. - /// - internal static QueryColumn FromProto(Proto.QueryColumn value) - { - return new QueryColumn - { - Values = value.Values?.ToList() ?? new List(), - TopK = value.TopK, - Namespace = value.Namespace, - Filter = value.Filter != null ? Metadata.FromProto(value.Filter) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResponse.cs deleted file mode 100644 index c4786b94639..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResponse -{ - [JsonPropertyName("results")] - public IEnumerable? Results { get; set; } - - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResponse type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResponse ToProto() - { - var result = new Proto.QueryResponse(); - if (Results != null && Results.Any()) - { - result.Results.AddRange(Results.Select(elem => elem.ToProto())); - } - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryResponse type from its Protobuf-equivalent representation. - /// - internal static QueryResponse FromProto(Proto.QueryResponse value) - { - return new QueryResponse - { - Results = value.Results?.Select(QueryResult.FromProto), - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResult.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResult.cs deleted file mode 100644 index 8c8988af1fd..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/QueryResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResult -{ - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResult type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResult ToProto() - { - var result = new Proto.QueryResult(); - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } - - /// - /// Returns a new QueryResult type from its Protobuf-equivalent representation. - /// - internal static QueryResult FromProto(Proto.QueryResult value) - { - return new QueryResult - { - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ScoredColumn.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ScoredColumn.cs deleted file mode 100644 index 5ca5fa6e2f6..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/ScoredColumn.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ScoredColumn -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("score")] - public float? Score { get; set; } - - [JsonPropertyName("values")] - public IEnumerable? Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ScoredColumn type into its Protobuf-equivalent representation. - /// - internal Proto.ScoredColumn ToProto() - { - var result = new Proto.ScoredColumn(); - result.Id = Id; - if (Score != null) - { - result.Score = Score ?? 0.0f; - } - if (Values != null && Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new ScoredColumn type from its Protobuf-equivalent representation. - /// - internal static ScoredColumn FromProto(Proto.ScoredColumn value) - { - return new ScoredColumn - { - Id = value.Id, - Score = value.Score, - Values = value.Values?.ToList(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj deleted file mode 100644 index e875ec8f800..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/grpc-proto-exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UpdateResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UpdateResponse.cs deleted file mode 100644 index 0d7e3f61b18..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UpdateResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateResponse ToProto() - { - return new Proto.UpdateResponse(); - } - - /// - /// Returns a new UpdateResponse type from its Protobuf-equivalent representation. - /// - internal static UpdateResponse FromProto(Proto.UpdateResponse value) - { - return new UpdateResponse(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UploadResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UploadResponse.cs deleted file mode 100644 index 23286a04145..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/UploadResponse.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadResponse -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UploadResponse ToProto() - { - var result = new Proto.UploadResponse(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new UploadResponse type from its Protobuf-equivalent representation. - /// - internal static UploadResponse FromProto(Proto.UploadResponse value) - { - return new UploadResponse { Count = value.Count }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Usage.cs b/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Usage.cs deleted file mode 100644 index e5921bf2191..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Usage.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Usage -{ - [JsonPropertyName("units")] - public uint? Units { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Usage type into its Protobuf-equivalent representation. - /// - internal Proto.Usage ToProto() - { - var result = new Proto.Usage(); - if (Units != null) - { - result.Units = Units ?? 0; - } - return result; - } - - /// - /// Returns a new Usage type from its Protobuf-equivalent representation. - /// - internal static Usage FromProto(Proto.Usage value) - { - return new Usage { Units = value.Units }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.gitignore b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml deleted file mode 100644 index c23323621f2..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml +++ /dev/null @@ -1,7 +0,0 @@ -api: - - path: openapi/openapi.yml - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml deleted file mode 100644 index ebc23143df3..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/openapi/openapi.yml +++ /dev/null @@ -1,33 +0,0 @@ -openapi: 3.0.3 -info: - title: Test API - version: 1.0.0 -servers: - - url: https://localhost -tags: - - name: dataservice -paths: - /foo: - post: - tag: dataservice - x-fern-sdk-group-name: - - dataservice - x-fern-sdk-method-name: foo - security: - - ApiKeyAuth: [] - operationId: foo - responses: - "200": - content: - application/json: - schema: - type: object - -security: - - ApiKeyAuth: [] -components: - securitySchemes: - ApiKeyAuth: - type: apiKey - in: header - name: X-API-Key diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml deleted file mode 100644 index 062b98c2ccb..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml +++ /dev/null @@ -1,56 +0,0 @@ - -paths: - /data/fetch: - get: - x-fern-request-name: FetchRequest - /data/list: - get: - x-fern-request-name: ListRequest -components: - schemas: - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value - DeleteRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - DescribeRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryColumn: - properties: - filter: - $ref: '#/components/schemas/Metadata' - ScoredColumn: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - UpdateRequest: - properties: - setMetadata: - $ref: '#/components/schemas/Metadata' - Column: - properties: - metadata: - $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet-templates.json b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet.json b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index c5be29f92d9..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Column.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Column.cs deleted file mode 100644 index 8849268e11a..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Column.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Column -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Column type into its Protobuf-equivalent representation. - /// - internal Proto.Column ToProto() - { - var result = new Proto.Column(); - result.Id = Id; - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new Column type from its Protobuf-equivalent representation. - /// - internal static Column FromProto(Proto.Column value) - { - return new Column - { - Id = value.Id, - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DeleteResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DeleteResponse.cs deleted file mode 100644 index def64fbd896..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DeleteResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteResponse ToProto() - { - return new Proto.DeleteResponse(); - } - - /// - /// Returns a new DeleteResponse type from its Protobuf-equivalent representation. - /// - internal static DeleteResponse FromProto(Proto.DeleteResponse value) - { - return new DeleteResponse(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DescribeResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DescribeResponse.cs deleted file mode 100644 index fbd45c674b7..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/DescribeResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeResponse -{ - [JsonPropertyName("namespaces")] - public Dictionary? Namespaces { get; set; } - - [JsonPropertyName("dimension")] - public uint? Dimension { get; set; } - - [JsonPropertyName("fullness")] - public float? Fullness { get; set; } - - [JsonPropertyName("totalCount")] - public uint? TotalCount { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeResponse ToProto() - { - var result = new Proto.DescribeResponse(); - if (Namespaces != null && Namespaces.Any()) - { - foreach (var kvp in Namespaces) - { - result.Namespaces.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Dimension != null) - { - result.Dimension = Dimension ?? 0; - } - if (Fullness != null) - { - result.Fullness = Fullness ?? 0.0f; - } - if (TotalCount != null) - { - result.TotalCount = TotalCount ?? 0; - } - return result; - } - - /// - /// Returns a new DescribeResponse type from its Protobuf-equivalent representation. - /// - internal static DescribeResponse FromProto(Proto.DescribeResponse value) - { - return new DescribeResponse - { - Namespaces = value.Namespaces?.ToDictionary( - kvp => kvp.Key, - kvp => NamespaceSummary.FromProto(kvp.Value) - ), - Dimension = value.Dimension, - Fullness = value.Fullness, - TotalCount = value.TotalCount, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/FetchResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/FetchResponse.cs deleted file mode 100644 index ae595dfdc41..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/FetchResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchResponse -{ - [JsonPropertyName("columns")] - public Dictionary? Columns { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchResponse type into its Protobuf-equivalent representation. - /// - internal Proto.FetchResponse ToProto() - { - var result = new Proto.FetchResponse(); - if (Columns != null && Columns.Any()) - { - foreach (var kvp in Columns) - { - result.Columns.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new FetchResponse type from its Protobuf-equivalent representation. - /// - internal static FetchResponse FromProto(Proto.FetchResponse value) - { - return new FetchResponse - { - Columns = value.Columns?.ToDictionary( - kvp => kvp.Key, - kvp => Column.FromProto(kvp.Value) - ), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/IndexedData.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/IndexedData.cs deleted file mode 100644 index 5f7df404340..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/IndexedData.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record IndexedData -{ - [JsonPropertyName("indices")] - public IEnumerable Indices { get; set; } = new List(); - - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the IndexedData type into its Protobuf-equivalent representation. - /// - internal Proto.IndexedData ToProto() - { - var result = new Proto.IndexedData(); - if (Indices.Any()) - { - result.Indices.AddRange(Indices); - } - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - return result; - } - - /// - /// Returns a new IndexedData type from its Protobuf-equivalent representation. - /// - internal static IndexedData FromProto(Proto.IndexedData value) - { - return new IndexedData - { - Indices = value.Indices?.ToList() ?? new List(), - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListElement.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListElement.cs deleted file mode 100644 index 2044bd62e56..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListElement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListElement -{ - [JsonPropertyName("id")] - public string? Id { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListElement type into its Protobuf-equivalent representation. - /// - internal Proto.ListElement ToProto() - { - var result = new Proto.ListElement(); - if (Id != null) - { - result.Id = Id ?? ""; - } - return result; - } - - /// - /// Returns a new ListElement type from its Protobuf-equivalent representation. - /// - internal static ListElement FromProto(Proto.ListElement value) - { - return new ListElement { Id = value.Id }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListResponse.cs deleted file mode 100644 index 9d691519a85..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ListResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListResponse -{ - [JsonPropertyName("columns")] - public IEnumerable? Columns { get; set; } - - [JsonPropertyName("pagination")] - public Pagination? Pagination { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListResponse type into its Protobuf-equivalent representation. - /// - internal Proto.ListResponse ToProto() - { - var result = new Proto.ListResponse(); - if (Columns != null && Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Pagination != null) - { - result.Pagination = Pagination.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new ListResponse type from its Protobuf-equivalent representation. - /// - internal static ListResponse FromProto(Proto.ListResponse value) - { - return new ListResponse - { - Columns = value.Columns?.Select(ListElement.FromProto), - Pagination = value.Pagination != null ? Pagination.FromProto(value.Pagination) : null, - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Metadata.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/MetadataValue.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/NamespaceSummary.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/NamespaceSummary.cs deleted file mode 100644 index da0573827da..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/NamespaceSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record NamespaceSummary -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the NamespaceSummary type into its Protobuf-equivalent representation. - /// - internal Proto.NamespaceSummary ToProto() - { - var result = new Proto.NamespaceSummary(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new NamespaceSummary type from its Protobuf-equivalent representation. - /// - internal static NamespaceSummary FromProto(Proto.NamespaceSummary value) - { - return new NamespaceSummary { Count = value.Count }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Pagination.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Pagination.cs deleted file mode 100644 index 87a67db48af..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Pagination.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Pagination -{ - [JsonPropertyName("next")] - public string? Next { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Pagination type into its Protobuf-equivalent representation. - /// - internal Proto.Pagination ToProto() - { - var result = new Proto.Pagination(); - if (Next != null) - { - result.Next = Next ?? ""; - } - return result; - } - - /// - /// Returns a new Pagination type from its Protobuf-equivalent representation. - /// - internal static Pagination FromProto(Proto.Pagination value) - { - return new Pagination { Next = value.Next }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryColumn.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryColumn.cs deleted file mode 100644 index 63b931b813b..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryColumn.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryColumn -{ - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - [JsonPropertyName("topK")] - public uint? TopK { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryColumn type into its Protobuf-equivalent representation. - /// - internal Proto.QueryColumn ToProto() - { - var result = new Proto.QueryColumn(); - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - if (TopK != null) - { - result.TopK = TopK ?? 0; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryColumn type from its Protobuf-equivalent representation. - /// - internal static QueryColumn FromProto(Proto.QueryColumn value) - { - return new QueryColumn - { - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - TopK = value.TopK, - Namespace = value.Namespace, - Filter = value.Filter != null ? Metadata.FromProto(value.Filter) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResponse.cs deleted file mode 100644 index c4786b94639..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResponse -{ - [JsonPropertyName("results")] - public IEnumerable? Results { get; set; } - - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResponse type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResponse ToProto() - { - var result = new Proto.QueryResponse(); - if (Results != null && Results.Any()) - { - result.Results.AddRange(Results.Select(elem => elem.ToProto())); - } - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryResponse type from its Protobuf-equivalent representation. - /// - internal static QueryResponse FromProto(Proto.QueryResponse value) - { - return new QueryResponse - { - Results = value.Results?.Select(QueryResult.FromProto), - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResult.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResult.cs deleted file mode 100644 index 8c8988af1fd..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/QueryResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResult -{ - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResult type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResult ToProto() - { - var result = new Proto.QueryResult(); - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } - - /// - /// Returns a new QueryResult type from its Protobuf-equivalent representation. - /// - internal static QueryResult FromProto(Proto.QueryResult value) - { - return new QueryResult - { - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ScoredColumn.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ScoredColumn.cs deleted file mode 100644 index 543713c18e8..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/ScoredColumn.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ScoredColumn -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("score")] - public float? Score { get; set; } - - [JsonPropertyName("values")] - public ReadOnlyMemory? Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ScoredColumn type into its Protobuf-equivalent representation. - /// - internal Proto.ScoredColumn ToProto() - { - var result = new Proto.ScoredColumn(); - result.Id = Id; - if (Score != null) - { - result.Score = Score ?? 0.0f; - } - if (Values != null && !Values.Value.IsEmpty) - { - result.Values.AddRange(Values.Value.ToArray()); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new ScoredColumn type from its Protobuf-equivalent representation. - /// - internal static ScoredColumn FromProto(Proto.ScoredColumn value) - { - return new ScoredColumn - { - Id = value.Id, - Score = value.Score, - Values = value.Values?.ToArray(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj deleted file mode 100644 index e875ec8f800..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/grpc-proto-exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UpdateResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UpdateResponse.cs deleted file mode 100644 index 0d7e3f61b18..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UpdateResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateResponse ToProto() - { - return new Proto.UpdateResponse(); - } - - /// - /// Returns a new UpdateResponse type from its Protobuf-equivalent representation. - /// - internal static UpdateResponse FromProto(Proto.UpdateResponse value) - { - return new UpdateResponse(); - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UploadResponse.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UploadResponse.cs deleted file mode 100644 index 23286a04145..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/UploadResponse.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadResponse -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UploadResponse ToProto() - { - var result = new Proto.UploadResponse(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new UploadResponse type from its Protobuf-equivalent representation. - /// - internal static UploadResponse FromProto(Proto.UploadResponse value) - { - return new UploadResponse { Count = value.Count }; - } -} diff --git a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Usage.cs b/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Usage.cs deleted file mode 100644 index e5921bf2191..00000000000 --- a/seed/csharp-model/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Usage.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Usage -{ - [JsonPropertyName("units")] - public uint? Units { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Usage type into its Protobuf-equivalent representation. - /// - internal Proto.Usage ToProto() - { - var result = new Proto.Usage(); - if (Units != null) - { - result.Units = Units ?? 0; - } - return result; - } - - /// - /// Returns a new Usage type from its Protobuf-equivalent representation. - /// - internal static Usage FromProto(Proto.Usage value) - { - return new Usage { Units = value.Units }; - } -} diff --git a/seed/csharp-model/grpc-proto/.github/workflows/ci.yml b/seed/csharp-model/grpc-proto/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-model/grpc-proto/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/grpc-proto/.gitignore b/seed/csharp-model/grpc-proto/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-model/grpc-proto/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/grpc-proto/.mock/fern.config.json b/seed/csharp-model/grpc-proto/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/.mock/generators.yml b/seed/csharp-model/grpc-proto/.mock/generators.yml deleted file mode 100644 index d6b509d39ea..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/generators.yml +++ /dev/null @@ -1,6 +0,0 @@ -api: - - proto: - root: proto - target: proto/user/v1/user.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/.mock/overrides.yml b/seed/csharp-model/grpc-proto/.mock/overrides.yml deleted file mode 100644 index bb6db99b0e4..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/overrides.yml +++ /dev/null @@ -1,31 +0,0 @@ -components: - schemas: - UserModel: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - - CreateRequest: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value diff --git a/seed/csharp-model/grpc-proto/.mock/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/.mock/proto/google/api/http.proto b/seed/csharp-model/grpc-proto/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/.mock/proto/user/v1/user.proto b/seed/csharp-model/grpc-proto/.mock/proto/user/v1/user.proto deleted file mode 100644 index 28542ac965a..00000000000 --- a/seed/csharp-model/grpc-proto/.mock/proto/user/v1/user.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package user.v1; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "User.V1"; -option go_package = "user/v1"; - -message UserModel { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateRequest { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateResponse { - UserModel user = 1; -} - -service UserService { - rpc Create(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/users" - body: "*" - }; - } -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/proto/google/api/annotations.proto b/seed/csharp-model/grpc-proto/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-model/grpc-proto/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/proto/google/api/http.proto b/seed/csharp-model/grpc-proto/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-model/grpc-proto/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/proto/user/v1/user.proto b/seed/csharp-model/grpc-proto/proto/user/v1/user.proto deleted file mode 100644 index 28542ac965a..00000000000 --- a/seed/csharp-model/grpc-proto/proto/user/v1/user.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package user.v1; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "User.V1"; -option go_package = "user/v1"; - -message UserModel { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateRequest { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateResponse { - UserModel user = 1; -} - -service UserService { - rpc Create(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/users" - body: "*" - }; - } -} \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/snippet-templates.json b/seed/csharp-model/grpc-proto/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto/snippet.json b/seed/csharp-model/grpc-proto/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index c5be29f92d9..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/Constants.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Core/Public/Version.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/CreateResponse.cs b/seed/csharp-model/grpc-proto/src/SeedApi/CreateResponse.cs deleted file mode 100644 index 608e09ded5f..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/CreateResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = User.V1; - -#nullable enable - -namespace SeedApi; - -public record CreateResponse -{ - [JsonPropertyName("user")] - public UserModel? User { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the CreateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.CreateResponse ToProto() - { - var result = new Proto.CreateResponse(); - if (User != null) - { - result.User = User.ToProto(); - } - return result; - } - - /// - /// Returns a new CreateResponse type from its Protobuf-equivalent representation. - /// - internal static CreateResponse FromProto(Proto.CreateResponse value) - { - return new CreateResponse - { - User = value.User != null ? UserModel.FromProto(value.User) : null, - }; - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/Metadata.cs b/seed/csharp-model/grpc-proto/src/SeedApi/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/MetadataValue.cs b/seed/csharp-model/grpc-proto/src/SeedApi/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/SeedApi.csproj b/seed/csharp-model/grpc-proto/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 1cafc3fca56..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,69 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/grpc-proto/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - diff --git a/seed/csharp-model/grpc-proto/src/SeedApi/UserModel.cs b/seed/csharp-model/grpc-proto/src/SeedApi/UserModel.cs deleted file mode 100644 index 986ace0fbd1..00000000000 --- a/seed/csharp-model/grpc-proto/src/SeedApi/UserModel.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = User.V1; - -#nullable enable - -namespace SeedApi; - -public record UserModel -{ - [JsonPropertyName("username")] - public string? Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UserModel type into its Protobuf-equivalent representation. - /// - internal Proto.UserModel ToProto() - { - var result = new Proto.UserModel(); - if (Username != null) - { - result.Username = Username ?? ""; - } - if (Email != null) - { - result.Email = Email ?? ""; - } - if (Age != null) - { - result.Age = Age ?? 0; - } - if (Weight != null) - { - result.Weight = Weight ?? 0.0f; - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - return result; - } - - /// - /// Returns a new UserModel type from its Protobuf-equivalent representation. - /// - internal static UserModel FromProto(Proto.UserModel value) - { - return new UserModel - { - Username = value.Username, - Email = value.Email, - Age = value.Age, - Weight = value.Weight, - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - }; - } -} diff --git a/seed/csharp-model/grpc/.github/workflows/ci.yml b/seed/csharp-model/grpc/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-model/grpc/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/grpc/.gitignore b/seed/csharp-model/grpc/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-model/grpc/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/grpc/.mock/definition/api.yml b/seed/csharp-model/grpc/.mock/definition/api.yml deleted file mode 100644 index 15a9f823724..00000000000 --- a/seed/csharp-model/grpc/.mock/definition/api.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: api - -error-discrimination: - strategy: status-code \ No newline at end of file diff --git a/seed/csharp-model/grpc/.mock/definition/user.yml b/seed/csharp-model/grpc/.mock/definition/user.yml deleted file mode 100644 index 80223300afc..00000000000 --- a/seed/csharp-model/grpc/.mock/definition/user.yml +++ /dev/null @@ -1,61 +0,0 @@ -types: - Metadata: - type: map> - encoding: - proto: - type: google.protobuf.Struct - - MetadataValue: - discriminated: false - union: - - double - - string - - boolean - - list - encoding: - proto: - type: google.protobuf.Value - - User: - properties: - id: string - username: string - email: optional - age: optional - weight: optional - metadata: optional - - CreateUserResponse: - properties: - user: User - -service: - auth: false - base-path: / - transport: - grpc: - service-name: UserService - endpoints: - createUser: - method: POST - path: /users - request: - name: CreateUserRequest - body: - properties: - username: string - email: optional - age: optional - weight: optional - response: CreateUserResponse - - getUser: - method: GET - path: /users - request: - name: GetUserRequest - query-parameters: - username: optional - age: optional - weight: optional - response: User diff --git a/seed/csharp-model/grpc/.mock/fern.config.json b/seed/csharp-model/grpc/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-model/grpc/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-model/grpc/.mock/generators.yml b/seed/csharp-model/grpc/.mock/generators.yml deleted file mode 100644 index 9e26dfeeb6e..00000000000 --- a/seed/csharp-model/grpc/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/seed/csharp-model/grpc/snippet-templates.json b/seed/csharp-model/grpc/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc/snippet.json b/seed/csharp-model/grpc/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-model/grpc/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/grpc/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index c5be29f92d9..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-model/grpc/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/Constants.cs b/seed/csharp-model/grpc/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-model/grpc/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-model/grpc/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-model/grpc/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/Public/Version.cs b/seed/csharp-model/grpc/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-model/grpc/src/SeedApi/Core/StringEnumSerializer.cs b/seed/csharp-model/grpc/src/SeedApi/Core/StringEnumSerializer.cs deleted file mode 100644 index 5e064791aeb..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/SeedApi.csproj b/seed/csharp-model/grpc/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 0ddf92937e5..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/grpc/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - diff --git a/seed/csharp-model/grpc/src/SeedApi/User/CreateUserResponse.cs b/seed/csharp-model/grpc/src/SeedApi/User/CreateUserResponse.cs deleted file mode 100644 index 26fb31dde58..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/User/CreateUserResponse.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record CreateUserResponse -{ - [JsonPropertyName("user")] - public required User User { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/User/Metadata.cs b/seed/csharp-model/grpc/src/SeedApi/User/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/User/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-model/grpc/src/SeedApi/User/MetadataValue.cs b/seed/csharp-model/grpc/src/SeedApi/User/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/User/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-model/grpc/src/SeedApi/User/User.cs b/seed/csharp-model/grpc/src/SeedApi/User/User.cs deleted file mode 100644 index 1f029dc332a..00000000000 --- a/seed/csharp-model/grpc/src/SeedApi/User/User.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record User -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("username")] - public required string Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs index 28633fe4009..05021088ba4 100644 --- a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj index 7551abfc848..3178b30c679 100644 --- a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj +++ b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.sln b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.sln new file mode 100644 index 00000000000..19533ba534e --- /dev/null +++ b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedIdempotencyHeaders", "SeedIdempotencyHeaders\SeedIdempotencyHeaders.csproj", "{7D961EA8-34A6-4C92-922A-C5A6267F2913}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedIdempotencyHeaders.Test", "SeedIdempotencyHeaders.Test\SeedIdempotencyHeaders.Test.csproj", "{BC65A32A-303E-490C-94C9-A2FA86B4ED6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D961EA8-34A6-4C92-922A-C5A6267F2913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D961EA8-34A6-4C92-922A-C5A6267F2913}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D961EA8-34A6-4C92-922A-C5A6267F2913}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D961EA8-34A6-4C92-922A-C5A6267F2913}.Release|Any CPU.Build.0 = Release|Any CPU + {BC65A32A-303E-490C-94C9-A2FA86B4ED6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC65A32A-303E-490C-94C9-A2FA86B4ED6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC65A32A-303E-490C-94C9-A2FA86B4ED6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC65A32A-303E-490C-94C9-A2FA86B4ED6A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj index 97673c7b847..976b0e40119 100644 --- a/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj +++ b/seed/csharp-model/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/idempotency-headers/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/imdb/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/imdb/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/imdb/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/imdb/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/imdb/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/imdb/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/imdb/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/imdb/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/imdb/src/SeedApi.sln b/seed/csharp-model/imdb/src/SeedApi.sln new file mode 100644 index 00000000000..e6578be2a95 --- /dev/null +++ b/seed/csharp-model/imdb/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{D4DC3805-9AEE-4C8F-9402-847FB4CD8566}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{30EB9BA6-BECB-465C-B02A-4B85E57C4981}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D4DC3805-9AEE-4C8F-9402-847FB4CD8566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4DC3805-9AEE-4C8F-9402-847FB4CD8566}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4DC3805-9AEE-4C8F-9402-847FB4CD8566}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4DC3805-9AEE-4C8F-9402-847FB4CD8566}.Release|Any CPU.Build.0 = Release|Any CPU + {30EB9BA6-BECB-465C-B02A-4B85E57C4981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30EB9BA6-BECB-465C-B02A-4B85E57C4981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30EB9BA6-BECB-465C-B02A-4B85E57C4981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30EB9BA6-BECB-465C-B02A-4B85E57C4981}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/imdb/src/SeedApi/SeedApi.csproj b/seed/csharp-model/imdb/src/SeedApi/SeedApi.csproj index 224033f2519..90554a2cd68 100644 --- a/seed/csharp-model/imdb/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/imdb/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/imdb/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/license/src/SeedLicense.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/license/src/SeedLicense.Test/Core/EnumSerializerTests.cs index fe53e0c1a87..95eb4f28c3e 100644 --- a/seed/csharp-model/license/src/SeedLicense.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/license/src/SeedLicense.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/license/src/SeedLicense.Test/SeedLicense.Test.csproj b/seed/csharp-model/license/src/SeedLicense.Test/SeedLicense.Test.csproj index 57e8eb5c544..48c2149242c 100644 --- a/seed/csharp-model/license/src/SeedLicense.Test/SeedLicense.Test.csproj +++ b/seed/csharp-model/license/src/SeedLicense.Test/SeedLicense.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/license/src/SeedLicense.sln b/seed/csharp-model/license/src/SeedLicense.sln new file mode 100644 index 00000000000..b448427b523 --- /dev/null +++ b/seed/csharp-model/license/src/SeedLicense.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense", "SeedLicense\SeedLicense.csproj", "{9D755904-69AF-4FF5-9C0F-E9458B144E19}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense.Test", "SeedLicense.Test\SeedLicense.Test.csproj", "{ABCA5868-3540-4048-A9B4-7873A8291630}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D755904-69AF-4FF5-9C0F-E9458B144E19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D755904-69AF-4FF5-9C0F-E9458B144E19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D755904-69AF-4FF5-9C0F-E9458B144E19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D755904-69AF-4FF5-9C0F-E9458B144E19}.Release|Any CPU.Build.0 = Release|Any CPU + {ABCA5868-3540-4048-A9B4-7873A8291630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABCA5868-3540-4048-A9B4-7873A8291630}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABCA5868-3540-4048-A9B4-7873A8291630}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABCA5868-3540-4048-A9B4-7873A8291630}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/license/src/SeedLicense/SeedLicense.csproj b/seed/csharp-model/license/src/SeedLicense/SeedLicense.csproj index 4616bc86443..7e636c9679a 100644 --- a/seed/csharp-model/license/src/SeedLicense/SeedLicense.csproj +++ b/seed/csharp-model/license/src/SeedLicense/SeedLicense.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/license/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs index b21cca4f34a..591b1211e15 100644 --- a/seed/csharp-model/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj b/seed/csharp-model/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj index 49432778357..9acd0732fca 100644 --- a/seed/csharp-model/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj +++ b/seed/csharp-model/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/literal/src/SeedLiteral.sln b/seed/csharp-model/literal/src/SeedLiteral.sln new file mode 100644 index 00000000000..919ae382981 --- /dev/null +++ b/seed/csharp-model/literal/src/SeedLiteral.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLiteral", "SeedLiteral\SeedLiteral.csproj", "{C9F41BE3-F39D-4461-A415-A1017F7DF687}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLiteral.Test", "SeedLiteral.Test\SeedLiteral.Test.csproj", "{5C86DA11-D716-4DD8-A0B5-3794E94AE7A2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C9F41BE3-F39D-4461-A415-A1017F7DF687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9F41BE3-F39D-4461-A415-A1017F7DF687}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9F41BE3-F39D-4461-A415-A1017F7DF687}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9F41BE3-F39D-4461-A415-A1017F7DF687}.Release|Any CPU.Build.0 = Release|Any CPU + {5C86DA11-D716-4DD8-A0B5-3794E94AE7A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C86DA11-D716-4DD8-A0B5-3794E94AE7A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C86DA11-D716-4DD8-A0B5-3794E94AE7A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C86DA11-D716-4DD8-A0B5-3794E94AE7A2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/literal/src/SeedLiteral/SeedLiteral.csproj b/seed/csharp-model/literal/src/SeedLiteral/SeedLiteral.csproj index 141d55cc2c8..e6c802c1c76 100644 --- a/seed/csharp-model/literal/src/SeedLiteral/SeedLiteral.csproj +++ b/seed/csharp-model/literal/src/SeedLiteral/SeedLiteral.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/literal/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs index 934dd30b644..387a195f32b 100644 --- a/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj b/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj index d7864572ab5..0cd79747a61 100644 --- a/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj +++ b/seed/csharp-model/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/mixed-case/src/SeedMixedCase.sln b/seed/csharp-model/mixed-case/src/SeedMixedCase.sln new file mode 100644 index 00000000000..888c61d81e3 --- /dev/null +++ b/seed/csharp-model/mixed-case/src/SeedMixedCase.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedCase", "SeedMixedCase\SeedMixedCase.csproj", "{10923792-1BE3-4280-A5EC-B9F35D163B53}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedCase.Test", "SeedMixedCase.Test\SeedMixedCase.Test.csproj", "{04529318-D8D7-48C0-B89C-D0FEC4B5021B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {10923792-1BE3-4280-A5EC-B9F35D163B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10923792-1BE3-4280-A5EC-B9F35D163B53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10923792-1BE3-4280-A5EC-B9F35D163B53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10923792-1BE3-4280-A5EC-B9F35D163B53}.Release|Any CPU.Build.0 = Release|Any CPU + {04529318-D8D7-48C0-B89C-D0FEC4B5021B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04529318-D8D7-48C0-B89C-D0FEC4B5021B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04529318-D8D7-48C0-B89C-D0FEC4B5021B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04529318-D8D7-48C0-B89C-D0FEC4B5021B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj b/seed/csharp-model/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj index c3e5ee90fa9..84372cf8dba 100644 --- a/seed/csharp-model/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj +++ b/seed/csharp-model/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/mixed-case/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs index 7dc7cb70d4e..e866b8cf17c 100644 --- a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj index 1c0353bdf23..e2d88fb3556 100644 --- a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj +++ b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.sln b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.sln new file mode 100644 index 00000000000..6a7f902b04c --- /dev/null +++ b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedFileDirectory", "SeedMixedFileDirectory\SeedMixedFileDirectory.csproj", "{355238E2-D4EC-456B-8745-F07BB0F30695}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedFileDirectory.Test", "SeedMixedFileDirectory.Test\SeedMixedFileDirectory.Test.csproj", "{40F0733B-E4E6-48F8-898C-22BAE352FF40}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {355238E2-D4EC-456B-8745-F07BB0F30695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {355238E2-D4EC-456B-8745-F07BB0F30695}.Debug|Any CPU.Build.0 = Debug|Any CPU + {355238E2-D4EC-456B-8745-F07BB0F30695}.Release|Any CPU.ActiveCfg = Release|Any CPU + {355238E2-D4EC-456B-8745-F07BB0F30695}.Release|Any CPU.Build.0 = Release|Any CPU + {40F0733B-E4E6-48F8-898C-22BAE352FF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40F0733B-E4E6-48F8-898C-22BAE352FF40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40F0733B-E4E6-48F8-898C-22BAE352FF40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40F0733B-E4E6-48F8-898C-22BAE352FF40}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj index a6156b7ee41..698257f0885 100644 --- a/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj +++ b/seed/csharp-model/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/mixed-file-directory/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs index f3fcb923e6f..2bd23e45c15 100644 --- a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj index b32870f7d52..3c47b405159 100644 --- a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj +++ b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.sln b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.sln new file mode 100644 index 00000000000..b6caaf7d679 --- /dev/null +++ b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiLineDocs", "SeedMultiLineDocs\SeedMultiLineDocs.csproj", "{B4567904-2D24-4B14-800E-4924E9EEC312}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiLineDocs.Test", "SeedMultiLineDocs.Test\SeedMultiLineDocs.Test.csproj", "{500C8785-B0D2-4246-9A1D-45243C6C7927}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B4567904-2D24-4B14-800E-4924E9EEC312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4567904-2D24-4B14-800E-4924E9EEC312}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4567904-2D24-4B14-800E-4924E9EEC312}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4567904-2D24-4B14-800E-4924E9EEC312}.Release|Any CPU.Build.0 = Release|Any CPU + {500C8785-B0D2-4246-9A1D-45243C6C7927}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {500C8785-B0D2-4246-9A1D-45243C6C7927}.Debug|Any CPU.Build.0 = Debug|Any CPU + {500C8785-B0D2-4246-9A1D-45243C6C7927}.Release|Any CPU.ActiveCfg = Release|Any CPU + {500C8785-B0D2-4246-9A1D-45243C6C7927}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj index 00a94e71b45..8a0ae16ffa3 100644 --- a/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj +++ b/seed/csharp-model/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-line-docs/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs index c83427a4f3c..77b2aa5e0f7 100644 --- a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj index e1b1a76e305..f2a46ae0ca2 100644 --- a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj +++ b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln new file mode 100644 index 00000000000..63a86c6b95c --- /dev/null +++ b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironmentNoDefault", "SeedMultiUrlEnvironmentNoDefault\SeedMultiUrlEnvironmentNoDefault.csproj", "{D133FBE5-B247-4F10-B0FC-B879D4A1DFD5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironmentNoDefault.Test", "SeedMultiUrlEnvironmentNoDefault.Test\SeedMultiUrlEnvironmentNoDefault.Test.csproj", "{D9F58694-4C20-4FC7-8196-CA0E9827A690}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D133FBE5-B247-4F10-B0FC-B879D4A1DFD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D133FBE5-B247-4F10-B0FC-B879D4A1DFD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D133FBE5-B247-4F10-B0FC-B879D4A1DFD5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D133FBE5-B247-4F10-B0FC-B879D4A1DFD5}.Release|Any CPU.Build.0 = Release|Any CPU + {D9F58694-4C20-4FC7-8196-CA0E9827A690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9F58694-4C20-4FC7-8196-CA0E9827A690}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9F58694-4C20-4FC7-8196-CA0E9827A690}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9F58694-4C20-4FC7-8196-CA0E9827A690}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj index 51eaaff5ec5..5d252eaba4d 100644 --- a/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj +++ b/seed/csharp-model/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-url-environment-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs index 97b730a1d15..776e5e0e276 100644 --- a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj index 5e0f767ca4e..7ae35da5d41 100644 --- a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj +++ b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.sln b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.sln new file mode 100644 index 00000000000..5eb86b3d25a --- /dev/null +++ b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironment", "SeedMultiUrlEnvironment\SeedMultiUrlEnvironment.csproj", "{A2EF5186-4564-4730-A63E-93FAB01EDDE6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironment.Test", "SeedMultiUrlEnvironment.Test\SeedMultiUrlEnvironment.Test.csproj", "{538A32BC-DE74-43E0-A4BD-9E3284414068}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A2EF5186-4564-4730-A63E-93FAB01EDDE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2EF5186-4564-4730-A63E-93FAB01EDDE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2EF5186-4564-4730-A63E-93FAB01EDDE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2EF5186-4564-4730-A63E-93FAB01EDDE6}.Release|Any CPU.Build.0 = Release|Any CPU + {538A32BC-DE74-43E0-A4BD-9E3284414068}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {538A32BC-DE74-43E0-A4BD-9E3284414068}.Debug|Any CPU.Build.0 = Debug|Any CPU + {538A32BC-DE74-43E0-A4BD-9E3284414068}.Release|Any CPU.ActiveCfg = Release|Any CPU + {538A32BC-DE74-43E0-A4BD-9E3284414068}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj index 5a82626c6f2..ad2c91ed33b 100644 --- a/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj +++ b/seed/csharp-model/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-url-environment/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs index 910ac3d09d2..5639b53bf2e 100644 --- a/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj b/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj index f062ca0f8c3..9c5b00fd83a 100644 --- a/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj +++ b/seed/csharp-model/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/no-environment/src/SeedNoEnvironment.sln b/seed/csharp-model/no-environment/src/SeedNoEnvironment.sln new file mode 100644 index 00000000000..4602e2f69eb --- /dev/null +++ b/seed/csharp-model/no-environment/src/SeedNoEnvironment.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNoEnvironment", "SeedNoEnvironment\SeedNoEnvironment.csproj", "{E879CF2F-5F91-42C5-A700-714BBF6BC1E7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNoEnvironment.Test", "SeedNoEnvironment.Test\SeedNoEnvironment.Test.csproj", "{8A1AC0F0-489F-4CA9-9419-AAC9876E8E6F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E879CF2F-5F91-42C5-A700-714BBF6BC1E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E879CF2F-5F91-42C5-A700-714BBF6BC1E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E879CF2F-5F91-42C5-A700-714BBF6BC1E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E879CF2F-5F91-42C5-A700-714BBF6BC1E7}.Release|Any CPU.Build.0 = Release|Any CPU + {8A1AC0F0-489F-4CA9-9419-AAC9876E8E6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A1AC0F0-489F-4CA9-9419-AAC9876E8E6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A1AC0F0-489F-4CA9-9419-AAC9876E8E6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A1AC0F0-489F-4CA9-9419-AAC9876E8E6F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj b/seed/csharp-model/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj index c0f7234b23d..219f885a821 100644 --- a/seed/csharp-model/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj +++ b/seed/csharp-model/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/no-environment/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs index c1d70b38a18..6b0e97c3b29 100644 --- a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj index 303d4fa579f..0b8603958fd 100644 --- a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj +++ b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln new file mode 100644 index 00000000000..6a94012ecca --- /dev/null +++ b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsDefault", "SeedOauthClientCredentialsDefault\SeedOauthClientCredentialsDefault.csproj", "{713E0E32-EC03-448C-95DF-B7158ECBDA8C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsDefault.Test", "SeedOauthClientCredentialsDefault.Test\SeedOauthClientCredentialsDefault.Test.csproj", "{B135EF01-815F-4B0C-A4CF-AD6100EA65DC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {713E0E32-EC03-448C-95DF-B7158ECBDA8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {713E0E32-EC03-448C-95DF-B7158ECBDA8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {713E0E32-EC03-448C-95DF-B7158ECBDA8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {713E0E32-EC03-448C-95DF-B7158ECBDA8C}.Release|Any CPU.Build.0 = Release|Any CPU + {B135EF01-815F-4B0C-A4CF-AD6100EA65DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B135EF01-815F-4B0C-A4CF-AD6100EA65DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B135EF01-815F-4B0C-A4CF-AD6100EA65DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B135EF01-815F-4B0C-A4CF-AD6100EA65DC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj index 5aedc8325d3..29092628378 100644 --- a/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj +++ b/seed/csharp-model/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 10745c93e49..fadd40343c1 100644 --- a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj index 337ff7f37fe..8b98b4fafd6 100644 --- a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj +++ b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln new file mode 100644 index 00000000000..7f2ce34ebec --- /dev/null +++ b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsEnvironmentVariables", "SeedOauthClientCredentialsEnvironmentVariables\SeedOauthClientCredentialsEnvironmentVariables.csproj", "{D33A90C1-5A26-4476-944A-9ADDE5036B2D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsEnvironmentVariables.Test", "SeedOauthClientCredentialsEnvironmentVariables.Test\SeedOauthClientCredentialsEnvironmentVariables.Test.csproj", "{ACA9DEB0-D8F2-4835-9E5C-08E328BC5CE5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D33A90C1-5A26-4476-944A-9ADDE5036B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D33A90C1-5A26-4476-944A-9ADDE5036B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D33A90C1-5A26-4476-944A-9ADDE5036B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D33A90C1-5A26-4476-944A-9ADDE5036B2D}.Release|Any CPU.Build.0 = Release|Any CPU + {ACA9DEB0-D8F2-4835-9E5C-08E328BC5CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACA9DEB0-D8F2-4835-9E5C-08E328BC5CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACA9DEB0-D8F2-4835-9E5C-08E328BC5CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACA9DEB0-D8F2-4835-9E5C-08E328BC5CE5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj index 4591edfdd17..99933463ed0 100644 --- a/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj +++ b/seed/csharp-model/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs index c00bdefe55d..6f72130b8d7 100644 --- a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj index d1a720a2e07..fd48c7fec2f 100644 --- a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj +++ b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln new file mode 100644 index 00000000000..59ed7108bc5 --- /dev/null +++ b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials", "SeedOauthClientCredentials\SeedOauthClientCredentials.csproj", "{3ADC5479-8004-46B8-87C1-53122A02E99C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials.Test", "SeedOauthClientCredentials.Test\SeedOauthClientCredentials.Test.csproj", "{3FB000ED-C83F-4662-A758-068E8E2522A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3ADC5479-8004-46B8-87C1-53122A02E99C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3ADC5479-8004-46B8-87C1-53122A02E99C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3ADC5479-8004-46B8-87C1-53122A02E99C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3ADC5479-8004-46B8-87C1-53122A02E99C}.Release|Any CPU.Build.0 = Release|Any CPU + {3FB000ED-C83F-4662-A758-068E8E2522A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FB000ED-C83F-4662-A758-068E8E2522A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FB000ED-C83F-4662-A758-068E8E2522A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FB000ED-C83F-4662-A758-068E8E2522A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj index c554e2d176e..f563a99a064 100644 --- a/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj +++ b/seed/csharp-model/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-nested-root/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs index c00bdefe55d..6f72130b8d7 100644 --- a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj index d1a720a2e07..fd48c7fec2f 100644 --- a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj +++ b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.sln b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.sln new file mode 100644 index 00000000000..b4859701e98 --- /dev/null +++ b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials", "SeedOauthClientCredentials\SeedOauthClientCredentials.csproj", "{44C1788F-1A2B-4EA6-B2D5-6627742FCCEA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials.Test", "SeedOauthClientCredentials.Test\SeedOauthClientCredentials.Test.csproj", "{F3648CDD-5394-4232-A1F3-BD8D1E75538B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {44C1788F-1A2B-4EA6-B2D5-6627742FCCEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44C1788F-1A2B-4EA6-B2D5-6627742FCCEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44C1788F-1A2B-4EA6-B2D5-6627742FCCEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44C1788F-1A2B-4EA6-B2D5-6627742FCCEA}.Release|Any CPU.Build.0 = Release|Any CPU + {F3648CDD-5394-4232-A1F3-BD8D1E75538B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3648CDD-5394-4232-A1F3-BD8D1E75538B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3648CDD-5394-4232-A1F3-BD8D1E75538B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3648CDD-5394-4232-A1F3-BD8D1E75538B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj index b53e47a4b60..e76fccfd20c 100644 --- a/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj +++ b/seed/csharp-model/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/object/src/SeedObject.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/object/src/SeedObject.Test/Core/EnumSerializerTests.cs index c1c31795ba1..8abc0743d8c 100644 --- a/seed/csharp-model/object/src/SeedObject.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/object/src/SeedObject.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/object/src/SeedObject.Test/SeedObject.Test.csproj b/seed/csharp-model/object/src/SeedObject.Test/SeedObject.Test.csproj index e3e7176141c..be19774f42e 100644 --- a/seed/csharp-model/object/src/SeedObject.Test/SeedObject.Test.csproj +++ b/seed/csharp-model/object/src/SeedObject.Test/SeedObject.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/object/src/SeedObject.sln b/seed/csharp-model/object/src/SeedObject.sln new file mode 100644 index 00000000000..253d8ac0356 --- /dev/null +++ b/seed/csharp-model/object/src/SeedObject.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject", "SeedObject\SeedObject.csproj", "{E13A1EBA-5961-498E-ADBA-2F74144788D7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject.Test", "SeedObject.Test\SeedObject.Test.csproj", "{BC153607-500D-46E1-9EFF-8373EAC86DCA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E13A1EBA-5961-498E-ADBA-2F74144788D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E13A1EBA-5961-498E-ADBA-2F74144788D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E13A1EBA-5961-498E-ADBA-2F74144788D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E13A1EBA-5961-498E-ADBA-2F74144788D7}.Release|Any CPU.Build.0 = Release|Any CPU + {BC153607-500D-46E1-9EFF-8373EAC86DCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC153607-500D-46E1-9EFF-8373EAC86DCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC153607-500D-46E1-9EFF-8373EAC86DCA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC153607-500D-46E1-9EFF-8373EAC86DCA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/object/src/SeedObject/SeedObject.csproj b/seed/csharp-model/object/src/SeedObject/SeedObject.csproj index 8b4e5f67380..7acf4369921 100644 --- a/seed/csharp-model/object/src/SeedObject/SeedObject.csproj +++ b/seed/csharp-model/object/src/SeedObject/SeedObject.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/object/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs index d3067ec2908..9f7eee6cff1 100644 --- a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj index 451fdd3df70..db71b5887ed 100644 --- a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj +++ b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.sln b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.sln new file mode 100644 index 00000000000..23d1ad5a679 --- /dev/null +++ b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports", "SeedObjectsWithImports\SeedObjectsWithImports.csproj", "{666446E1-815B-43CE-BAD2-496D79283DEC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports.Test", "SeedObjectsWithImports.Test\SeedObjectsWithImports.Test.csproj", "{0E823FB9-E1A5-46A9-924D-1E394C81C0FE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {666446E1-815B-43CE-BAD2-496D79283DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {666446E1-815B-43CE-BAD2-496D79283DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {666446E1-815B-43CE-BAD2-496D79283DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {666446E1-815B-43CE-BAD2-496D79283DEC}.Release|Any CPU.Build.0 = Release|Any CPU + {0E823FB9-E1A5-46A9-924D-1E394C81C0FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E823FB9-E1A5-46A9-924D-1E394C81C0FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E823FB9-E1A5-46A9-924D-1E394C81C0FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E823FB9-E1A5-46A9-924D-1E394C81C0FE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj index 02e37113366..2bf274f3cda 100644 --- a/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj +++ b/seed/csharp-model/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/objects-with-imports/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs index d3067ec2908..9f7eee6cff1 100644 --- a/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj b/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj index 451fdd3df70..db71b5887ed 100644 --- a/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj +++ b/seed/csharp-model/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/optional/src/SeedObjectsWithImports.sln b/seed/csharp-model/optional/src/SeedObjectsWithImports.sln new file mode 100644 index 00000000000..0c19d2c7525 --- /dev/null +++ b/seed/csharp-model/optional/src/SeedObjectsWithImports.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports", "SeedObjectsWithImports\SeedObjectsWithImports.csproj", "{263C2C25-B6A5-45D6-9106-87F9F8C4F482}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports.Test", "SeedObjectsWithImports.Test\SeedObjectsWithImports.Test.csproj", "{A3471B04-2E18-4B60-8D67-C5516A63FC06}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {263C2C25-B6A5-45D6-9106-87F9F8C4F482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {263C2C25-B6A5-45D6-9106-87F9F8C4F482}.Debug|Any CPU.Build.0 = Debug|Any CPU + {263C2C25-B6A5-45D6-9106-87F9F8C4F482}.Release|Any CPU.ActiveCfg = Release|Any CPU + {263C2C25-B6A5-45D6-9106-87F9F8C4F482}.Release|Any CPU.Build.0 = Release|Any CPU + {A3471B04-2E18-4B60-8D67-C5516A63FC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3471B04-2E18-4B60-8D67-C5516A63FC06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3471B04-2E18-4B60-8D67-C5516A63FC06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3471B04-2E18-4B60-8D67-C5516A63FC06}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj b/seed/csharp-model/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj index d47a80b4c0f..891f296d8c4 100644 --- a/seed/csharp-model/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj +++ b/seed/csharp-model/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/optional/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs index 9ba79d17324..46aba9a0a50 100644 --- a/seed/csharp-model/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj b/seed/csharp-model/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj index f3b0434d07c..81c7d862247 100644 --- a/seed/csharp-model/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj +++ b/seed/csharp-model/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/package-yml/src/SeedPackageYml.sln b/seed/csharp-model/package-yml/src/SeedPackageYml.sln new file mode 100644 index 00000000000..8d859935d0b --- /dev/null +++ b/seed/csharp-model/package-yml/src/SeedPackageYml.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPackageYml", "SeedPackageYml\SeedPackageYml.csproj", "{232AFC0E-9AD1-4836-9132-8D639A5B0744}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPackageYml.Test", "SeedPackageYml.Test\SeedPackageYml.Test.csproj", "{4CE378AF-E9C9-417F-AAC6-A6B515ADA2E7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {232AFC0E-9AD1-4836-9132-8D639A5B0744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {232AFC0E-9AD1-4836-9132-8D639A5B0744}.Debug|Any CPU.Build.0 = Debug|Any CPU + {232AFC0E-9AD1-4836-9132-8D639A5B0744}.Release|Any CPU.ActiveCfg = Release|Any CPU + {232AFC0E-9AD1-4836-9132-8D639A5B0744}.Release|Any CPU.Build.0 = Release|Any CPU + {4CE378AF-E9C9-417F-AAC6-A6B515ADA2E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CE378AF-E9C9-417F-AAC6-A6B515ADA2E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CE378AF-E9C9-417F-AAC6-A6B515ADA2E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CE378AF-E9C9-417F-AAC6-A6B515ADA2E7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/package-yml/src/SeedPackageYml/SeedPackageYml.csproj b/seed/csharp-model/package-yml/src/SeedPackageYml/SeedPackageYml.csproj index 973121988bd..03aa56ded86 100644 --- a/seed/csharp-model/package-yml/src/SeedPackageYml/SeedPackageYml.csproj +++ b/seed/csharp-model/package-yml/src/SeedPackageYml/SeedPackageYml.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/package-yml/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs index 127558e58f1..fc7094754e6 100644 --- a/seed/csharp-model/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj b/seed/csharp-model/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj index 97679294a55..aac18528c02 100644 --- a/seed/csharp-model/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj +++ b/seed/csharp-model/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/pagination/src/SeedPagination.sln b/seed/csharp-model/pagination/src/SeedPagination.sln new file mode 100644 index 00000000000..343c75e6098 --- /dev/null +++ b/seed/csharp-model/pagination/src/SeedPagination.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPagination", "SeedPagination\SeedPagination.csproj", "{52465946-C278-48AD-AD1C-E4FD55E0DB16}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPagination.Test", "SeedPagination.Test\SeedPagination.Test.csproj", "{BEE708C0-544B-4265-AF67-0A4EF2DDBA60}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52465946-C278-48AD-AD1C-E4FD55E0DB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52465946-C278-48AD-AD1C-E4FD55E0DB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52465946-C278-48AD-AD1C-E4FD55E0DB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52465946-C278-48AD-AD1C-E4FD55E0DB16}.Release|Any CPU.Build.0 = Release|Any CPU + {BEE708C0-544B-4265-AF67-0A4EF2DDBA60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEE708C0-544B-4265-AF67-0A4EF2DDBA60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEE708C0-544B-4265-AF67-0A4EF2DDBA60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEE708C0-544B-4265-AF67-0A4EF2DDBA60}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/pagination/src/SeedPagination/SeedPagination.csproj b/seed/csharp-model/pagination/src/SeedPagination/SeedPagination.csproj index ad764365cd6..5bc342bb1d1 100644 --- a/seed/csharp-model/pagination/src/SeedPagination/SeedPagination.csproj +++ b/seed/csharp-model/pagination/src/SeedPagination/SeedPagination.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/pagination/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs index 548110aa63e..afe1d6dfb4f 100644 --- a/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj b/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj index 26100094aee..5f3889c6202 100644 --- a/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj +++ b/seed/csharp-model/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/path-parameters/src/SeedPathParameters.sln b/seed/csharp-model/path-parameters/src/SeedPathParameters.sln new file mode 100644 index 00000000000..cb50f31527f --- /dev/null +++ b/seed/csharp-model/path-parameters/src/SeedPathParameters.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPathParameters", "SeedPathParameters\SeedPathParameters.csproj", "{D4AE39A7-CC83-4F7C-B258-D1697470CD9E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPathParameters.Test", "SeedPathParameters.Test\SeedPathParameters.Test.csproj", "{20928C80-3D82-4BA1-988D-427FAEDB1945}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D4AE39A7-CC83-4F7C-B258-D1697470CD9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4AE39A7-CC83-4F7C-B258-D1697470CD9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4AE39A7-CC83-4F7C-B258-D1697470CD9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4AE39A7-CC83-4F7C-B258-D1697470CD9E}.Release|Any CPU.Build.0 = Release|Any CPU + {20928C80-3D82-4BA1-988D-427FAEDB1945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20928C80-3D82-4BA1-988D-427FAEDB1945}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20928C80-3D82-4BA1-988D-427FAEDB1945}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20928C80-3D82-4BA1-988D-427FAEDB1945}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj b/seed/csharp-model/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj index ec82eb5bc3f..50da7ef91ee 100644 --- a/seed/csharp-model/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj +++ b/seed/csharp-model/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/path-parameters/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs index 8978fc9675f..cd1c4c71035 100644 --- a/seed/csharp-model/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj b/seed/csharp-model/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj index 0b8d3c5cf48..3b02ac9f932 100644 --- a/seed/csharp-model/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj +++ b/seed/csharp-model/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/plain-text/src/SeedPlainText.sln b/seed/csharp-model/plain-text/src/SeedPlainText.sln new file mode 100644 index 00000000000..6005c78f422 --- /dev/null +++ b/seed/csharp-model/plain-text/src/SeedPlainText.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPlainText", "SeedPlainText\SeedPlainText.csproj", "{467DA75F-73E7-44F4-BF0A-5F2D846AFD72}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPlainText.Test", "SeedPlainText.Test\SeedPlainText.Test.csproj", "{90874D7C-5699-45AC-B119-5B22FB9BD7E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {467DA75F-73E7-44F4-BF0A-5F2D846AFD72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {467DA75F-73E7-44F4-BF0A-5F2D846AFD72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {467DA75F-73E7-44F4-BF0A-5F2D846AFD72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {467DA75F-73E7-44F4-BF0A-5F2D846AFD72}.Release|Any CPU.Build.0 = Release|Any CPU + {90874D7C-5699-45AC-B119-5B22FB9BD7E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90874D7C-5699-45AC-B119-5B22FB9BD7E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90874D7C-5699-45AC-B119-5B22FB9BD7E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90874D7C-5699-45AC-B119-5B22FB9BD7E5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/plain-text/src/SeedPlainText/SeedPlainText.csproj b/seed/csharp-model/plain-text/src/SeedPlainText/SeedPlainText.csproj index fe0f17c9ea2..616b4052ecf 100644 --- a/seed/csharp-model/plain-text/src/SeedPlainText/SeedPlainText.csproj +++ b/seed/csharp-model/plain-text/src/SeedPlainText/SeedPlainText.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/plain-text/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs index 77c1afe5c53..7520bcd04c2 100644 --- a/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj b/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj index bc0d7861586..3b50df96fec 100644 --- a/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj +++ b/seed/csharp-model/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/query-parameters/src/SeedQueryParameters.sln b/seed/csharp-model/query-parameters/src/SeedQueryParameters.sln new file mode 100644 index 00000000000..a024f8ef374 --- /dev/null +++ b/seed/csharp-model/query-parameters/src/SeedQueryParameters.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedQueryParameters", "SeedQueryParameters\SeedQueryParameters.csproj", "{69EE97F0-91A3-475B-918F-603A7EDD022E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedQueryParameters.Test", "SeedQueryParameters.Test\SeedQueryParameters.Test.csproj", "{DEFFDABE-5A9C-4C7B-8881-4C693792DAFA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {69EE97F0-91A3-475B-918F-603A7EDD022E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69EE97F0-91A3-475B-918F-603A7EDD022E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69EE97F0-91A3-475B-918F-603A7EDD022E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69EE97F0-91A3-475B-918F-603A7EDD022E}.Release|Any CPU.Build.0 = Release|Any CPU + {DEFFDABE-5A9C-4C7B-8881-4C693792DAFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEFFDABE-5A9C-4C7B-8881-4C693792DAFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEFFDABE-5A9C-4C7B-8881-4C693792DAFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEFFDABE-5A9C-4C7B-8881-4C693792DAFA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj b/seed/csharp-model/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj index 858f418ed05..f95c34fa6b8 100644 --- a/seed/csharp-model/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj +++ b/seed/csharp-model/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/query-parameters/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs index 6e509f475bc..ea17672d755 100644 --- a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj index c9ba6a18b2d..74f9aaff825 100644 --- a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj +++ b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.sln b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.sln new file mode 100644 index 00000000000..73b30f77d20 --- /dev/null +++ b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNurseryApi", "SeedNurseryApi\SeedNurseryApi.csproj", "{7D65CC59-FCE6-4899-8293-778CC0C94A5F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNurseryApi.Test", "SeedNurseryApi.Test\SeedNurseryApi.Test.csproj", "{8FC0609A-8550-4D55-ABE6-4872455DB4B5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D65CC59-FCE6-4899-8293-778CC0C94A5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D65CC59-FCE6-4899-8293-778CC0C94A5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D65CC59-FCE6-4899-8293-778CC0C94A5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D65CC59-FCE6-4899-8293-778CC0C94A5F}.Release|Any CPU.Build.0 = Release|Any CPU + {8FC0609A-8550-4D55-ABE6-4872455DB4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FC0609A-8550-4D55-ABE6-4872455DB4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FC0609A-8550-4D55-ABE6-4872455DB4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FC0609A-8550-4D55-ABE6-4872455DB4B5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj index 3f5aeb0ceed..72613f485d7 100644 --- a/seed/csharp-model/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj +++ b/seed/csharp-model/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/reserved-keywords/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs index fbcad20a7ff..a5ced53c6f0 100644 --- a/seed/csharp-model/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj b/seed/csharp-model/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj index 863e54efc6b..1d97c50a616 100644 --- a/seed/csharp-model/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj +++ b/seed/csharp-model/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/response-property/src/SeedResponseProperty.sln b/seed/csharp-model/response-property/src/SeedResponseProperty.sln new file mode 100644 index 00000000000..f35e6d08df2 --- /dev/null +++ b/seed/csharp-model/response-property/src/SeedResponseProperty.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedResponseProperty", "SeedResponseProperty\SeedResponseProperty.csproj", "{7BCE7E22-77D8-483B-A173-0290958595C6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedResponseProperty.Test", "SeedResponseProperty.Test\SeedResponseProperty.Test.csproj", "{29FE7F73-F5D8-4C56-BAB1-5837350076D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7BCE7E22-77D8-483B-A173-0290958595C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BCE7E22-77D8-483B-A173-0290958595C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BCE7E22-77D8-483B-A173-0290958595C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BCE7E22-77D8-483B-A173-0290958595C6}.Release|Any CPU.Build.0 = Release|Any CPU + {29FE7F73-F5D8-4C56-BAB1-5837350076D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29FE7F73-F5D8-4C56-BAB1-5837350076D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29FE7F73-F5D8-4C56-BAB1-5837350076D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29FE7F73-F5D8-4C56-BAB1-5837350076D5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj b/seed/csharp-model/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj index 356f10e6e6e..34a267c69db 100644 --- a/seed/csharp-model/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj +++ b/seed/csharp-model/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/response-property/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs index 217f3977126..9473023217f 100644 --- a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj index d380eed7ff3..7f8fa6bf18f 100644 --- a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj +++ b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.sln b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.sln new file mode 100644 index 00000000000..c672dac5367 --- /dev/null +++ b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents", "SeedServerSentEvents\SeedServerSentEvents.csproj", "{AAC10B05-4AF4-48CF-AD52-5AC2CBAF99F6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents.Test", "SeedServerSentEvents.Test\SeedServerSentEvents.Test.csproj", "{C870743A-0AF9-4111-8339-FE6E57275688}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAC10B05-4AF4-48CF-AD52-5AC2CBAF99F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAC10B05-4AF4-48CF-AD52-5AC2CBAF99F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAC10B05-4AF4-48CF-AD52-5AC2CBAF99F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAC10B05-4AF4-48CF-AD52-5AC2CBAF99F6}.Release|Any CPU.Build.0 = Release|Any CPU + {C870743A-0AF9-4111-8339-FE6E57275688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C870743A-0AF9-4111-8339-FE6E57275688}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C870743A-0AF9-4111-8339-FE6E57275688}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C870743A-0AF9-4111-8339-FE6E57275688}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj index 07a1af2299f..6030a708eea 100644 --- a/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj +++ b/seed/csharp-model/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/server-sent-event-examples/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs index 217f3977126..9473023217f 100644 --- a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj index d380eed7ff3..7f8fa6bf18f 100644 --- a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj +++ b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.sln b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.sln new file mode 100644 index 00000000000..8ea2b6cffee --- /dev/null +++ b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents", "SeedServerSentEvents\SeedServerSentEvents.csproj", "{AC89CBDA-FC5A-4431-BA81-BCF6AE2250ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents.Test", "SeedServerSentEvents.Test\SeedServerSentEvents.Test.csproj", "{3337498D-8023-45ED-AFF2-09127F4E4BEE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC89CBDA-FC5A-4431-BA81-BCF6AE2250ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC89CBDA-FC5A-4431-BA81-BCF6AE2250ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC89CBDA-FC5A-4431-BA81-BCF6AE2250ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC89CBDA-FC5A-4431-BA81-BCF6AE2250ED}.Release|Any CPU.Build.0 = Release|Any CPU + {3337498D-8023-45ED-AFF2-09127F4E4BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3337498D-8023-45ED-AFF2-09127F4E4BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3337498D-8023-45ED-AFF2-09127F4E4BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3337498D-8023-45ED-AFF2-09127F4E4BEE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj index f8d304a7f68..1af94d3b41a 100644 --- a/seed/csharp-model/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj +++ b/seed/csharp-model/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/server-sent-events/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-model/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-model/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-model/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-model/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/simple-fhir/src/SeedApi.sln b/seed/csharp-model/simple-fhir/src/SeedApi.sln new file mode 100644 index 00000000000..47e383c55c0 --- /dev/null +++ b/seed/csharp-model/simple-fhir/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{8495BE41-D51F-422E-872A-E28614EB3AA0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{D6CF246A-72D9-4DBF-9E7A-DEDA292BBAAF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8495BE41-D51F-422E-872A-E28614EB3AA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8495BE41-D51F-422E-872A-E28614EB3AA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8495BE41-D51F-422E-872A-E28614EB3AA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8495BE41-D51F-422E-872A-E28614EB3AA0}.Release|Any CPU.Build.0 = Release|Any CPU + {D6CF246A-72D9-4DBF-9E7A-DEDA292BBAAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6CF246A-72D9-4DBF-9E7A-DEDA292BBAAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6CF246A-72D9-4DBF-9E7A-DEDA292BBAAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6CF246A-72D9-4DBF-9E7A-DEDA292BBAAF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/simple-fhir/src/SeedApi/SeedApi.csproj b/seed/csharp-model/simple-fhir/src/SeedApi/SeedApi.csproj index 8566da2aab9..2d931645b7b 100644 --- a/seed/csharp-model/simple-fhir/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-model/simple-fhir/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/simple-fhir/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs index f41bdaaea18..07df691d3bb 100644 --- a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj index 2b081280a03..1a2dd4152f7 100644 --- a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj +++ b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln new file mode 100644 index 00000000000..0040429e66d --- /dev/null +++ b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentDefault", "SeedSingleUrlEnvironmentDefault\SeedSingleUrlEnvironmentDefault.csproj", "{70E64D2F-2979-4A11-B372-33672977514B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentDefault.Test", "SeedSingleUrlEnvironmentDefault.Test\SeedSingleUrlEnvironmentDefault.Test.csproj", "{D74B6A72-B0F4-4FF8-98C6-11DC46E0D888}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {70E64D2F-2979-4A11-B372-33672977514B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70E64D2F-2979-4A11-B372-33672977514B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70E64D2F-2979-4A11-B372-33672977514B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70E64D2F-2979-4A11-B372-33672977514B}.Release|Any CPU.Build.0 = Release|Any CPU + {D74B6A72-B0F4-4FF8-98C6-11DC46E0D888}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D74B6A72-B0F4-4FF8-98C6-11DC46E0D888}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D74B6A72-B0F4-4FF8-98C6-11DC46E0D888}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D74B6A72-B0F4-4FF8-98C6-11DC46E0D888}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj index 50c183e3277..5f32e1dcd35 100644 --- a/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj +++ b/seed/csharp-model/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/single-url-environment-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs index 627eb79f003..b4d073e3119 100644 --- a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj index bb541d7bc3c..970b922df3a 100644 --- a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj +++ b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln new file mode 100644 index 00000000000..9708b8d3eb3 --- /dev/null +++ b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentNoDefault", "SeedSingleUrlEnvironmentNoDefault\SeedSingleUrlEnvironmentNoDefault.csproj", "{CA62CBC1-D979-4C22-81C1-DE829123CF5D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentNoDefault.Test", "SeedSingleUrlEnvironmentNoDefault.Test\SeedSingleUrlEnvironmentNoDefault.Test.csproj", "{436622CC-4957-4254-BBF7-3685EE475029}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CA62CBC1-D979-4C22-81C1-DE829123CF5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA62CBC1-D979-4C22-81C1-DE829123CF5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA62CBC1-D979-4C22-81C1-DE829123CF5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA62CBC1-D979-4C22-81C1-DE829123CF5D}.Release|Any CPU.Build.0 = Release|Any CPU + {436622CC-4957-4254-BBF7-3685EE475029}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {436622CC-4957-4254-BBF7-3685EE475029}.Debug|Any CPU.Build.0 = Debug|Any CPU + {436622CC-4957-4254-BBF7-3685EE475029}.Release|Any CPU.ActiveCfg = Release|Any CPU + {436622CC-4957-4254-BBF7-3685EE475029}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj index fe83c620e20..dfa17a3d401 100644 --- a/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj +++ b/seed/csharp-model/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/single-url-environment-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs index 72453a319a0..b0fefdd9a52 100644 --- a/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj b/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj index 1a496777c8e..77d9031c2ce 100644 --- a/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj +++ b/seed/csharp-model/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/streaming-parameter/src/SeedStreaming.sln b/seed/csharp-model/streaming-parameter/src/SeedStreaming.sln new file mode 100644 index 00000000000..1c47b184b08 --- /dev/null +++ b/seed/csharp-model/streaming-parameter/src/SeedStreaming.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming", "SeedStreaming\SeedStreaming.csproj", "{56DAE2AA-D9BC-4EC4-8D45-7A39F6EB2131}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming.Test", "SeedStreaming.Test\SeedStreaming.Test.csproj", "{563AEEDF-4CED-42FC-BCFD-0FFCF037E8E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56DAE2AA-D9BC-4EC4-8D45-7A39F6EB2131}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56DAE2AA-D9BC-4EC4-8D45-7A39F6EB2131}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56DAE2AA-D9BC-4EC4-8D45-7A39F6EB2131}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56DAE2AA-D9BC-4EC4-8D45-7A39F6EB2131}.Release|Any CPU.Build.0 = Release|Any CPU + {563AEEDF-4CED-42FC-BCFD-0FFCF037E8E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {563AEEDF-4CED-42FC-BCFD-0FFCF037E8E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {563AEEDF-4CED-42FC-BCFD-0FFCF037E8E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {563AEEDF-4CED-42FC-BCFD-0FFCF037E8E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj b/seed/csharp-model/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj index 31a406d42be..e0ff2c2f255 100644 --- a/seed/csharp-model/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj +++ b/seed/csharp-model/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/streaming-parameter/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs index 72453a319a0..b0fefdd9a52 100644 --- a/seed/csharp-model/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj b/seed/csharp-model/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj index 1a496777c8e..77d9031c2ce 100644 --- a/seed/csharp-model/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj +++ b/seed/csharp-model/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/streaming/src/SeedStreaming.sln b/seed/csharp-model/streaming/src/SeedStreaming.sln new file mode 100644 index 00000000000..d54c17569bc --- /dev/null +++ b/seed/csharp-model/streaming/src/SeedStreaming.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming", "SeedStreaming\SeedStreaming.csproj", "{B255E88A-C8DD-4635-A66F-01043EE15D02}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming.Test", "SeedStreaming.Test\SeedStreaming.Test.csproj", "{9A412F18-EC00-4F52-A73E-DBC2DF8AF857}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B255E88A-C8DD-4635-A66F-01043EE15D02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B255E88A-C8DD-4635-A66F-01043EE15D02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B255E88A-C8DD-4635-A66F-01043EE15D02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B255E88A-C8DD-4635-A66F-01043EE15D02}.Release|Any CPU.Build.0 = Release|Any CPU + {9A412F18-EC00-4F52-A73E-DBC2DF8AF857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A412F18-EC00-4F52-A73E-DBC2DF8AF857}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A412F18-EC00-4F52-A73E-DBC2DF8AF857}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A412F18-EC00-4F52-A73E-DBC2DF8AF857}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/streaming/src/SeedStreaming/SeedStreaming.csproj b/seed/csharp-model/streaming/src/SeedStreaming/SeedStreaming.csproj index c77c04d7af8..244cf27f28b 100644 --- a/seed/csharp-model/streaming/src/SeedStreaming/SeedStreaming.csproj +++ b/seed/csharp-model/streaming/src/SeedStreaming/SeedStreaming.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/streaming/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs index 6a568332953..46d97ee294b 100644 --- a/seed/csharp-model/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/trace/src/SeedTrace.Test/SeedTrace.Test.csproj b/seed/csharp-model/trace/src/SeedTrace.Test/SeedTrace.Test.csproj index 399d362bf4b..ddcf1a5d704 100644 --- a/seed/csharp-model/trace/src/SeedTrace.Test/SeedTrace.Test.csproj +++ b/seed/csharp-model/trace/src/SeedTrace.Test/SeedTrace.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/trace/src/SeedTrace.sln b/seed/csharp-model/trace/src/SeedTrace.sln new file mode 100644 index 00000000000..a51bc0a6835 --- /dev/null +++ b/seed/csharp-model/trace/src/SeedTrace.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedTrace", "SeedTrace\SeedTrace.csproj", "{C88F4B9A-76A4-4C26-B0B0-C7EE9859CB60}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedTrace.Test", "SeedTrace.Test\SeedTrace.Test.csproj", "{DD05F5E6-2605-40D0-A5FF-CFC98E97DEBD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C88F4B9A-76A4-4C26-B0B0-C7EE9859CB60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C88F4B9A-76A4-4C26-B0B0-C7EE9859CB60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C88F4B9A-76A4-4C26-B0B0-C7EE9859CB60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C88F4B9A-76A4-4C26-B0B0-C7EE9859CB60}.Release|Any CPU.Build.0 = Release|Any CPU + {DD05F5E6-2605-40D0-A5FF-CFC98E97DEBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD05F5E6-2605-40D0-A5FF-CFC98E97DEBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD05F5E6-2605-40D0-A5FF-CFC98E97DEBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD05F5E6-2605-40D0-A5FF-CFC98E97DEBD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/trace/src/SeedTrace/SeedTrace.csproj b/seed/csharp-model/trace/src/SeedTrace/SeedTrace.csproj index 548146119e0..951a7994781 100644 --- a/seed/csharp-model/trace/src/SeedTrace/SeedTrace.csproj +++ b/seed/csharp-model/trace/src/SeedTrace/SeedTrace.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/trace/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs index 5266b03a510..cd47208fb34 100644 --- a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj index e2bb610631d..c08f58082d3 100644 --- a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj +++ b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln new file mode 100644 index 00000000000..08e426969e3 --- /dev/null +++ b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUndiscriminatedUnions", "SeedUndiscriminatedUnions\SeedUndiscriminatedUnions.csproj", "{AD645789-9465-4E4B-95E7-1F0AC2E8315E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUndiscriminatedUnions.Test", "SeedUndiscriminatedUnions.Test\SeedUndiscriminatedUnions.Test.csproj", "{848E0BCE-A83A-41D1-B9FE-FC6905FDE7BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD645789-9465-4E4B-95E7-1F0AC2E8315E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD645789-9465-4E4B-95E7-1F0AC2E8315E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD645789-9465-4E4B-95E7-1F0AC2E8315E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD645789-9465-4E4B-95E7-1F0AC2E8315E}.Release|Any CPU.Build.0 = Release|Any CPU + {848E0BCE-A83A-41D1-B9FE-FC6905FDE7BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {848E0BCE-A83A-41D1-B9FE-FC6905FDE7BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {848E0BCE-A83A-41D1-B9FE-FC6905FDE7BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {848E0BCE-A83A-41D1-B9FE-FC6905FDE7BB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj index 95bea173532..bdfcbba40ff 100644 --- a/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj +++ b/seed/csharp-model/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/undiscriminated-unions/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs index 0516ffc357b..d0a072a0128 100644 --- a/seed/csharp-model/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/unions/src/SeedUnions.Test/SeedUnions.Test.csproj b/seed/csharp-model/unions/src/SeedUnions.Test/SeedUnions.Test.csproj index d299c9c615a..1aab7bd3a92 100644 --- a/seed/csharp-model/unions/src/SeedUnions.Test/SeedUnions.Test.csproj +++ b/seed/csharp-model/unions/src/SeedUnions.Test/SeedUnions.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/unions/src/SeedUnions.sln b/seed/csharp-model/unions/src/SeedUnions.sln new file mode 100644 index 00000000000..388de3c2211 --- /dev/null +++ b/seed/csharp-model/unions/src/SeedUnions.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnions", "SeedUnions\SeedUnions.csproj", "{7CB9B6E3-676A-4350-8E1E-C61E9F15FBAD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnions.Test", "SeedUnions.Test\SeedUnions.Test.csproj", "{9F557ED7-B551-478C-9823-1ACF46547949}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7CB9B6E3-676A-4350-8E1E-C61E9F15FBAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CB9B6E3-676A-4350-8E1E-C61E9F15FBAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CB9B6E3-676A-4350-8E1E-C61E9F15FBAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CB9B6E3-676A-4350-8E1E-C61E9F15FBAD}.Release|Any CPU.Build.0 = Release|Any CPU + {9F557ED7-B551-478C-9823-1ACF46547949}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F557ED7-B551-478C-9823-1ACF46547949}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F557ED7-B551-478C-9823-1ACF46547949}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F557ED7-B551-478C-9823-1ACF46547949}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/unions/src/SeedUnions/SeedUnions.csproj b/seed/csharp-model/unions/src/SeedUnions/SeedUnions.csproj index 3060ef0c6d8..6c7bd690969 100644 --- a/seed/csharp-model/unions/src/SeedUnions/SeedUnions.csproj +++ b/seed/csharp-model/unions/src/SeedUnions/SeedUnions.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/unions/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs index 9b5b930b507..e2022c27501 100644 --- a/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj b/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj index 4657f547dbe..a79c4d294b8 100644 --- a/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj +++ b/seed/csharp-model/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/unknown/src/SeedUnknownAsAny.sln b/seed/csharp-model/unknown/src/SeedUnknownAsAny.sln new file mode 100644 index 00000000000..47cb74a001d --- /dev/null +++ b/seed/csharp-model/unknown/src/SeedUnknownAsAny.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnknownAsAny", "SeedUnknownAsAny\SeedUnknownAsAny.csproj", "{7D914371-3399-49CF-8B2D-5814065D4861}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnknownAsAny.Test", "SeedUnknownAsAny.Test\SeedUnknownAsAny.Test.csproj", "{381B6904-9052-4EBA-B078-24D941E3A629}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D914371-3399-49CF-8B2D-5814065D4861}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D914371-3399-49CF-8B2D-5814065D4861}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D914371-3399-49CF-8B2D-5814065D4861}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D914371-3399-49CF-8B2D-5814065D4861}.Release|Any CPU.Build.0 = Release|Any CPU + {381B6904-9052-4EBA-B078-24D941E3A629}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {381B6904-9052-4EBA-B078-24D941E3A629}.Debug|Any CPU.Build.0 = Debug|Any CPU + {381B6904-9052-4EBA-B078-24D941E3A629}.Release|Any CPU.ActiveCfg = Release|Any CPU + {381B6904-9052-4EBA-B078-24D941E3A629}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj b/seed/csharp-model/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj index 3bde5636f99..7d078c15588 100644 --- a/seed/csharp-model/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj +++ b/seed/csharp-model/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/unknown/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs index 59dddfa32ef..3f62fc7204d 100644 --- a/seed/csharp-model/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/validation/src/SeedValidation.Test/SeedValidation.Test.csproj b/seed/csharp-model/validation/src/SeedValidation.Test/SeedValidation.Test.csproj index 902a8f55981..7265c8587af 100644 --- a/seed/csharp-model/validation/src/SeedValidation.Test/SeedValidation.Test.csproj +++ b/seed/csharp-model/validation/src/SeedValidation.Test/SeedValidation.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/validation/src/SeedValidation.sln b/seed/csharp-model/validation/src/SeedValidation.sln new file mode 100644 index 00000000000..b0cb1f85dd4 --- /dev/null +++ b/seed/csharp-model/validation/src/SeedValidation.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedValidation", "SeedValidation\SeedValidation.csproj", "{6864E747-72E6-46CD-8A88-FA9B10E553DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedValidation.Test", "SeedValidation.Test\SeedValidation.Test.csproj", "{04273FD6-F88C-41DE-B825-79E3DC32553D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6864E747-72E6-46CD-8A88-FA9B10E553DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6864E747-72E6-46CD-8A88-FA9B10E553DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6864E747-72E6-46CD-8A88-FA9B10E553DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6864E747-72E6-46CD-8A88-FA9B10E553DC}.Release|Any CPU.Build.0 = Release|Any CPU + {04273FD6-F88C-41DE-B825-79E3DC32553D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04273FD6-F88C-41DE-B825-79E3DC32553D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04273FD6-F88C-41DE-B825-79E3DC32553D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04273FD6-F88C-41DE-B825-79E3DC32553D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/validation/src/SeedValidation/SeedValidation.csproj b/seed/csharp-model/validation/src/SeedValidation/SeedValidation.csproj index c50cd7d7ab5..b6c0008c8a2 100644 --- a/seed/csharp-model/validation/src/SeedValidation/SeedValidation.csproj +++ b/seed/csharp-model/validation/src/SeedValidation/SeedValidation.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/validation/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs index 823797580ec..1c16afb4ce2 100644 --- a/seed/csharp-model/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/variables/src/SeedVariables.Test/SeedVariables.Test.csproj b/seed/csharp-model/variables/src/SeedVariables.Test/SeedVariables.Test.csproj index 4e008c367ca..476174f5e6e 100644 --- a/seed/csharp-model/variables/src/SeedVariables.Test/SeedVariables.Test.csproj +++ b/seed/csharp-model/variables/src/SeedVariables.Test/SeedVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/variables/src/SeedVariables.sln b/seed/csharp-model/variables/src/SeedVariables.sln new file mode 100644 index 00000000000..1ca3808d40f --- /dev/null +++ b/seed/csharp-model/variables/src/SeedVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVariables", "SeedVariables\SeedVariables.csproj", "{062B156E-8652-442A-A946-331AB3F70C2B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVariables.Test", "SeedVariables.Test\SeedVariables.Test.csproj", "{CAF3E9E4-DC04-4639-8969-39357DE0C9F0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {062B156E-8652-442A-A946-331AB3F70C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {062B156E-8652-442A-A946-331AB3F70C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {062B156E-8652-442A-A946-331AB3F70C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {062B156E-8652-442A-A946-331AB3F70C2B}.Release|Any CPU.Build.0 = Release|Any CPU + {CAF3E9E4-DC04-4639-8969-39357DE0C9F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAF3E9E4-DC04-4639-8969-39357DE0C9F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAF3E9E4-DC04-4639-8969-39357DE0C9F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAF3E9E4-DC04-4639-8969-39357DE0C9F0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/variables/src/SeedVariables/SeedVariables.csproj b/seed/csharp-model/variables/src/SeedVariables/SeedVariables.csproj index c4d48c57862..8fac957d946 100644 --- a/seed/csharp-model/variables/src/SeedVariables/SeedVariables.csproj +++ b/seed/csharp-model/variables/src/SeedVariables/SeedVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs index ba889dc5891..583da3c0d05 100644 --- a/seed/csharp-model/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj b/seed/csharp-model/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj index ea1b8396b51..22fcd57b3cb 100644 --- a/seed/csharp-model/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj +++ b/seed/csharp-model/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/version-no-default/src/SeedVersion.sln b/seed/csharp-model/version-no-default/src/SeedVersion.sln new file mode 100644 index 00000000000..d2cbb07ab7d --- /dev/null +++ b/seed/csharp-model/version-no-default/src/SeedVersion.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion", "SeedVersion\SeedVersion.csproj", "{998E0B51-3C88-4028-909F-FBE8903EF9C9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion.Test", "SeedVersion.Test\SeedVersion.Test.csproj", "{C947BD8B-3E6C-4773-8021-8379AA69C8A2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {998E0B51-3C88-4028-909F-FBE8903EF9C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {998E0B51-3C88-4028-909F-FBE8903EF9C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {998E0B51-3C88-4028-909F-FBE8903EF9C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {998E0B51-3C88-4028-909F-FBE8903EF9C9}.Release|Any CPU.Build.0 = Release|Any CPU + {C947BD8B-3E6C-4773-8021-8379AA69C8A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C947BD8B-3E6C-4773-8021-8379AA69C8A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C947BD8B-3E6C-4773-8021-8379AA69C8A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C947BD8B-3E6C-4773-8021-8379AA69C8A2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/version-no-default/src/SeedVersion/SeedVersion.csproj b/seed/csharp-model/version-no-default/src/SeedVersion/SeedVersion.csproj index 19973c99154..16eef82397a 100644 --- a/seed/csharp-model/version-no-default/src/SeedVersion/SeedVersion.csproj +++ b/seed/csharp-model/version-no-default/src/SeedVersion/SeedVersion.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/version-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs index ba889dc5891..583da3c0d05 100644 --- a/seed/csharp-model/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/version/src/SeedVersion.Test/SeedVersion.Test.csproj b/seed/csharp-model/version/src/SeedVersion.Test/SeedVersion.Test.csproj index ea1b8396b51..22fcd57b3cb 100644 --- a/seed/csharp-model/version/src/SeedVersion.Test/SeedVersion.Test.csproj +++ b/seed/csharp-model/version/src/SeedVersion.Test/SeedVersion.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/version/src/SeedVersion.sln b/seed/csharp-model/version/src/SeedVersion.sln new file mode 100644 index 00000000000..2cf905d05f3 --- /dev/null +++ b/seed/csharp-model/version/src/SeedVersion.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion", "SeedVersion\SeedVersion.csproj", "{2789145C-D780-483B-832E-82840C250614}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion.Test", "SeedVersion.Test\SeedVersion.Test.csproj", "{1B40ADD2-D34F-4835-BC4A-CAA2FD43442E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2789145C-D780-483B-832E-82840C250614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2789145C-D780-483B-832E-82840C250614}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2789145C-D780-483B-832E-82840C250614}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2789145C-D780-483B-832E-82840C250614}.Release|Any CPU.Build.0 = Release|Any CPU + {1B40ADD2-D34F-4835-BC4A-CAA2FD43442E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B40ADD2-D34F-4835-BC4A-CAA2FD43442E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B40ADD2-D34F-4835-BC4A-CAA2FD43442E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B40ADD2-D34F-4835-BC4A-CAA2FD43442E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/version/src/SeedVersion/SeedVersion.csproj b/seed/csharp-model/version/src/SeedVersion/SeedVersion.csproj index 7279f5a2757..1b47c88610f 100644 --- a/seed/csharp-model/version/src/SeedVersion/SeedVersion.csproj +++ b/seed/csharp-model/version/src/SeedVersion/SeedVersion.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/version/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-model/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs index 901b507973e..dcfcd3eed5a 100644 --- a/seed/csharp-model/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-model/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-model/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj b/seed/csharp-model/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj index b51b25a8b42..b1ba647bca0 100644 --- a/seed/csharp-model/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj +++ b/seed/csharp-model/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-model/websocket/src/SeedWebsocket.sln b/seed/csharp-model/websocket/src/SeedWebsocket.sln new file mode 100644 index 00000000000..28c11494884 --- /dev/null +++ b/seed/csharp-model/websocket/src/SeedWebsocket.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedWebsocket", "SeedWebsocket\SeedWebsocket.csproj", "{46EF288A-6261-493A-8021-1CE80DE30B78}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedWebsocket.Test", "SeedWebsocket.Test\SeedWebsocket.Test.csproj", "{80EEFB6B-E44D-4FB1-AB19-FFC9CF37B8F7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {46EF288A-6261-493A-8021-1CE80DE30B78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46EF288A-6261-493A-8021-1CE80DE30B78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46EF288A-6261-493A-8021-1CE80DE30B78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46EF288A-6261-493A-8021-1CE80DE30B78}.Release|Any CPU.Build.0 = Release|Any CPU + {80EEFB6B-E44D-4FB1-AB19-FFC9CF37B8F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80EEFB6B-E44D-4FB1-AB19-FFC9CF37B8F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80EEFB6B-E44D-4FB1-AB19-FFC9CF37B8F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80EEFB6B-E44D-4FB1-AB19-FFC9CF37B8F7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-model/websocket/src/SeedWebsocket/SeedWebsocket.csproj b/seed/csharp-model/websocket/src/SeedWebsocket/SeedWebsocket.csproj index a2a6736d8d7..1c75b3e274d 100644 --- a/seed/csharp-model/websocket/src/SeedWebsocket/SeedWebsocket.csproj +++ b/seed/csharp-model/websocket/src/SeedWebsocket/SeedWebsocket.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/websocket/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/.gitignore b/seed/csharp-sdk/.gitignore deleted file mode 100644 index dfe1fb64d82..00000000000 --- a/seed/csharp-sdk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -**/*.sln \ No newline at end of file diff --git a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs index e9f45b46a00..afe99daa324 100644 --- a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj index 84a91a23f46..a096140ec2c 100644 --- a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj +++ b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/SeedAliasExtends.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Unit/MockServer/BaseMockServerTest.cs index d996ae86bf2..5aa01804fae 100644 --- a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.sln b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.sln new file mode 100644 index 00000000000..a9679fa2baf --- /dev/null +++ b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAliasExtends", "SeedAliasExtends\SeedAliasExtends.csproj", "{60A2DB17-546C-48EE-8C0F-FE41C774A518}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAliasExtends.Test", "SeedAliasExtends.Test\SeedAliasExtends.Test.csproj", "{CBBF564A-AFE4-4610-8A56-096A86B3F913}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60A2DB17-546C-48EE-8C0F-FE41C774A518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60A2DB17-546C-48EE-8C0F-FE41C774A518}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60A2DB17-546C-48EE-8C0F-FE41C774A518}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60A2DB17-546C-48EE-8C0F-FE41C774A518}.Release|Any CPU.Build.0 = Release|Any CPU + {CBBF564A-AFE4-4610-8A56-096A86B3F913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBBF564A-AFE4-4610-8A56-096A86B3F913}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBBF564A-AFE4-4610-8A56-096A86B3F913}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBBF564A-AFE4-4610-8A56-096A86B3F913}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj index e2ac4b36b8a..7a4688de872 100644 --- a/seed/csharp-sdk/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj +++ b/seed/csharp-sdk/alias-extends/src/SeedAliasExtends/SeedAliasExtends.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/alias-extends/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs index 357a10f90ba..b48c2e6729a 100644 --- a/seed/csharp-sdk/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/alias/src/SeedAlias.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/alias/src/SeedAlias.Test/SeedAlias.Test.csproj b/seed/csharp-sdk/alias/src/SeedAlias.Test/SeedAlias.Test.csproj index 6377029a16d..4c80df47000 100644 --- a/seed/csharp-sdk/alias/src/SeedAlias.Test/SeedAlias.Test.csproj +++ b/seed/csharp-sdk/alias/src/SeedAlias.Test/SeedAlias.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/alias/src/SeedAlias.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/alias/src/SeedAlias.Test/Unit/MockServer/BaseMockServerTest.cs index 09b636cd557..8ed2b3166c1 100644 --- a/seed/csharp-sdk/alias/src/SeedAlias.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/alias/src/SeedAlias.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/alias/src/SeedAlias.sln b/seed/csharp-sdk/alias/src/SeedAlias.sln new file mode 100644 index 00000000000..3fdae41af23 --- /dev/null +++ b/seed/csharp-sdk/alias/src/SeedAlias.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAlias", "SeedAlias\SeedAlias.csproj", "{ABC795F8-A6F6-430A-97F9-3CFAA3CE79F3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAlias.Test", "SeedAlias.Test\SeedAlias.Test.csproj", "{F41CCDF4-487E-49EC-9682-651CF26D0204}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ABC795F8-A6F6-430A-97F9-3CFAA3CE79F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABC795F8-A6F6-430A-97F9-3CFAA3CE79F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABC795F8-A6F6-430A-97F9-3CFAA3CE79F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABC795F8-A6F6-430A-97F9-3CFAA3CE79F3}.Release|Any CPU.Build.0 = Release|Any CPU + {F41CCDF4-487E-49EC-9682-651CF26D0204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F41CCDF4-487E-49EC-9682-651CF26D0204}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F41CCDF4-487E-49EC-9682-651CF26D0204}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F41CCDF4-487E-49EC-9682-651CF26D0204}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/alias/src/SeedAlias/SeedAlias.csproj b/seed/csharp-sdk/alias/src/SeedAlias/SeedAlias.csproj index f6d9b711c37..d4455f0f175 100644 --- a/seed/csharp-sdk/alias/src/SeedAlias/SeedAlias.csproj +++ b/seed/csharp-sdk/alias/src/SeedAlias/SeedAlias.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/alias/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs index 66af8be386b..ebde0c81c13 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj index f68ccf13cf4..cb2298c52d3 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/SeedAnyAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/BaseMockServerTest.cs index 5980372516e..4245d996491 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth.sln b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.sln new file mode 100644 index 00000000000..33c4aed105a --- /dev/null +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAnyAuth", "SeedAnyAuth\SeedAnyAuth.csproj", "{316083FC-4DFA-4FC0-8CD3-AE26C99A4DE9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAnyAuth.Test", "SeedAnyAuth.Test\SeedAnyAuth.Test.csproj", "{A6B4909F-8EF8-44A0-A9EF-42F4F802FB4E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {316083FC-4DFA-4FC0-8CD3-AE26C99A4DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {316083FC-4DFA-4FC0-8CD3-AE26C99A4DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {316083FC-4DFA-4FC0-8CD3-AE26C99A4DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {316083FC-4DFA-4FC0-8CD3-AE26C99A4DE9}.Release|Any CPU.Build.0 = Release|Any CPU + {A6B4909F-8EF8-44A0-A9EF-42F4F802FB4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6B4909F-8EF8-44A0-A9EF-42F4F802FB4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6B4909F-8EF8-44A0-A9EF-42F4F802FB4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6B4909F-8EF8-44A0-A9EF-42F4F802FB4E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj b/seed/csharp-sdk/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj index 17833e03e63..39464d7ee08 100644 --- a/seed/csharp-sdk/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj +++ b/seed/csharp-sdk/any-auth/src/SeedAnyAuth/SeedAnyAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/any-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs index c7dd5409d21..5f7e85954a6 100644 --- a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj index 31487789fa2..330a9298b0a 100644 --- a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj +++ b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/SeedApiWideBasePath.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Unit/MockServer/BaseMockServerTest.cs index ed02b0921c5..b41e2b164e9 100644 --- a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.sln b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.sln new file mode 100644 index 00000000000..81f1acf08fe --- /dev/null +++ b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApiWideBasePath", "SeedApiWideBasePath\SeedApiWideBasePath.csproj", "{D99ECD09-07C2-4B0A-B6DF-D258E1F7CC2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApiWideBasePath.Test", "SeedApiWideBasePath.Test\SeedApiWideBasePath.Test.csproj", "{4B205E1F-6CC4-4D86-A8BE-093B77BB2942}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D99ECD09-07C2-4B0A-B6DF-D258E1F7CC2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D99ECD09-07C2-4B0A-B6DF-D258E1F7CC2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D99ECD09-07C2-4B0A-B6DF-D258E1F7CC2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D99ECD09-07C2-4B0A-B6DF-D258E1F7CC2C}.Release|Any CPU.Build.0 = Release|Any CPU + {4B205E1F-6CC4-4D86-A8BE-093B77BB2942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B205E1F-6CC4-4D86-A8BE-093B77BB2942}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B205E1F-6CC4-4D86-A8BE-093B77BB2942}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B205E1F-6CC4-4D86-A8BE-093B77BB2942}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj index 1808b454685..1aaaab00485 100644 --- a/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj +++ b/seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath/SeedApiWideBasePath.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/api-wide-base-path/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs index 5ccfdceadda..41441c252b5 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj index db284d1749e..efb76afe36f 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj +++ b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/SeedAudiences.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/BaseMockServerTest.cs index 6e2e8d889cb..3cd37a32cfa 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/audiences/src/SeedAudiences.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences.sln b/seed/csharp-sdk/audiences/src/SeedAudiences.sln new file mode 100644 index 00000000000..31ed6c13487 --- /dev/null +++ b/seed/csharp-sdk/audiences/src/SeedAudiences.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAudiences", "SeedAudiences\SeedAudiences.csproj", "{5D68C4BB-2878-4803-99A0-046BAE14D749}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAudiences.Test", "SeedAudiences.Test\SeedAudiences.Test.csproj", "{736E306C-9A16-4E07-B592-974BEE9D8408}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5D68C4BB-2878-4803-99A0-046BAE14D749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D68C4BB-2878-4803-99A0-046BAE14D749}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D68C4BB-2878-4803-99A0-046BAE14D749}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D68C4BB-2878-4803-99A0-046BAE14D749}.Release|Any CPU.Build.0 = Release|Any CPU + {736E306C-9A16-4E07-B592-974BEE9D8408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {736E306C-9A16-4E07-B592-974BEE9D8408}.Debug|Any CPU.Build.0 = Debug|Any CPU + {736E306C-9A16-4E07-B592-974BEE9D8408}.Release|Any CPU.ActiveCfg = Release|Any CPU + {736E306C-9A16-4E07-B592-974BEE9D8408}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/audiences/src/SeedAudiences/SeedAudiences.csproj b/seed/csharp-sdk/audiences/src/SeedAudiences/SeedAudiences.csproj index fff370d06b0..d9dc702d8fa 100644 --- a/seed/csharp-sdk/audiences/src/SeedAudiences/SeedAudiences.csproj +++ b/seed/csharp-sdk/audiences/src/SeedAudiences/SeedAudiences.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/audiences/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 2e50e637c13..d4b033842fa 100644 --- a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj index 3107b4a3359..20f810ff4fd 100644 --- a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj +++ b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/SeedAuthEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs index ad18d395835..5237995dbd0 100644 --- a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln new file mode 100644 index 00000000000..69d1486f418 --- /dev/null +++ b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAuthEnvironmentVariables", "SeedAuthEnvironmentVariables\SeedAuthEnvironmentVariables.csproj", "{3DCE712D-E8E8-4980-8B8D-8CE266EA7437}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedAuthEnvironmentVariables.Test", "SeedAuthEnvironmentVariables.Test\SeedAuthEnvironmentVariables.Test.csproj", "{469B60A0-0055-4EB8-8E75-E9A8B7712841}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3DCE712D-E8E8-4980-8B8D-8CE266EA7437}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DCE712D-E8E8-4980-8B8D-8CE266EA7437}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DCE712D-E8E8-4980-8B8D-8CE266EA7437}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DCE712D-E8E8-4980-8B8D-8CE266EA7437}.Release|Any CPU.Build.0 = Release|Any CPU + {469B60A0-0055-4EB8-8E75-E9A8B7712841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {469B60A0-0055-4EB8-8E75-E9A8B7712841}.Debug|Any CPU.Build.0 = Debug|Any CPU + {469B60A0-0055-4EB8-8E75-E9A8B7712841}.Release|Any CPU.ActiveCfg = Release|Any CPU + {469B60A0-0055-4EB8-8E75-E9A8B7712841}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj index 4f710b64e39..04f9e5616be 100644 --- a/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj +++ b/seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables/SeedAuthEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/auth-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 0ae1158e4e8..80254d3b829 100644 --- a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj index fb0674da98d..1c5ab5dcbfd 100644 --- a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj +++ b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/SeedBasicAuthEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs index 871c99017d9..41c0ed65fd0 100644 --- a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln new file mode 100644 index 00000000000..3e2f2e134ee --- /dev/null +++ b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuthEnvironmentVariables", "SeedBasicAuthEnvironmentVariables\SeedBasicAuthEnvironmentVariables.csproj", "{8816B054-1391-4BFE-8829-4FF262A99369}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuthEnvironmentVariables.Test", "SeedBasicAuthEnvironmentVariables.Test\SeedBasicAuthEnvironmentVariables.Test.csproj", "{8291080C-D6BD-496C-B973-AE9388DB6686}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8816B054-1391-4BFE-8829-4FF262A99369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8816B054-1391-4BFE-8829-4FF262A99369}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8816B054-1391-4BFE-8829-4FF262A99369}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8816B054-1391-4BFE-8829-4FF262A99369}.Release|Any CPU.Build.0 = Release|Any CPU + {8291080C-D6BD-496C-B973-AE9388DB6686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8291080C-D6BD-496C-B973-AE9388DB6686}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8291080C-D6BD-496C-B973-AE9388DB6686}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8291080C-D6BD-496C-B973-AE9388DB6686}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj index dc46ec3579a..a3eac4561ae 100644 --- a/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj +++ b/seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/SeedBasicAuthEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/basic-auth-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs index 1fbb498ecf2..88b2cd4defa 100644 --- a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj index 694b87130a8..33244ffe96a 100644 --- a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj +++ b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/SeedBasicAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Unit/MockServer/BaseMockServerTest.cs index e1ae0bccb5b..8075b9b37ec 100644 --- a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.sln b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.sln new file mode 100644 index 00000000000..1b2fa85f8f6 --- /dev/null +++ b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuth", "SeedBasicAuth\SeedBasicAuth.csproj", "{7F3B2C7F-C6F5-4A41-B50F-D43855CF8CE1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBasicAuth.Test", "SeedBasicAuth.Test\SeedBasicAuth.Test.csproj", "{67A6697D-FBD0-46C6-88B7-2781D5D403AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F3B2C7F-C6F5-4A41-B50F-D43855CF8CE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F3B2C7F-C6F5-4A41-B50F-D43855CF8CE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F3B2C7F-C6F5-4A41-B50F-D43855CF8CE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F3B2C7F-C6F5-4A41-B50F-D43855CF8CE1}.Release|Any CPU.Build.0 = Release|Any CPU + {67A6697D-FBD0-46C6-88B7-2781D5D403AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67A6697D-FBD0-46C6-88B7-2781D5D403AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67A6697D-FBD0-46C6-88B7-2781D5D403AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67A6697D-FBD0-46C6-88B7-2781D5D403AD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj index 7706432bced..1f7fc53ae3c 100644 --- a/seed/csharp-sdk/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj +++ b/seed/csharp-sdk/basic-auth/src/SeedBasicAuth/SeedBasicAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/basic-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs index 80ac0381b5f..3494293860b 100644 --- a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj index b9dc79be93f..c66ac7c4081 100644 --- a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj +++ b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/SeedBearerTokenEnvironmentVariable.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Unit/MockServer/BaseMockServerTest.cs index 75ca9c833bd..c7fcd836368 100644 --- a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln new file mode 100644 index 00000000000..e8f3334f64e --- /dev/null +++ b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBearerTokenEnvironmentVariable", "SeedBearerTokenEnvironmentVariable\SeedBearerTokenEnvironmentVariable.csproj", "{F4D7F478-7E69-4CD1-AE82-DB2FA82EE82D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBearerTokenEnvironmentVariable.Test", "SeedBearerTokenEnvironmentVariable.Test\SeedBearerTokenEnvironmentVariable.Test.csproj", "{45954C78-A122-4103-B28C-734906C81670}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F4D7F478-7E69-4CD1-AE82-DB2FA82EE82D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4D7F478-7E69-4CD1-AE82-DB2FA82EE82D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4D7F478-7E69-4CD1-AE82-DB2FA82EE82D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4D7F478-7E69-4CD1-AE82-DB2FA82EE82D}.Release|Any CPU.Build.0 = Release|Any CPU + {45954C78-A122-4103-B28C-734906C81670}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45954C78-A122-4103-B28C-734906C81670}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45954C78-A122-4103-B28C-734906C81670}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45954C78-A122-4103-B28C-734906C81670}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj index 4cb2a1bfe5b..865a9d18f8c 100644 --- a/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj +++ b/seed/csharp-sdk/bearer-token-environment-variable/src/SeedBearerTokenEnvironmentVariable/SeedBearerTokenEnvironmentVariable.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/bearer-token-environment-variable/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs index 3365839e1f5..d208b0ed2a9 100644 --- a/seed/csharp-sdk/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/bytes/src/SeedBytes.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj b/seed/csharp-sdk/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj index 731659024cf..40490560dbd 100644 --- a/seed/csharp-sdk/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj +++ b/seed/csharp-sdk/bytes/src/SeedBytes.Test/SeedBytes.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/bytes/src/SeedBytes.sln b/seed/csharp-sdk/bytes/src/SeedBytes.sln new file mode 100644 index 00000000000..b6e6176900a --- /dev/null +++ b/seed/csharp-sdk/bytes/src/SeedBytes.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBytes", "SeedBytes\SeedBytes.csproj", "{51834093-D04C-4902-B445-EFA4FAF8B667}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedBytes.Test", "SeedBytes.Test\SeedBytes.Test.csproj", "{37A341E2-4583-4A58-858E-A4E4CBC0993C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {51834093-D04C-4902-B445-EFA4FAF8B667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51834093-D04C-4902-B445-EFA4FAF8B667}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51834093-D04C-4902-B445-EFA4FAF8B667}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51834093-D04C-4902-B445-EFA4FAF8B667}.Release|Any CPU.Build.0 = Release|Any CPU + {37A341E2-4583-4A58-858E-A4E4CBC0993C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37A341E2-4583-4A58-858E-A4E4CBC0993C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37A341E2-4583-4A58-858E-A4E4CBC0993C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37A341E2-4583-4A58-858E-A4E4CBC0993C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/bytes/src/SeedBytes/SeedBytes.csproj b/seed/csharp-sdk/bytes/src/SeedBytes/SeedBytes.csproj index f0db1a65283..43238bb18b5 100644 --- a/seed/csharp-sdk/bytes/src/SeedBytes/SeedBytes.csproj +++ b/seed/csharp-sdk/bytes/src/SeedBytes/SeedBytes.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/bytes/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/circular-references-advanced/src/SeedApi.sln b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.sln new file mode 100644 index 00000000000..4269dfcbb23 --- /dev/null +++ b/seed/csharp-sdk/circular-references-advanced/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{41565371-8E34-4D4F-8297-FB6929830513}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{12F846F9-9434-4FE5-9CD6-108A53E54987}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {41565371-8E34-4D4F-8297-FB6929830513}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41565371-8E34-4D4F-8297-FB6929830513}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41565371-8E34-4D4F-8297-FB6929830513}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41565371-8E34-4D4F-8297-FB6929830513}.Release|Any CPU.Build.0 = Release|Any CPU + {12F846F9-9434-4FE5-9CD6-108A53E54987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12F846F9-9434-4FE5-9CD6-108A53E54987}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12F846F9-9434-4FE5-9CD6-108A53E54987}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12F846F9-9434-4FE5-9CD6-108A53E54987}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/circular-references-advanced/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/circular-references-advanced/src/SeedApi/SeedApi.csproj index e915f7a437d..0d98501b842 100644 --- a/seed/csharp-sdk/circular-references-advanced/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/circular-references-advanced/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/circular-references-advanced/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/circular-references/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/circular-references/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/circular-references/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/circular-references/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/circular-references/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/circular-references/src/SeedApi.sln b/seed/csharp-sdk/circular-references/src/SeedApi.sln new file mode 100644 index 00000000000..3bce22b0a8f --- /dev/null +++ b/seed/csharp-sdk/circular-references/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{F4310A92-4AC4-49D1-AF38-79D26371EE1B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{E18830F6-4B09-4717-94D0-7D52F22AB204}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F4310A92-4AC4-49D1-AF38-79D26371EE1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4310A92-4AC4-49D1-AF38-79D26371EE1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4310A92-4AC4-49D1-AF38-79D26371EE1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4310A92-4AC4-49D1-AF38-79D26371EE1B}.Release|Any CPU.Build.0 = Release|Any CPU + {E18830F6-4B09-4717-94D0-7D52F22AB204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E18830F6-4B09-4717-94D0-7D52F22AB204}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E18830F6-4B09-4717-94D0-7D52F22AB204}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E18830F6-4B09-4717-94D0-7D52F22AB204}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/circular-references/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/circular-references/src/SeedApi/SeedApi.csproj index a56f586f3c7..1f0abd20675 100644 --- a/seed/csharp-sdk/circular-references/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/circular-references/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/circular-references/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/code-samples/.github/workflows/ci.yml b/seed/csharp-sdk/code-samples/.github/workflows/ci.yml deleted file mode 100644 index 0ce8a0ff0f9..00000000000 --- a/seed/csharp-sdk/code-samples/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedCodeSamples/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/code-samples/.gitignore b/seed/csharp-sdk/code-samples/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-sdk/code-samples/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/code-samples/.mock/definition/api.yml b/seed/csharp-sdk/code-samples/.mock/definition/api.yml deleted file mode 100644 index be7bbb0492a..00000000000 --- a/seed/csharp-sdk/code-samples/.mock/definition/api.yml +++ /dev/null @@ -1,3 +0,0 @@ -name: code-samples -error-discrimination: - strategy: status-code diff --git a/seed/csharp-sdk/code-samples/.mock/definition/service.yml b/seed/csharp-sdk/code-samples/.mock/definition/service.yml deleted file mode 100644 index a411feebe13..00000000000 --- a/seed/csharp-sdk/code-samples/.mock/definition/service.yml +++ /dev/null @@ -1,43 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -types: - MyResponse: - properties: - id: string - name: optional - -service: - auth: false - base-path: "" - endpoints: - hello: - path: /hello - method: POST - request: - name: MyRequest - body: - properties: - num_events: integer - response: - type: MyResponse - examples: - - request: - num_events: 5 - response: - body: - id: "123" - name: "hello" - code-samples: - - name: curl - sdk: curl - code: | - curl -X POST "http://localhost:8080/hello" - -H "Content-Type: application/json" - -d '{"num_events": 5}' - - name: python - sdk: python - code: | - import requests - response = requests.post("http://localhost:8080/hello", json={"num_events": 5}) - print(response.json()) - diff --git a/seed/csharp-sdk/code-samples/.mock/fern.config.json b/seed/csharp-sdk/code-samples/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/code-samples/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/code-samples/.mock/generators.yml b/seed/csharp-sdk/code-samples/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/code-samples/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/code-samples/snippet-templates.json b/seed/csharp-sdk/code-samples/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/code-samples/snippet.json b/seed/csharp-sdk/code-samples/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj b/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj deleted file mode 100644 index f179bee1fb5..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/SeedCodeSamples.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/TestClient.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/TestClient.cs deleted file mode 100644 index 850bb280cfb..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedCodeSamples.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/BaseMockServerTest.cs deleted file mode 100644 index 505f12b6793..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/BaseMockServerTest.cs +++ /dev/null @@ -1,39 +0,0 @@ -using NUnit.Framework; -using SeedCodeSamples; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -#nullable enable - -namespace SeedCodeSamples.Test.Unit.MockServer; - -[SetUpFixture] -public class BaseMockServerTest -{ - protected static WireMockServer Server { get; set; } = null!; - - protected static SeedCodeSamplesClient Client { get; set; } = null!; - - protected static RequestOptions RequestOptions { get; set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger() } - ); - - // Initialize the Client - Client = new SeedCodeSamplesClient(); - - RequestOptions = new RequestOptions { BaseUrl = Server.Urls[0] }; - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/HelloTest.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/HelloTest.cs deleted file mode 100644 index bb3ccb71f69..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples.Test/Unit/MockServer/HelloTest.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.Threading.Tasks; -using FluentAssertions.Json; -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using SeedCodeSamples; -using SeedCodeSamples.Core; -using SeedCodeSamples.Test.Unit.MockServer; - -#nullable enable - -namespace SeedCodeSamples.Test; - -[TestFixture] -public class HelloTest : BaseMockServerTest -{ - [Test] - public async Task MockServerTest_1() - { - const string requestJson = """ - { - "num_events": 5 - } - """; - - const string mockResponse = """ - { - "id": "123", - "name": "hello" - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/hello") - .UsingPost() - .WithBodyAsJson(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = await Client.Service.HelloAsync( - new MyRequest { NumEvents = 5 }, - RequestOptions - ); - JToken - .Parse(mockResponse) - .Should() - .BeEquivalentTo(JToken.Parse(JsonUtils.Serialize(response))); - } - - [Test] - public async Task MockServerTest_2() - { - const string requestJson = """ - { - "num_events": 5 - } - """; - - const string mockResponse = """ - { - "id": "123", - "name": "hello" - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/hello") - .UsingPost() - .WithBodyAsJson(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = await Client.Service.HelloAsync( - new MyRequest { NumEvents = 5 }, - RequestOptions - ); - JToken - .Parse(mockResponse) - .Should() - .BeEquivalentTo(JToken.Parse(JsonUtils.Serialize(response))); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs deleted file mode 100644 index a77d719d4b4..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Constants.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Constants.cs deleted file mode 100644 index 8c8d1c0c849..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedCodeSamples.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/DateTimeSerializer.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/DateTimeSerializer.cs deleted file mode 100644 index 753a2886b1a..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Extensions.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Extensions.cs deleted file mode 100644 index 7bbb8acb78d..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedCodeSamples.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/HttpMethodExtensions.cs deleted file mode 100644 index 9af84a3c647..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedCodeSamples.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/JsonConfiguration.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/JsonConfiguration.cs deleted file mode 100644 index 43858f0c18a..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs deleted file mode 100644 index a0630c35dff..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedCodeSamples.Core; - -internal class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/ClientOptions.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/ClientOptions.cs deleted file mode 100644 index d50cf1c60db..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedCodeSamples; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/RequestOptions.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/RequestOptions.cs deleted file mode 100644 index 619d8c9b5af..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedCodeSamples; - -public partial class RequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesApiException.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesApiException.cs deleted file mode 100644 index a67ff007927..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedCodeSamples; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedCodeSamplesApiException(string message, int statusCode, object body) - : SeedCodeSamplesException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesException.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesException.cs deleted file mode 100644 index 3ce069c97d3..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/Public/SeedCodeSamplesException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedCodeSamples; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedCodeSamplesException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/RawClient.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/RawClient.cs deleted file mode 100644 index de144f4ff00..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/RawClient.cs +++ /dev/null @@ -1,159 +0,0 @@ -using System.Net.Http; -using System.Text; -using System.Threading; - -namespace SeedCodeSamples.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - /// - /// Global headers to be sent with every request. These headers take - /// precedence over the others. - /// - private readonly Dictionary> _headerSuppliers = headerSuppliers; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in _headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var response = await httpClient.SendAsync(httpRequest, cancellationToken); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public RequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs deleted file mode 100644 index 009bead6998..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedCodeSamples.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj deleted file mode 100644 index 84e1ad38e07..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamples.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/code-samples/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - <_Parameter1>SeedCodeSamples.Test - - - - diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamplesClient.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamplesClient.cs deleted file mode 100644 index f69f7828ee2..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/SeedCodeSamplesClient.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using SeedCodeSamples.Core; - -#nullable enable - -namespace SeedCodeSamples; - -public partial class SeedCodeSamplesClient -{ - private RawClient _client; - - public SeedCodeSamplesClient(ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() { { "X-Fern-Language", "C#" } }, - new Dictionary>(), - clientOptions ?? new ClientOptions() - ); - Service = new ServiceClient(_client); - } - - public ServiceClient Service { get; init; } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Requests/MyRequest.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Requests/MyRequest.cs deleted file mode 100644 index 979860410c9..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Requests/MyRequest.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedCodeSamples; - -public record MyRequest -{ - [JsonPropertyName("num_events")] - public required int NumEvents { get; set; } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/ServiceClient.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/ServiceClient.cs deleted file mode 100644 index 26c2f2d4816..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/ServiceClient.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Net.Http; -using System.Text.Json; -using System.Threading; -using SeedCodeSamples.Core; - -#nullable enable - -namespace SeedCodeSamples; - -public partial class ServiceClient -{ - private RawClient _client; - - internal ServiceClient(RawClient client) - { - _client = client; - } - - public async Task HelloAsync( - MyRequest request, - RequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "hello", - Body = request, - Options = options, - }, - cancellationToken - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedCodeSamplesException("Failed to deserialize response", e); - } - } - - throw new SeedCodeSamplesApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - responseBody - ); - } -} diff --git a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Types/MyResponse.cs b/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Types/MyResponse.cs deleted file mode 100644 index 17459c4b45a..00000000000 --- a/seed/csharp-sdk/code-samples/src/SeedCodeSamples/Service/Types/MyResponse.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedCodeSamples; - -public record MyResponse -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("name")] - public string? Name { get; set; } -} diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs index eaadc6b488c..28e1c388aef 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj index 137c57edfd9..7b7fe7b3690 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/SeedCrossPackageTypeNames.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/BaseMockServerTest.cs index e21d9e05c87..0697fca6538 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.sln b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.sln new file mode 100644 index 00000000000..b6c0efd44ea --- /dev/null +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCrossPackageTypeNames", "SeedCrossPackageTypeNames\SeedCrossPackageTypeNames.csproj", "{11BFA751-0AE0-43A3-91C4-D0F4001496E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCrossPackageTypeNames.Test", "SeedCrossPackageTypeNames.Test\SeedCrossPackageTypeNames.Test.csproj", "{989E53E1-E859-425C-A01C-FEF4FDBF92C4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {11BFA751-0AE0-43A3-91C4-D0F4001496E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11BFA751-0AE0-43A3-91C4-D0F4001496E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11BFA751-0AE0-43A3-91C4-D0F4001496E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11BFA751-0AE0-43A3-91C4-D0F4001496E1}.Release|Any CPU.Build.0 = Release|Any CPU + {989E53E1-E859-425C-A01C-FEF4FDBF92C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {989E53E1-E859-425C-A01C-FEF4FDBF92C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {989E53E1-E859-425C-A01C-FEF4FDBF92C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {989E53E1-E859-425C-A01C-FEF4FDBF92C4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj index 8f2ef56e991..05c930a2105 100644 --- a/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj +++ b/seed/csharp-sdk/cross-package-type-names/src/SeedCrossPackageTypeNames/SeedCrossPackageTypeNames.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/cross-package-type-names/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.sln b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.sln new file mode 100644 index 00000000000..8f1910f1d9e --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{23086100-6515-4196-8B16-21034A67478F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{2BD633D3-7E76-4699-BF3C-FEF2187FDBF9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {23086100-6515-4196-8B16-21034A67478F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23086100-6515-4196-8B16-21034A67478F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23086100-6515-4196-8B16-21034A67478F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23086100-6515-4196-8B16-21034A67478F}.Release|Any CPU.Build.0 = Release|Any CPU + {2BD633D3-7E76-4699-BF3C-FEF2187FDBF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BD633D3-7E76-4699-BF3C-FEF2187FDBF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BD633D3-7E76-4699-BF3C-FEF2187FDBF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BD633D3-7E76-4699-BF3C-FEF2187FDBF9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj index d1e83db655b..27e8ffa242d 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-grpc-proto-exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.sln b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.sln new file mode 100644 index 00000000000..40efd2d8945 --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{153C27CF-2E6B-4FBB-A9EB-B1CB03601924}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{775C5F9A-236E-4509-8C92-557D53D87035}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {153C27CF-2E6B-4FBB-A9EB-B1CB03601924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {153C27CF-2E6B-4FBB-A9EB-B1CB03601924}.Debug|Any CPU.Build.0 = Debug|Any CPU + {153C27CF-2E6B-4FBB-A9EB-B1CB03601924}.Release|Any CPU.ActiveCfg = Release|Any CPU + {153C27CF-2E6B-4FBB-A9EB-B1CB03601924}.Release|Any CPU.Build.0 = Release|Any CPU + {775C5F9A-236E-4509-8C92-557D53D87035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {775C5F9A-236E-4509-8C92-557D53D87035}.Debug|Any CPU.Build.0 = Debug|Any CPU + {775C5F9A-236E-4509-8C92-557D53D87035}.Release|Any CPU.ActiveCfg = Release|Any CPU + {775C5F9A-236E-4509-8C92-557D53D87035}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi/SeedApi.csproj index 8fc89259558..9ee3df12ef3 100644 --- a/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/csharp-grpc-proto/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-grpc-proto/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs index 4cff59e7004..dfbfba5f6c5 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj index 1b69fae24ba..653ea9acc8e 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj +++ b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs index 111945bf71f..bfc6bd60871 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln new file mode 100644 index 00000000000..91a884906bc --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCsharpNamespaceConflict", "SeedCsharpNamespaceConflict\SeedCsharpNamespaceConflict.csproj", "{32FD109B-D546-4251-8E36-053D24DD6407}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCsharpNamespaceConflict.Test", "SeedCsharpNamespaceConflict.Test\SeedCsharpNamespaceConflict.Test.csproj", "{74CDC0DC-3A4F-4694-A458-64DE7C037198}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {32FD109B-D546-4251-8E36-053D24DD6407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32FD109B-D546-4251-8E36-053D24DD6407}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32FD109B-D546-4251-8E36-053D24DD6407}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32FD109B-D546-4251-8E36-053D24DD6407}.Release|Any CPU.Build.0 = Release|Any CPU + {74CDC0DC-3A4F-4694-A458-64DE7C037198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74CDC0DC-3A4F-4694-A458-64DE7C037198}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74CDC0DC-3A4F-4694-A458-64DE7C037198}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74CDC0DC-3A4F-4694-A458-64DE7C037198}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj index 501a86ce67e..3cbc7fffdb3 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj +++ b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/csharp-namespace-conflict/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.github/workflows/ci.yml b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.gitignore b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.gitignore deleted file mode 100644 index 9965de29662..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.gitignore +++ /dev/null @@ -1,477 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/api.yml b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/api.yml deleted file mode 100644 index c437dc0ab29..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/api.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: api -error-discrimination: - strategy: status-code -auth: bearer diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/imdb.yml b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/imdb.yml deleted file mode 100644 index 7919173fe57..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/definition/imdb.yml +++ /dev/null @@ -1,42 +0,0 @@ -types: - MovieId: string - - Movie: - properties: - id: MovieId - title: string - rating: - type: double - docs: The rating scale is one to five stars - - CreateMovieRequest: - properties: - title: string - rating: double - -service: - auth: false - base-path: /movies - endpoints: - createMovie: - docs: Add a movie to the database - method: POST - path: /create-movie - request: CreateMovieRequest - response: - type: MovieId - status-code: 201 - - getMovie: - method: GET - path: /{movieId} - path-parameters: - movieId: MovieId - response: Movie - errors: - - MovieDoesNotExistError - -errors: - MovieDoesNotExistError: - status-code: 404 - type: MovieId diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/fern.config.json b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/generators.yml b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet-templates.json b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet.json b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index fa0676afacd..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/ClientOptions.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/ClientOptions.cs deleted file mode 100644 index 573a96689a8..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/ClientOptions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request in seconds. - /// - public int TimeoutInSeconds { get; init; } = 30; -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index 2e1e0f550be..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -public class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/Constants.cs deleted file mode 100644 index 9a66ab2ea70..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi.Core; - -public static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ssK"; -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index 6861804d08a..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -public class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.ParseExact(reader.GetString()!, Constants.DateTimeFormat, null); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 66ee2e9d252..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -public static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 0c7db293eb9..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Text.Json; - -namespace SeedApi.Core; - -public static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true - }; - } -} - -public static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index d86f8e24e70..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -public class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 437825ca198..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System.Net.Http; -using System.Text; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -public class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - public async Task MakeRequestAsync(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var response = await Options.HttpClient.SendAsync(httpRequest); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public object? RequestOptions { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var trimmedBaseUrl = request.BaseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => current + $"{queryItem.Key}={queryItem.Value}&" - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/StringEnumSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/StringEnumSerializer.cs deleted file mode 100644 index fbaf79b865e..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -public class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/ImdbClient.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/ImdbClient.cs deleted file mode 100644 index a114db24389..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/ImdbClient.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Net.Http; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public class ImdbClient -{ - private RawClient _client; - - public ImdbClient(RawClient client) - { - _client = client; - } - - /// - /// Add a movie to the database - /// - public async Task CreateMovieAsync(CreateMovieRequest request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/movies/create-movie", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetMovieAsync(string movieId) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = $"/movies/{movieId}" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/CreateMovieRequest.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/CreateMovieRequest.cs deleted file mode 100644 index 12f46012d53..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/CreateMovieRequest.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedApi; - -public record CreateMovieRequest -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("rating")] - public required double Rating { get; init; } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/Movie.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/Movie.cs deleted file mode 100644 index d31a4ecad78..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/Imdb/Types/Movie.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedApi; - -public record Movie -{ - [JsonPropertyName("id")] - public required string Id { get; init; } - - [JsonPropertyName("title")] - public required string Title { get; init; } - - /// - /// The rating scale is one to five stars - /// - [JsonPropertyName("rating")] - public required double Rating { get; init; } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApi.csproj deleted file mode 100644 index b3156331e7e..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/imdb/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - diff --git a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index ec79ca35044..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/extra-dependencies/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(string token, ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() { { "X-Fern-Language", "C#" }, }, - new Dictionary>() { }, - clientOptions ?? new ClientOptions() - ); - Imdb = new ImdbClient(_client); - } - - public ImdbClient Imdb { get; init; } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.github/workflows/ci.yml b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.gitignore b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.gitignore deleted file mode 100644 index 9965de29662..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.gitignore +++ /dev/null @@ -1,477 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/api.yml b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/api.yml deleted file mode 100644 index c437dc0ab29..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/api.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: api -error-discrimination: - strategy: status-code -auth: bearer diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/imdb.yml b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/imdb.yml deleted file mode 100644 index 7919173fe57..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/definition/imdb.yml +++ /dev/null @@ -1,42 +0,0 @@ -types: - MovieId: string - - Movie: - properties: - id: MovieId - title: string - rating: - type: double - docs: The rating scale is one to five stars - - CreateMovieRequest: - properties: - title: string - rating: double - -service: - auth: false - base-path: /movies - endpoints: - createMovie: - docs: Add a movie to the database - method: POST - path: /create-movie - request: CreateMovieRequest - response: - type: MovieId - status-code: 201 - - getMovie: - method: GET - path: /{movieId} - path-parameters: - movieId: MovieId - response: Movie - errors: - - MovieDoesNotExistError - -errors: - MovieDoesNotExistError: - status-code: 404 - type: MovieId diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/fern.config.json b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/generators.yml b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet-templates.json b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet.json b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index b782cb73082..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Utils/JsonDiffChecker.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Utils/JsonDiffChecker.cs deleted file mode 100644 index 3e0a25f94d9..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Utils/JsonDiffChecker.cs +++ /dev/null @@ -1,88 +0,0 @@ -namespace SeedApi.Test.Utils; - -using System.Collections.Generic; -using System.Collections.Generic; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Linq; -using NUnit.Framework; - -public static class JsonDiffChecker -{ - public static void AssertJsonEquals(string jsonString1, string jsonString2) - { - var token1 = JToken.Parse(jsonString1); - var token2 = JToken.Parse(jsonString2); - var differences = GetJsonDifferences(token1, token2); - - Assert.That( - differences, - Is.Empty, - $"The JSON strings are not equal: {string.Join(", ", differences)}" - ); - } - - private static List GetJsonDifferences(JToken token1, JToken token2, string path = "") - { - var differences = new List(); - - if (token1.Type != token2.Type) - { - differences.Add($"{path} has different types: {token1.Type} vs {token2.Type}"); - return differences; - } - - if (token1 is JObject obj1 && token2 is JObject obj2) - { - foreach (var property in obj1.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj2.TryGetValue(property.Name, out JToken token2Value)) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(property.Value, token2Value, newPath)); - } - } - - foreach (var property in obj2.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj1.TryGetValue(property.Name, out _)) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - } - } - else if (token1 is JArray array1 && token2 is JArray array2) - { - for (var i = 0; i < Math.Max(array1.Count, array2.Count); i++) - { - var newPath = $"{path}[{i}]"; - if (i >= array1.Count) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - else if (i >= array2.Count) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(array1[i], array2[i], newPath)); - } - } - } - else if (!JToken.DeepEquals(token1, token2)) - { - differences.Add($"{path} has different values: {token1} vs {token2}"); - } - - return differences; - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/GlobalTestSetup.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/GlobalTestSetup.cs deleted file mode 100644 index b7648df3662..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/GlobalTestSetup.cs +++ /dev/null @@ -1,32 +0,0 @@ -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -namespace SeedApi.Test.Wire; - -[SetUpFixture] -public class GlobalTestSetup -{ - public static WireMockServer Server { get; private set; } = null!; - public static SeedApiClient Client { get; private set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger(), } - ); - - // Initialize the Client - Client = new SeedApiClient("API_KEY", new ClientOptions { BaseUrl = Server.Urls[0] }); - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/SampleTest.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/SampleTest.cs deleted file mode 100644 index 26c67eec7fb..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi.Test/Wire/SampleTest.cs +++ /dev/null @@ -1,90 +0,0 @@ -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using SeedApi.Core; -using SeedApi.Test.Utils; - -namespace SeedApi.Test.Wire; - -[TestFixture] -public class SampleTest -{ - private SeedApiClient _client; - - [SetUp] - public void SetUp() - { - _client = GlobalTestSetup.Client; - } - - [TearDown] - public void TearDown() - { - // Reset the WireMock server after each test - GlobalTestSetup.Server.Reset(); - } - - [Test] - public void Test_Post_Endpoint() - { - const string json = """ - { - "title": "Inception", - "rating": 8.8 - } - """; - - const string mockResponse = "\"MovieId123\""; - GlobalTestSetup - .Server.Given( - WireMock - .RequestBuilders.Request.Create() - .WithHeader("X-Fern-Language", "C#") - .WithPath("/movies/create-movie") - .UsingPost() - .WithBody(json) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = _client - .Imdb.CreateMovieAsync(new CreateMovieRequest { Rating = 8.8, Title = "Inception" }) - .Result; - - JsonDiffChecker.AssertJsonEquals(mockResponse, JsonUtils.Serialize(response)); - } - - [Test] - public void Test_Get_Endpoint() - { - const string mockResponse = """ - { - "id": "idid", - "title": "Inception", - "rating": 4.8 - } - """; - - GlobalTestSetup - .Server.Given( - WireMock - .RequestBuilders.Request.Create() - .WithHeader("X-Fern-Language", "C#") - .WithPath("/movies/idid") - .UsingGet() - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = _client.Imdb.GetMovieAsync("idid").Result; - - JsonDiffChecker.AssertJsonEquals(mockResponse, JsonUtils.Serialize(response)); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/ClientOptions.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/ClientOptions.cs deleted file mode 100644 index 573a96689a8..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/ClientOptions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request in seconds. - /// - public int TimeoutInSeconds { get; init; } = 30; -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index 2e1e0f550be..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -public class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/Constants.cs deleted file mode 100644 index 9a66ab2ea70..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi.Core; - -public static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ssK"; -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index 6861804d08a..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -public class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.ParseExact(reader.GetString()!, Constants.DateTimeFormat, null); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 66ee2e9d252..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -public static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 0c7db293eb9..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Text.Json; - -namespace SeedApi.Core; - -public static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true - }; - } -} - -public static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index d86f8e24e70..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -public class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 437825ca198..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System.Net.Http; -using System.Text; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -public class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - public async Task MakeRequestAsync(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var response = await Options.HttpClient.SendAsync(httpRequest); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public object? RequestOptions { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var trimmedBaseUrl = request.BaseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => current + $"{queryItem.Key}={queryItem.Value}&" - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/StringEnumSerializer.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/StringEnumSerializer.cs deleted file mode 100644 index fbaf79b865e..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -public class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/ImdbClient.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/ImdbClient.cs deleted file mode 100644 index a114db24389..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/ImdbClient.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Net.Http; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public class ImdbClient -{ - private RawClient _client; - - public ImdbClient(RawClient client) - { - _client = client; - } - - /// - /// Add a movie to the database - /// - public async Task CreateMovieAsync(CreateMovieRequest request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/movies/create-movie", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetMovieAsync(string movieId) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = $"/movies/{movieId}" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/CreateMovieRequest.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/CreateMovieRequest.cs deleted file mode 100644 index 12f46012d53..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/CreateMovieRequest.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedApi; - -public record CreateMovieRequest -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("rating")] - public required double Rating { get; init; } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/Movie.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/Movie.cs deleted file mode 100644 index d31a4ecad78..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/Imdb/Types/Movie.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedApi; - -public record Movie -{ - [JsonPropertyName("id")] - public required string Id { get; init; } - - [JsonPropertyName("title")] - public required string Title { get; init; } - - /// - /// The rating scale is one to five stars - /// - [JsonPropertyName("rating")] - public required double Rating { get; init; } -} diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApi.csproj deleted file mode 100644 index ef0a8db6f37..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/imdb/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - diff --git a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index ec79ca35044..00000000000 --- a/seed/csharp-sdk/csharp-wire-testing/no-custom-config/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(string token, ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() { { "X-Fern-Language", "C#" }, }, - new Dictionary>() { }, - clientOptions ?? new ClientOptions() - ); - Imdb = new ImdbClient(_client); - } - - public ImdbClient Imdb { get; init; } -} diff --git a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs index f33b6d6036b..4cc169e0b1e 100644 --- a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj index 276ad5d69f6..1138d192410 100644 --- a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj +++ b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/SeedCustomAuth.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Unit/MockServer/BaseMockServerTest.cs index 954848fb2f8..71d46dd24e3 100644 --- a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.sln b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.sln new file mode 100644 index 00000000000..807deca2ccc --- /dev/null +++ b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCustomAuth", "SeedCustomAuth\SeedCustomAuth.csproj", "{9F281AFD-0EE3-40C7-94D2-7CC14E7F687C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedCustomAuth.Test", "SeedCustomAuth.Test\SeedCustomAuth.Test.csproj", "{79EEA28D-7051-4054-A083-7C833BB3C1BF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F281AFD-0EE3-40C7-94D2-7CC14E7F687C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F281AFD-0EE3-40C7-94D2-7CC14E7F687C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F281AFD-0EE3-40C7-94D2-7CC14E7F687C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F281AFD-0EE3-40C7-94D2-7CC14E7F687C}.Release|Any CPU.Build.0 = Release|Any CPU + {79EEA28D-7051-4054-A083-7C833BB3C1BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79EEA28D-7051-4054-A083-7C833BB3C1BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79EEA28D-7051-4054-A083-7C833BB3C1BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79EEA28D-7051-4054-A083-7C833BB3C1BF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj index 5ccc5ff3b27..73fe9306405 100644 --- a/seed/csharp-sdk/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj +++ b/seed/csharp-sdk/custom-auth/src/SeedCustomAuth/SeedCustomAuth.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/custom-auth/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/enum/.github/workflows/ci.yml b/seed/csharp-sdk/enum/.github/workflows/ci.yml deleted file mode 100644 index 93b0b62c5cb..00000000000 --- a/seed/csharp-sdk/enum/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedEnum/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/enum/.gitignore b/seed/csharp-sdk/enum/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/enum/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/enum/.mock/definition/__package__.yml b/seed/csharp-sdk/enum/.mock/definition/__package__.yml deleted file mode 100644 index a72e076f94d..00000000000 --- a/seed/csharp-sdk/enum/.mock/definition/__package__.yml +++ /dev/null @@ -1,38 +0,0 @@ -types: - Operand: - docs: | - Tests enum name and value can be - different. - enum: - - value: ">" - name: GREATER_THAN - - value: "=" - name: EQUAL_TO - - value: "less_than" - docs: | - The name and value should be similar - are similar for less than. - examples: - - name: GreaterThan - value: ">" - - name: LessThan - value: "less_than" - - Color: - enum: - - value: "red" - name: RED - - value: "blue" - name: BLUE - examples: - - name: Red - value: "red" - - ColorOrOperand: - discriminated: false - union: - - Color - - Operand - examples: - - name: Red - value: "red" diff --git a/seed/csharp-sdk/enum/.mock/definition/api.yml b/seed/csharp-sdk/enum/.mock/definition/api.yml deleted file mode 100644 index 3e2ce7d17a8..00000000000 --- a/seed/csharp-sdk/enum/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: enum diff --git a/seed/csharp-sdk/enum/.mock/definition/inlined-request.yml b/seed/csharp-sdk/enum/.mock/definition/inlined-request.yml deleted file mode 100644 index f17deabdaaf..00000000000 --- a/seed/csharp-sdk/enum/.mock/definition/inlined-request.yml +++ /dev/null @@ -1,24 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /inlined - method: POST - request: - name: SendEnumInlinedRequest - body: - properties: - operand: - type: root.Operand - maybeOperand: optional - operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional - examples: - - request: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red - \ No newline at end of file diff --git a/seed/csharp-sdk/enum/.mock/definition/path-param.yml b/seed/csharp-sdk/enum/.mock/definition/path-param.yml deleted file mode 100644 index 5afc7329f1e..00000000000 --- a/seed/csharp-sdk/enum/.mock/definition/path-param.yml +++ /dev/null @@ -1,17 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /path/{operand}/{operandOrColor} - method: POST - path-parameters: - operand: root.Operand - operandOrColor: root.ColorOrOperand - examples: - - path-parameters: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red diff --git a/seed/csharp-sdk/enum/.mock/definition/query-param.yml b/seed/csharp-sdk/enum/.mock/definition/query-param.yml deleted file mode 100644 index 2b3724eba7e..00000000000 --- a/seed/csharp-sdk/enum/.mock/definition/query-param.yml +++ /dev/null @@ -1,40 +0,0 @@ -imports: - root: __package__.yml - -service: - auth: false - base-path: "" - endpoints: - send: - path: /query - method: POST - request: - name: SendEnumAsQueryParamRequest - query-parameters: - operand: root.Operand - maybeOperand: optional - operandOrColor: root.ColorOrOperand - maybeOperandOrColor: optional - examples: - - query-parameters: - operand: $root.Operand.GreaterThan - operandOrColor: $root.ColorOrOperand.Red - - sendList: - path: /query-list - method: POST - request: - name: SendEnumListAsQueryParamRequest - query-parameters: - operand: - type: root.Operand - allow-multiple: true - maybeOperand: - type: optional - allow-multiple: true - operandOrColor: - type: root.ColorOrOperand - allow-multiple: true - maybeOperandOrColor: - type: optional - allow-multiple: true diff --git a/seed/csharp-sdk/enum/.mock/fern.config.json b/seed/csharp-sdk/enum/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/enum/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/enum/.mock/generators.yml b/seed/csharp-sdk/enum/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/enum/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/enum/README.md b/seed/csharp-sdk/enum/README.md deleted file mode 100644 index f8ef4a6b64b..00000000000 --- a/seed/csharp-sdk/enum/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/SeedEnum)](https://nuget.org/packages/SeedEnum) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedEnum -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedEnum; - -var client = new SeedEnumClient(); -await client.InlinedRequest.SendAsync( - new SendEnumInlinedRequest { Operand = Operand.GreaterThan, OperandOrColor = Color.Red } -); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedEnum; - -try { - var response = await client.InlinedRequest.SendAsync(...); -} catch (SeedEnumApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.InlinedRequest.SendAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.InlinedRequest.SendAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs index e5fdf24fe97..7bfa7756e3e 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Core/StringEnumSerializerTests.cs @@ -49,7 +49,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2)); @@ -62,7 +62,7 @@ public void ShouldSerializeUnknownEnum() new DummyObject { EnumProperty = UnknownEnumValue }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(UnknownEnumValue)); diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj index 73fdda15ae5..d6faf892575 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/SeedEnum.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs index ae2423e0d5f..fd55b8e46cd 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.sln b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.sln new file mode 100644 index 00000000000..0ee001ac72f --- /dev/null +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum", "SeedEnum\SeedEnum.csproj", "{3B18E52F-E22F-4861-BE31-DBDDB57A447A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum.Test", "SeedEnum.Test\SeedEnum.Test.csproj", "{F5983278-F802-461F-8625-CA36D8E1E077}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3B18E52F-E22F-4861-BE31-DBDDB57A447A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B18E52F-E22F-4861-BE31-DBDDB57A447A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B18E52F-E22F-4861-BE31-DBDDB57A447A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B18E52F-E22F-4861-BE31-DBDDB57A447A}.Release|Any CPU.Build.0 = Release|Any CPU + {F5983278-F802-461F-8625-CA36D8E1E077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5983278-F802-461F-8625-CA36D8E1E077}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5983278-F802-461F-8625-CA36D8E1E077}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5983278-F802-461F-8625-CA36D8E1E077}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj index 1ac5726bfa8..a29863a52f4 100644 --- a/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj +++ b/seed/csharp-sdk/enum/forward-compatible-enums/src/SeedEnum/SeedEnum.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/enum/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs index 3128d125c3c..3df258e0757 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj index 73fdda15ae5..d6faf892575 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/SeedEnum.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs index ae2423e0d5f..fd55b8e46cd 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.sln b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.sln new file mode 100644 index 00000000000..e1579593238 --- /dev/null +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum", "SeedEnum\SeedEnum.csproj", "{5055C1DB-AB10-4F88-BA46-1FD9C1D21160}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedEnum.Test", "SeedEnum.Test\SeedEnum.Test.csproj", "{BD32EEBC-C4DC-4B7F-ACC5-753E6E4576F6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5055C1DB-AB10-4F88-BA46-1FD9C1D21160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5055C1DB-AB10-4F88-BA46-1FD9C1D21160}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5055C1DB-AB10-4F88-BA46-1FD9C1D21160}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5055C1DB-AB10-4F88-BA46-1FD9C1D21160}.Release|Any CPU.Build.0 = Release|Any CPU + {BD32EEBC-C4DC-4B7F-ACC5-753E6E4576F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD32EEBC-C4DC-4B7F-ACC5-753E6E4576F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD32EEBC-C4DC-4B7F-ACC5-753E6E4576F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD32EEBC-C4DC-4B7F-ACC5-753E6E4576F6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/SeedEnum.csproj b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/SeedEnum.csproj index 1ac5726bfa8..a29863a52f4 100644 --- a/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/SeedEnum.csproj +++ b/seed/csharp-sdk/enum/plain-enums/src/SeedEnum/SeedEnum.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/enum/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/enum/reference.md b/seed/csharp-sdk/enum/reference.md deleted file mode 100644 index 0f6bf0a2b23..00000000000 --- a/seed/csharp-sdk/enum/reference.md +++ /dev/null @@ -1,183 +0,0 @@ -# Reference -## InlinedRequest -
client.InlinedRequest.SendAsync(SendEnumInlinedRequest { ... }) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.InlinedRequest.SendAsync( - new SendEnumInlinedRequest { Operand = Operand.GreaterThan, OperandOrColor = Color.Red } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `SendEnumInlinedRequest` - -
-
-
-
- - -
-
-
- -## PathParam -
client.PathParam.SendAsync(operand, operandOrColor) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.PathParam.SendAsync(Operand.GreaterThan, Color.Red); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**operand:** `Operand` - -
-
- -
-
- -**operandOrColor:** `OneOf` - -
-
-
-
- - -
-
-
- -## QueryParam -
client.QueryParam.SendAsync(SendEnumAsQueryParamRequest { ... }) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.QueryParam.SendAsync( - new SendEnumAsQueryParamRequest { Operand = Operand.GreaterThan, OperandOrColor = Color.Red } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `SendEnumAsQueryParamRequest` - -
-
-
-
- - -
-
-
- -
client.QueryParam.SendListAsync(SendEnumListAsQueryParamRequest { ... }) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.QueryParam.SendListAsync( - new SendEnumListAsQueryParamRequest - { - Operand = [Operand.GreaterThan], - MaybeOperand = [Operand.GreaterThan], - OperandOrColor = [Color.Red], - MaybeOperandOrColor = [null], - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `SendEnumListAsQueryParamRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/enum/snippet-templates.json b/seed/csharp-sdk/enum/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/enum/snippet.json b/seed/csharp-sdk/enum/snippet.json deleted file mode 100644 index bc426a5d09e..00000000000 --- a/seed/csharp-sdk/enum/snippet.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/inlined", - "method": "POST", - "identifier_override": "endpoint_inlined-request.send" - }, - "snippet": { - "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.InlinedRequest.SendAsync(\n new SendEnumInlinedRequest { Operand = Operand.GreaterThan, OperandOrColor = Color.Red }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/path/{operand}/{operandOrColor}", - "method": "POST", - "identifier_override": "endpoint_path-param.send" - }, - "snippet": { - "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.PathParam.SendAsync(Operand.GreaterThan, Color.Red);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/query", - "method": "POST", - "identifier_override": "endpoint_query-param.send" - }, - "snippet": { - "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendAsync(\n new SendEnumAsQueryParamRequest { Operand = Operand.GreaterThan, OperandOrColor = Color.Red }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/query-list", - "method": "POST", - "identifier_override": "endpoint_query-param.sendList" - }, - "snippet": { - "type": "typescript", - "client": "using SeedEnum;\n\nvar client = new SeedEnumClient();\nawait client.QueryParam.SendListAsync(\n new SendEnumListAsQueryParamRequest\n {\n Operand = [Operand.GreaterThan],\n MaybeOperand = [Operand.GreaterThan],\n OperandOrColor = [Color.Red],\n MaybeOperandOrColor = [null],\n }\n);\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs index eddabd432bc..15f6b535439 100644 --- a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj index 13149bb05d8..0afa998e413 100644 --- a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj +++ b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/SeedErrorProperty.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Unit/MockServer/BaseMockServerTest.cs index 86c1c7f5c25..13d0fa449ae 100644 --- a/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/error-property/src/SeedErrorProperty.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/error-property/src/SeedErrorProperty.sln b/seed/csharp-sdk/error-property/src/SeedErrorProperty.sln new file mode 100644 index 00000000000..c27c344178a --- /dev/null +++ b/seed/csharp-sdk/error-property/src/SeedErrorProperty.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedErrorProperty", "SeedErrorProperty\SeedErrorProperty.csproj", "{769E0182-D360-42ED-8D2F-DA4C4733774A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedErrorProperty.Test", "SeedErrorProperty.Test\SeedErrorProperty.Test.csproj", "{E249FB56-AF5D-4AF5-A499-566A4FF4A3DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {769E0182-D360-42ED-8D2F-DA4C4733774A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {769E0182-D360-42ED-8D2F-DA4C4733774A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {769E0182-D360-42ED-8D2F-DA4C4733774A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {769E0182-D360-42ED-8D2F-DA4C4733774A}.Release|Any CPU.Build.0 = Release|Any CPU + {E249FB56-AF5D-4AF5-A499-566A4FF4A3DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E249FB56-AF5D-4AF5-A499-566A4FF4A3DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E249FB56-AF5D-4AF5-A499-566A4FF4A3DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E249FB56-AF5D-4AF5-A499-566A4FF4A3DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj b/seed/csharp-sdk/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj index 343237f8e57..5904847a2c1 100644 --- a/seed/csharp-sdk/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj +++ b/seed/csharp-sdk/error-property/src/SeedErrorProperty/SeedErrorProperty.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/error-property/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs index 68963fdc852..054ee62a369 100644 --- a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/SeedExamples.Test.csproj b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/SeedExamples.Test.csproj index 53949d76225..dbba8aeb890 100644 --- a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/SeedExamples.Test.csproj +++ b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.Test/SeedExamples.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.sln b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.sln new file mode 100644 index 00000000000..1978a3ada4b --- /dev/null +++ b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples", "SeedExamples\SeedExamples.csproj", "{732AA9DF-4C01-4225-B88A-4500074EEF02}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples.Test", "SeedExamples.Test\SeedExamples.Test.csproj", "{5CDE58F8-BA22-41C7-991F-AC002DCF8DAB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {732AA9DF-4C01-4225-B88A-4500074EEF02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {732AA9DF-4C01-4225-B88A-4500074EEF02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {732AA9DF-4C01-4225-B88A-4500074EEF02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {732AA9DF-4C01-4225-B88A-4500074EEF02}.Release|Any CPU.Build.0 = Release|Any CPU + {5CDE58F8-BA22-41C7-991F-AC002DCF8DAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CDE58F8-BA22-41C7-991F-AC002DCF8DAB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CDE58F8-BA22-41C7-991F-AC002DCF8DAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CDE58F8-BA22-41C7-991F-AC002DCF8DAB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/SeedExamples.csproj b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/SeedExamples.csproj index fea22d69c78..019799fa845 100644 --- a/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/SeedExamples.csproj +++ b/seed/csharp-sdk/examples/no-custom-config/src/SeedExamples/SeedExamples.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/examples/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs index 68963fdc852..054ee62a369 100644 --- a/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/SeedExamples.Test.csproj b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/SeedExamples.Test.csproj index 53949d76225..dbba8aeb890 100644 --- a/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/SeedExamples.Test.csproj +++ b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.Test/SeedExamples.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/examples/readme-config/src/SeedExamples.sln b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.sln new file mode 100644 index 00000000000..e9c2507c070 --- /dev/null +++ b/seed/csharp-sdk/examples/readme-config/src/SeedExamples.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples", "SeedExamples\SeedExamples.csproj", "{AAFBC544-7E3D-49C9-A259-FFC208B3D398}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExamples.Test", "SeedExamples.Test\SeedExamples.Test.csproj", "{A5F5C628-A3E1-48B5-B103-6CC7F6A06635}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAFBC544-7E3D-49C9-A259-FFC208B3D398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAFBC544-7E3D-49C9-A259-FFC208B3D398}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAFBC544-7E3D-49C9-A259-FFC208B3D398}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAFBC544-7E3D-49C9-A259-FFC208B3D398}.Release|Any CPU.Build.0 = Release|Any CPU + {A5F5C628-A3E1-48B5-B103-6CC7F6A06635}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5F5C628-A3E1-48B5-B103-6CC7F6A06635}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5F5C628-A3E1-48B5-B103-6CC7F6A06635}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5F5C628-A3E1-48B5-B103-6CC7F6A06635}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/examples/readme-config/src/SeedExamples/SeedExamples.csproj b/seed/csharp-sdk/examples/readme-config/src/SeedExamples/SeedExamples.csproj index fea22d69c78..019799fa845 100644 --- a/seed/csharp-sdk/examples/readme-config/src/SeedExamples/SeedExamples.csproj +++ b/seed/csharp-sdk/examples/readme-config/src/SeedExamples/SeedExamples.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/examples/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/exhaustive/.github/workflows/ci.yml b/seed/csharp-sdk/exhaustive/.github/workflows/ci.yml deleted file mode 100644 index f57a57e3b37..00000000000 --- a/seed/csharp-sdk/exhaustive/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedExhaustive/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/exhaustive/.gitignore b/seed/csharp-sdk/exhaustive/.gitignore deleted file mode 100644 index 9965de29662..00000000000 --- a/seed/csharp-sdk/exhaustive/.gitignore +++ /dev/null @@ -1,477 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/api.yml b/seed/csharp-sdk/exhaustive/.mock/definition/api.yml deleted file mode 100644 index dd65915538f..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/api.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: exhaustive -auth: bearer -error-discrimination: - strategy: status-code diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/container.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/container.yml deleted file mode 100644 index 165a039dc65..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/container.yml +++ /dev/null @@ -1,48 +0,0 @@ -imports: - objects: ../types/object.yml - -service: - auth: true - base-path: /container - endpoints: - getAndReturnListOfPrimitives: - path: /list-of-primitives - method: POST - request: list - response: list - - getAndReturnListOfObjects: - path: /list-of-objects - method: POST - request: list - response: list - - getAndReturnSetOfPrimitives: - path: /set-of-primitives - method: POST - request: set - response: set - - getAndReturnSetOfObjects: - path: /set-of-objects - method: POST - request: set - response: set - - getAndReturnMapPrimToPrim: - path: /map-prim-to-prim - method: POST - request: map - response: map - - getAndReturnMapOfPrimToObject: - path: /map-prim-to-object - method: POST - request: map - response: map - - getAndReturnOptional: - path: /opt-objects - method: POST - request: optional - response: optional diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/enum.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/enum.yml deleted file mode 100644 index 335a0889cc7..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/enum.yml +++ /dev/null @@ -1,12 +0,0 @@ -imports: - enums: ../types/enum.yml - -service: - auth: true - base-path: /enum - endpoints: - getAndReturnEnum: - method: POST - path: "" - request: enums.WeatherReport - response: enums.WeatherReport diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/http-methods.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/http-methods.yml deleted file mode 100644 index 51a54c0802c..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/http-methods.yml +++ /dev/null @@ -1,43 +0,0 @@ -imports: - objects: ../types/object.yml - -service: - auth: true - base-path: /http-methods - - endpoints: - testGet: - method: GET - path: /{id} - path-parameters: - id: string - response: string - - testPost: - method: POST - path: "" - request: objects.ObjectWithRequiredField - response: objects.ObjectWithOptionalField - - testPut: - method: PUT - path: /{id} - path-parameters: - id: string - request: objects.ObjectWithRequiredField - response: objects.ObjectWithOptionalField - - testPatch: - method: PATCH - path: /{id} - path-parameters: - id: string - request: objects.ObjectWithOptionalField - response: objects.ObjectWithOptionalField - - testDelete: - method: DELETE - path: /{id} - path-parameters: - id: string - response: boolean diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/object.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/object.yml deleted file mode 100644 index 9fad6aa2776..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/object.yml +++ /dev/null @@ -1,44 +0,0 @@ -imports: - objects: ../types/object.yml - -service: - auth: true - base-path: /object - endpoints: - getAndReturnWithOptionalField: - path: /get-and-return-with-optional-field - method: POST - request: objects.ObjectWithOptionalField - response: objects.ObjectWithOptionalField - - getAndReturnWithRequiredField: - path: /get-and-return-with-required-field - method: POST - request: objects.ObjectWithRequiredField - response: objects.ObjectWithRequiredField - - getAndReturnWithMapOfMap: - path: /get-and-return-with-map-of-map - method: POST - request: objects.ObjectWithMapOfMap - response: objects.ObjectWithMapOfMap - - getAndReturnNestedWithOptionalField: - path: /get-and-return-nested-with-optional-field - method: POST - request: objects.NestedObjectWithOptionalField - response: objects.NestedObjectWithOptionalField - - getAndReturnNestedWithRequiredField: - path: /get-and-return-nested-with-required-field/{string} - method: POST - path-parameters: - string: string - request: objects.NestedObjectWithRequiredField - response: objects.NestedObjectWithRequiredField - - getAndReturnNestedWithRequiredFieldAsList: - path: /get-and-return-nested-with-required-field-list - method: POST - request: list - response: objects.NestedObjectWithRequiredField diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/params.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/params.yml deleted file mode 100644 index 7766547ad79..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/params.yml +++ /dev/null @@ -1,57 +0,0 @@ -service: - auth: true - base-path: /params - endpoints: - getWithPath: - docs: GET with path param - path: /path/{param} - path-parameters: - param: string - method: GET - response: string - - getWithQuery: - docs: GET with query param - path: "" - method: GET - request: - name: GetWithQuery - query-parameters: - query: string #mandatory for test - number: integer - - getWithAllowMultipleQuery: - docs: GET with multiple of same query param - path: "" - method: GET - request: - name: GetWithMultipleQuery - query-parameters: - query: - type: string - allow-multiple: true - numer: - type: integer - allow-multiple: true - - getWithPathAndQuery: - docs: GET with path and query params - path: /path-query/{param} - path-parameters: - param: string - method: GET - request: - name: GetWithPathAndQuery - query-parameters: - query: string #mandatory for test - - modifyWithPath: - docs: PUT to update with path param - path: /path/{param} - path-parameters: - param: string - method: PUT - request: - name: ModifyResourceAtPath - body: string - response: string diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/primitive.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/primitive.yml deleted file mode 100644 index 8dd7674164c..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/primitive.yml +++ /dev/null @@ -1,60 +0,0 @@ -imports: - objects: ../types/object.yml - -service: - auth: true - base-path: /primitive - endpoints: - getAndReturnString: - path: /string - method: POST - request: string - response: string - - getAndReturnInt: - path: /integer - method: POST - request: integer - response: integer - - getAndReturnLong: - path: /long - method: POST - request: long - response: long - - getAndReturnDouble: - path: /double - method: POST - request: double - response: double - - getAndReturnBool: - path: /boolean - method: POST - request: boolean - response: boolean - - getAndReturnDatetime: - path: /datetime - method: POST - request: datetime - response: datetime - - getAndReturnDate: - path: /date - method: POST - request: date - response: date - - getAndReturnUUID: - path: /uuid - method: POST - request: uuid - response: uuid - - getAndReturnBase64: - path: /base64 - method: POST - request: base64 - response: base64 diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/union.yml b/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/union.yml deleted file mode 100644 index ce9021160d7..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/endpoints/union.yml +++ /dev/null @@ -1,12 +0,0 @@ -imports: - unions: ../types/union.yml - -service: - auth: true - base-path: /union - endpoints: - getAndReturnUnion: - method: POST - path: "" - request: unions.Animal - response: unions.Animal diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/general-errors.yml b/seed/csharp-sdk/exhaustive/.mock/definition/general-errors.yml deleted file mode 100644 index 5fbf9cfc417..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/general-errors.yml +++ /dev/null @@ -1,9 +0,0 @@ -errors: - BadRequestBody: - status-code: 400 - type: BadObjectRequestInfo - -types: - BadObjectRequestInfo: - properties: - message: string diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/inlined-requests.yml b/seed/csharp-sdk/exhaustive/.mock/definition/inlined-requests.yml deleted file mode 100644 index 9347fe7e335..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/inlined-requests.yml +++ /dev/null @@ -1,25 +0,0 @@ -imports: - objects: ./types/object.yml - errors: ./general-errors.yml - -# test req bodies, path params, query params, multiple query params, etc. -# test union and enum as well - -service: - auth: false - base-path: /req-bodies - endpoints: - postWithObjectBodyandResponse: - docs: POST with custom object in request body, response is an object - path: /object - method: POST - request: - name: PostWithObjectBody - body: - properties: - string: string - integer: integer - NestedObject: objects.ObjectWithOptionalField - response: objects.ObjectWithOptionalField - errors: - - errors.BadRequestBody diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/no-auth.yml b/seed/csharp-sdk/exhaustive/.mock/definition/no-auth.yml deleted file mode 100644 index e3c33ed7fab..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/no-auth.yml +++ /dev/null @@ -1,20 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -imports: - general-errors: ./general-errors.yml - -service: - auth: false - base-path: /no-auth - endpoints: - postWithNoAuth: - auth: false - docs: POST request with no auth - path: "" - method: POST - request: - name: PostWithNoAuth - body: unknown - response: boolean - errors: - - general-errors.BadRequestBody diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/no-req-body.yml b/seed/csharp-sdk/exhaustive/.mock/definition/no-req-body.yml deleted file mode 100644 index daffd9a495c..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/no-req-body.yml +++ /dev/null @@ -1,16 +0,0 @@ -imports: - objects: ./types/object.yml - -service: - auth: true - base-path: /no-req-body - endpoints: - getWithNoRequestBody: - path: "" - method: GET - response: objects.ObjectWithOptionalField - - postWithNoRequestBody: - path: "" - method: POST - response: string diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/req-with-headers.yml b/seed/csharp-sdk/exhaustive/.mock/definition/req-with-headers.yml deleted file mode 100644 index 9e49725782f..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/req-with-headers.yml +++ /dev/null @@ -1,14 +0,0 @@ -service: - base-path: /test-headers - auth: true - headers: - X-TEST-SERVICE-HEADER: string - endpoints: - getWithCustomHeader: - path: /custom-header - method: POST - request: - name: ReqWithHeaders - headers: - X-TEST-ENDPOINT-HEADER: string - body: string diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/types/enum.yml b/seed/csharp-sdk/exhaustive/.mock/definition/types/enum.yml deleted file mode 100644 index a90686092e9..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/types/enum.yml +++ /dev/null @@ -1,12 +0,0 @@ -types: - WeatherReport: - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING - -errors: - ErrorWithEnumBody: - status-code: 400 - type: WeatherReport #does this even make sense? the type of the error body would be enum, and it could only be one of the 4 values? diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/types/object.yml b/seed/csharp-sdk/exhaustive/.mock/definition/types/object.yml deleted file mode 100644 index a165ed94cfe..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/types/object.yml +++ /dev/null @@ -1,59 +0,0 @@ -types: - ObjectWithOptionalField: #generic object that supports any type, makes it easier to use when testing - properties: - string: - type: optional - docs: This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. - integer: optional - long: optional - double: optional - bool: optional - datetime: optional - date: optional - uuid: optional - base64: optional - list: optional> - set: optional> - map: optional> - bigint: optional - - ObjectWithRequiredField: - properties: - string: string - - ObjectWithMapOfMap: - properties: - map: map> - - NestedObjectWithOptionalField: - properties: - string: optional - NestedObject: optional - - NestedObjectWithRequiredField: - properties: - string: string - NestedObject: ObjectWithOptionalField - - DoubleOptional: - properties: - optionalAlias: optional - - OptionalAlias: optional - -errors: - ObjectWithOptionalFieldError: - status-code: 400 - type: ObjectWithOptionalField - - ObjectWithRequiredFieldError: - status-code: 400 - type: ObjectWithRequiredField - - NestedObjectWithOptionalFieldError: - status-code: 400 - type: NestedObjectWithOptionalField - - NestedObjectWithRequiredFieldError: - status-code: 400 - type: NestedObjectWithRequiredField diff --git a/seed/csharp-sdk/exhaustive/.mock/definition/types/union.yml b/seed/csharp-sdk/exhaustive/.mock/definition/types/union.yml deleted file mode 100644 index 99ce8c75ed0..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/definition/types/union.yml +++ /dev/null @@ -1,21 +0,0 @@ -types: - Animal: - discriminant: animal - union: - dog: Dog - cat: Cat - - Dog: - properties: - name: string - likesToWoof: boolean - - Cat: - properties: - name: string - likesToMeow: boolean - -errors: - ErrorWithUnionBody: - status-code: 400 - type: Animal #has to send either dog or cat object in error body diff --git a/seed/csharp-sdk/exhaustive/.mock/fern.config.json b/seed/csharp-sdk/exhaustive/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/exhaustive/.mock/generators.yml b/seed/csharp-sdk/exhaustive/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/exhaustive/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs index a24f6e78ff6..5572de663e2 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj index 6079b5642c6..cc628bfe61c 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs index 432e53acf06..39f52430b49 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.sln b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.sln new file mode 100644 index 00000000000..96a4273789b --- /dev/null +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive", "SeedExhaustive\SeedExhaustive.csproj", "{064477CB-3E62-4EBC-9AA0-914FF46059FB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive.Test", "SeedExhaustive.Test\SeedExhaustive.Test.csproj", "{0890D69E-197E-4691-B1F5-39405824BA85}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {064477CB-3E62-4EBC-9AA0-914FF46059FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {064477CB-3E62-4EBC-9AA0-914FF46059FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {064477CB-3E62-4EBC-9AA0-914FF46059FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {064477CB-3E62-4EBC-9AA0-914FF46059FB}.Release|Any CPU.Build.0 = Release|Any CPU + {0890D69E-197E-4691-B1F5-39405824BA85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0890D69E-197E-4691-B1F5-39405824BA85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0890D69E-197E-4691-B1F5-39405824BA85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0890D69E-197E-4691-B1F5-39405824BA85}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/SeedExhaustive.csproj b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/SeedExhaustive.csproj index 5c9a6517d3f..9a606e36c56 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/SeedExhaustive.csproj +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/SeedExhaustive.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs index a24f6e78ff6..5572de663e2 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj index 6079b5642c6..cc628bfe61c 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs index 432e53acf06..39f52430b49 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.sln b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.sln new file mode 100644 index 00000000000..04eced60f12 --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive", "SeedExhaustive\SeedExhaustive.csproj", "{74CF4D2F-7503-47EB-AC4A-75EDE80488E6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive.Test", "SeedExhaustive.Test\SeedExhaustive.Test.csproj", "{9D825F7B-31CA-4BB5-88F0-390E48206AA9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {74CF4D2F-7503-47EB-AC4A-75EDE80488E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74CF4D2F-7503-47EB-AC4A-75EDE80488E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74CF4D2F-7503-47EB-AC4A-75EDE80488E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74CF4D2F-7503-47EB-AC4A-75EDE80488E6}.Release|Any CPU.Build.0 = Release|Any CPU + {9D825F7B-31CA-4BB5-88F0-390E48206AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D825F7B-31CA-4BB5-88F0-390E48206AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D825F7B-31CA-4BB5-88F0-390E48206AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D825F7B-31CA-4BB5-88F0-390E48206AA9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/SeedExhaustive.csproj b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/SeedExhaustive.csproj index 5c9a6517d3f..9a606e36c56 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/SeedExhaustive.csproj +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/SeedExhaustive.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs index a24f6e78ff6..5572de663e2 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj index 6079b5642c6..cc628bfe61c 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs index aacc3575004..1ea66db04d3 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/BaseMockServerTest.cs @@ -36,5 +36,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.sln b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.sln new file mode 100644 index 00000000000..998b00e03d8 --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive", "SeedExhaustive\SeedExhaustive.csproj", "{7E1588CB-BC41-4AC6-AE0D-D072F64DD6CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExhaustive.Test", "SeedExhaustive.Test\SeedExhaustive.Test.csproj", "{3AF88E47-A07E-4912-B468-52A858509D82}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7E1588CB-BC41-4AC6-AE0D-D072F64DD6CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E1588CB-BC41-4AC6-AE0D-D072F64DD6CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E1588CB-BC41-4AC6-AE0D-D072F64DD6CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E1588CB-BC41-4AC6-AE0D-D072F64DD6CA}.Release|Any CPU.Build.0 = Release|Any CPU + {3AF88E47-A07E-4912-B468-52A858509D82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AF88E47-A07E-4912-B468-52A858509D82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AF88E47-A07E-4912-B468-52A858509D82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AF88E47-A07E-4912-B468-52A858509D82}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/SeedExhaustive.csproj b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/SeedExhaustive.csproj index 5c9a6517d3f..9a606e36c56 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/SeedExhaustive.csproj +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/SeedExhaustive.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/exhaustive/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/exhaustive/snippet-templates.json b/seed/csharp-sdk/exhaustive/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/exhaustive/snippet.json b/seed/csharp-sdk/exhaustive/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj b/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj deleted file mode 100644 index de634df8c3f..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/SeedExhaustive.Test.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/TestClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/TestClient.cs deleted file mode 100644 index acd74bcc5fd..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedExhaustive.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/ClientOptions.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/ClientOptions.cs deleted file mode 100644 index 46bacbeeede..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/ClientOptions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net.Http; - -#nullable enable - -namespace SeedExhaustive.Core; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request in seconds. - /// - public int TimeoutInSeconds { get; init; } = 30; -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/CollectionItemSerializer.cs deleted file mode 100644 index 8395b72b680..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedExhaustive.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -public class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/Constants.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/Constants.cs deleted file mode 100644 index 71df1cc4a74..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedExhaustive.Core; - -public static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/DateTimeSerializer.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/DateTimeSerializer.cs deleted file mode 100644 index 9ae8e088585..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedExhaustive.Core; - -public class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/HttpMethodExtensions.cs deleted file mode 100644 index 3b2d73dd40b..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedExhaustive.Core; - -public static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/JsonConfiguration.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/JsonConfiguration.cs deleted file mode 100644 index c4a7baf237d..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/JsonConfiguration.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Text.Json; - -namespace SeedExhaustive.Core; - -public static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true - }; - } -} - -public static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/OneOfSerializer.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/OneOfSerializer.cs deleted file mode 100644 index 436e818be12..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedExhaustive.Core; - -public class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/RawClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/RawClient.cs deleted file mode 100644 index 3d5e0af6ca3..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/RawClient.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System.Net.Http; -using System.Text; - -namespace SeedExhaustive.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -public class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - public async Task MakeRequestAsync(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var response = await Options.HttpClient.SendAsync(httpRequest); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public object? RequestOptions { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var trimmedBaseUrl = request.BaseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => current + $"{queryItem.Key}={queryItem.Value}&" - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/StringEnumSerializer.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/StringEnumSerializer.cs deleted file mode 100644 index b5eabf20de4..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedExhaustive.Core; - -public class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs deleted file mode 100644 index cee9cde0f41..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Container/ContainerClient.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class ContainerClient -{ - private RawClient _client; - - public ContainerClient(RawClient client) - { - _client = client; - } - - public async Task> GetAndReturnListOfPrimitivesAsync( - IEnumerable request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/list-of-primitives", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task> GetAndReturnListOfObjectsAsync( - IEnumerable request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/list-of-objects", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task> GetAndReturnSetOfPrimitivesAsync(HashSet request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/set-of-primitives", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task> GetAndReturnSetOfObjectsAsync( - HashSet request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/set-of-objects", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task> GetAndReturnMapPrimToPrimAsync( - Dictionary request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/map-prim-to-prim", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task< - Dictionary - > GetAndReturnMapOfPrimToObjectAsync(Dictionary request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/map-prim-to-object", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize>( - responseBody - )!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnOptionalAsync( - ObjectWithRequiredField? request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/container/opt-objects", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/EndpointsClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/EndpointsClient.cs deleted file mode 100644 index b40de4b41dc..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/EndpointsClient.cs +++ /dev/null @@ -1,37 +0,0 @@ -using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class EndpointsClient -{ - private RawClient _client; - - public EndpointsClient(RawClient client) - { - _client = client; - Container = new ContainerClient(_client); - Enum = new EnumClient(_client); - HttpMethods = new HttpMethodsClient(_client); - Object = new ObjectClient(_client); - Params = new ParamsClient(_client); - Primitive = new PrimitiveClient(_client); - Union = new UnionClient(_client); - } - - public ContainerClient Container { get; } - - public EnumClient Enum { get; } - - public HttpMethodsClient HttpMethods { get; } - - public ObjectClient Object { get; } - - public ParamsClient Params { get; } - - public PrimitiveClient Primitive { get; } - - public UnionClient Union { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Enum/EnumClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Enum/EnumClient.cs deleted file mode 100644 index c8ce8e0a258..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Enum/EnumClient.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class EnumClient -{ - private RawClient _client; - - public EnumClient(RawClient client) - { - _client = client; - } - - public async Task GetAndReturnEnumAsync(WeatherReport request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/enum", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs deleted file mode 100644 index 9c92e5581fc..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/HttpMethods/HttpMethodsClient.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class HttpMethodsClient -{ - private RawClient _client; - - public HttpMethodsClient(RawClient client) - { - _client = client; - } - - public async Task TestGetAsync(string id) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = $"/http-methods/{id}" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task TestPostAsync(ObjectWithRequiredField request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/http-methods", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task TestPutAsync( - string id, - ObjectWithRequiredField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Put, - Path = $"/http-methods/{id}", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task TestPatchAsync( - string id, - ObjectWithOptionalField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethodExtensions.Patch, - Path = $"/http-methods/{id}", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task TestDeleteAsync(string id) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Delete, - Path = $"/http-methods/{id}" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs deleted file mode 100644 index 5830657471b..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class ObjectClient -{ - private RawClient _client; - - public ObjectClient(RawClient client) - { - _client = client; - } - - public async Task GetAndReturnWithOptionalFieldAsync( - ObjectWithOptionalField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/object/get-and-return-with-optional-field", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnWithRequiredFieldAsync( - ObjectWithRequiredField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/object/get-and-return-with-required-field", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnWithMapOfMapAsync(ObjectWithMapOfMap request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/object/get-and-return-with-map-of-map", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnNestedWithOptionalFieldAsync( - NestedObjectWithOptionalField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/object/get-and-return-nested-with-optional-field", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnNestedWithRequiredFieldAsync( - string string_, - NestedObjectWithRequiredField request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = $"/object/get-and-return-nested-with-required-field/{string_}", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnNestedWithRequiredFieldAsListAsync( - IEnumerable request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/object/get-and-return-nested-with-required-field-list", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/ParamsClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/ParamsClient.cs deleted file mode 100644 index edce85b0b21..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/ParamsClient.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class ParamsClient -{ - private RawClient _client; - - public ParamsClient(RawClient client) - { - _client = client; - } - - /// - /// GET with path param - /// - public async Task GetWithPathAsync(string param) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = $"/params/path/{param}" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - /// - /// GET with query param - /// - public async Task GetWithQueryAsync(GetWithQuery request) - { - var _query = new Dictionary() - { - { "query", request.Query }, - { "number", request.Number.ToString() }, - }; - await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = "/params", - Query = _query - } - ); - } - - /// - /// GET with multiple of same query param - /// - public async Task GetWithAllowMultipleQueryAsync(GetWithMultipleQuery request) - { - var _query = new Dictionary() - { - { "query", request.Query }, - { "numer", request.Numer.ToString() }, - }; - await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = "/params", - Query = _query - } - ); - } - - /// - /// GET with path and query params - /// - public async Task GetWithPathAndQueryAsync(string param, GetWithPathAndQuery request) - { - var _query = new Dictionary() { { "query", request.Query }, }; - await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = $"/params/path-query/{param}", - Query = _query - } - ); - } - - /// - /// PUT to update with path param - /// - public async Task ModifyWithPathAsync(string param, string request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Put, - Path = $"/params/path/{param}", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithMultipleQuery.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithMultipleQuery.cs deleted file mode 100644 index ac0b70ce277..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithMultipleQuery.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SeedExhaustive.Endpoints; - -public record GetWithMultipleQuery -{ - public required string Query { get; } - - public required int Numer { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithPathAndQuery.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithPathAndQuery.cs deleted file mode 100644 index 4a1bbcaa204..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithPathAndQuery.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedExhaustive.Endpoints; - -public record GetWithPathAndQuery -{ - public required string Query { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithQuery.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithQuery.cs deleted file mode 100644 index 1e79c7d5ae0..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Params/Requests/GetWithQuery.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SeedExhaustive.Endpoints; - -public record GetWithQuery -{ - public required string Query { get; } - - public required int Number { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Primitive/PrimitiveClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Primitive/PrimitiveClient.cs deleted file mode 100644 index c1fab3833be..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Primitive/PrimitiveClient.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class PrimitiveClient -{ - private RawClient _client; - - public PrimitiveClient(RawClient client) - { - _client = client; - } - - public async Task GetAndReturnStringAsync(string request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/string", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnIntAsync(int request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/integer", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnLongAsync(long request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/long", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnDoubleAsync(double request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/double", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnBoolAsync(bool request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/boolean", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnDatetimeAsync(DateTime request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/datetime", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnDateAsync(DateOnly request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/date", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnUuidAsync(string request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/uuid", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task GetAndReturnBase64Async(string request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/primitive/base64", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Union/UnionClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Union/UnionClient.cs deleted file mode 100644 index d09941b201c..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Endpoints/Union/UnionClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive.Endpoints; - -public class UnionClient -{ - private RawClient _client; - - public UnionClient(RawClient client) - { - _client = client; - } - - public async Task GetAndReturnUnionAsync(object request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/union", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/GeneralErrorsClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/GeneralErrorsClient.cs deleted file mode 100644 index 75a09dcdaf0..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/GeneralErrorsClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive; - -public class GeneralErrorsClient -{ - private RawClient _client; - - public GeneralErrorsClient(RawClient client) - { - _client = client; - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/Types/BadObjectRequestInfo.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/Types/BadObjectRequestInfo.cs deleted file mode 100644 index cdafeb2bede..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/GeneralErrors/Types/BadObjectRequestInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive; - -public record BadObjectRequestInfo -{ - [JsonPropertyName("message")] - public required string Message { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs deleted file mode 100644 index 3340b88746e..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/InlinedRequestsClient.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Net.Http; -using SeedExhaustive; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive; - -public class InlinedRequestsClient -{ - private RawClient _client; - - public InlinedRequestsClient(RawClient client) - { - _client = client; - } - - /// - /// POST with custom object in request body, response is an object - /// - public async Task PostWithObjectBodyandResponseAsync( - PostWithObjectBody request - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/req-bodies/object", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/Requests/PostWithObjectBody.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/Requests/PostWithObjectBody.cs deleted file mode 100644 index e2991e8ff16..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/InlinedRequests/Requests/PostWithObjectBody.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Text.Json.Serialization; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive; - -public record PostWithObjectBody -{ - [JsonPropertyName("string")] - public required string String { get; } - - [JsonPropertyName("integer")] - public required int Integer { get; } - - [JsonPropertyName("NestedObject")] - public required ObjectWithOptionalField NestedObject { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoAuth/NoAuthClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoAuth/NoAuthClient.cs deleted file mode 100644 index 338818bac46..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoAuth/NoAuthClient.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive; - -public class NoAuthClient -{ - private RawClient _client; - - public NoAuthClient(RawClient client) - { - _client = client; - } - - /// - /// POST request with no auth - /// - public async Task PostWithNoAuthAsync(object request) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/no-auth", - Body = request - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoReqBody/NoReqBodyClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoReqBody/NoReqBodyClient.cs deleted file mode 100644 index b57ef85a21b..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/NoReqBody/NoReqBodyClient.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Net.Http; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive; - -public class NoReqBodyClient -{ - private RawClient _client; - - public NoReqBodyClient(RawClient client) - { - _client = client; - } - - public async Task GetWithNoRequestBodyAsync() - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = "/no-req-body" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } - - public async Task PostWithNoRequestBodyAsync() - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/no-req-body" - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - return JsonUtils.Deserialize(responseBody)!; - } - throw new Exception(responseBody); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/ReqWithHeadersClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/ReqWithHeadersClient.cs deleted file mode 100644 index f082d6a37aa..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/ReqWithHeadersClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Net.Http; -using SeedExhaustive; -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive; - -public class ReqWithHeadersClient -{ - private RawClient _client; - - public ReqWithHeadersClient(RawClient client) - { - _client = client; - } - - public async Task GetWithCustomHeaderAsync(ReqWithHeaders request) - { - var _headers = new Dictionary() - { - { "X-TEST-ENDPOINT-HEADER", request.XTestEndpointHeader }, - }; - await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/test-headers/custom-header", - Body = request.Body, - Headers = _headers - } - ); - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/Requests/ReqWithHeaders.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/Requests/ReqWithHeaders.cs deleted file mode 100644 index 5516510d2d3..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/ReqWithHeaders/Requests/ReqWithHeaders.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SeedExhaustive; - -public record ReqWithHeaders -{ - public required string XTestEndpointHeader { get; } - - public required string Body { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj deleted file mode 100644 index 2b10d803a14..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustive.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustiveClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustiveClient.cs deleted file mode 100644 index 65dbcc2d7c3..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/SeedExhaustiveClient.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using SeedExhaustive; -using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive; - -public partial class SeedExhaustiveClient -{ - private RawClient _client; - - public SeedExhaustiveClient(string token, ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() { { "X-Fern-Language", "C#" }, }, - new Dictionary>() { }, - clientOptions ?? new ClientOptions() - ); - Endpoints = new EndpointsClient(_client); - GeneralErrors = new GeneralErrorsClient(_client); - InlinedRequests = new InlinedRequestsClient(_client); - NoAuth = new NoAuthClient(_client); - NoReqBody = new NoReqBodyClient(_client); - ReqWithHeaders = new ReqWithHeadersClient(_client); - Types = new TypesClient(_client); - } - - public EndpointsClient Endpoints { get; init; } - - public GeneralErrorsClient GeneralErrors { get; init; } - - public InlinedRequestsClient InlinedRequests { get; init; } - - public NoAuthClient NoAuth { get; init; } - - public NoReqBodyClient NoReqBody { get; init; } - - public ReqWithHeadersClient ReqWithHeaders { get; init; } - - public TypesClient Types { get; init; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/EnumClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/EnumClient.cs deleted file mode 100644 index b5043ed15df..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/EnumClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive.Types; - -public class EnumClient -{ - private RawClient _client; - - public EnumClient(RawClient client) - { - _client = client; - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/Types/WeatherReport.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/Types/WeatherReport.cs deleted file mode 100644 index f767ce9ebf8..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Enum/Types/WeatherReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json.Serialization; -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Types; - -[JsonConverter(typeof(StringEnumSerializer))] -public enum WeatherReport -{ - [EnumMember(Value = "SUNNY")] - Sunny, - - [EnumMember(Value = "CLOUDY")] - Cloudy, - - [EnumMember(Value = "RAINING")] - Raining, - - [EnumMember(Value = "SNOWING")] - Snowing -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/ObjectClient.cs deleted file mode 100644 index 39ffac3b94f..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/ObjectClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive.Types; - -public class ObjectClient -{ - private RawClient _client; - - public ObjectClient(RawClient client) - { - _client = client; - } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/DoubleOptional.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/DoubleOptional.cs deleted file mode 100644 index c3507857f05..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/DoubleOptional.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record DoubleOptional -{ - [JsonPropertyName("optionalAlias")] - public string? OptionalAlias { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithOptionalField.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithOptionalField.cs deleted file mode 100644 index 31ffb59795c..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithOptionalField.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record NestedObjectWithOptionalField -{ - [JsonPropertyName("string")] - public string? String { get; } - - [JsonPropertyName("NestedObject")] - public ObjectWithOptionalField? NestedObject { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithRequiredField.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithRequiredField.cs deleted file mode 100644 index e3649063778..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/NestedObjectWithRequiredField.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Text.Json.Serialization; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record NestedObjectWithRequiredField -{ - [JsonPropertyName("string")] - public required string String { get; } - - [JsonPropertyName("NestedObject")] - public required ObjectWithOptionalField NestedObject { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithMapOfMap.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithMapOfMap.cs deleted file mode 100644 index c00fe82600e..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithMapOfMap.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record ObjectWithMapOfMap -{ - [JsonPropertyName("map")] - public Dictionary> Map { get; } = - new Dictionary>(); -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithOptionalField.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithOptionalField.cs deleted file mode 100644 index 3220701e9ad..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithOptionalField.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record ObjectWithOptionalField -{ - /// - /// This is a rather long descriptor of this single field in a more complex type. If you ask me I think this is a pretty good description for this field all things considered. - /// - [JsonPropertyName("string")] - public string? String { get; } - - [JsonPropertyName("integer")] - public int? Integer { get; } - - [JsonPropertyName("long")] - public long? Long { get; } - - [JsonPropertyName("double")] - public double? Double { get; } - - [JsonPropertyName("bool")] - public bool? Bool { get; } - - [JsonPropertyName("datetime")] - public DateTime? Datetime { get; } - - [JsonPropertyName("date")] - public DateOnly? Date { get; } - - [JsonPropertyName("uuid")] - public string? Uuid { get; } - - [JsonPropertyName("base64")] - public string? Base64 { get; } - - [JsonPropertyName("list")] - public IEnumerable? List { get; } - - [JsonPropertyName("set")] - public HashSet? Set { get; } - - [JsonPropertyName("map")] - public Dictionary? Map { get; } - - [JsonPropertyName("bigint")] - public int? Bigint { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithRequiredField.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithRequiredField.cs deleted file mode 100644 index f05ffe2e23a..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Object/Types/ObjectWithRequiredField.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record ObjectWithRequiredField -{ - [JsonPropertyName("string")] - public required string String { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/TypesClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/TypesClient.cs deleted file mode 100644 index 607f1e1b3c0..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/TypesClient.cs +++ /dev/null @@ -1,25 +0,0 @@ -using SeedExhaustive.Core; -using SeedExhaustive.Types; - -#nullable enable - -namespace SeedExhaustive.Types; - -public class TypesClient -{ - private RawClient _client; - - public TypesClient(RawClient client) - { - _client = client; - Enum = new EnumClient(_client); - Object = new ObjectClient(_client); - Union = new UnionClient(_client); - } - - public EnumClient Enum { get; } - - public ObjectClient Object { get; } - - public UnionClient Union { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Cat.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Cat.cs deleted file mode 100644 index 4ec3e3d0982..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Cat.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record Cat -{ - [JsonPropertyName("name")] - public required string Name { get; } - - [JsonPropertyName("likesToMeow")] - public required bool LikesToMeow { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Dog.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Dog.cs deleted file mode 100644 index ac225b420ed..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/Types/Dog.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedExhaustive.Types; - -public record Dog -{ - [JsonPropertyName("name")] - public required string Name { get; } - - [JsonPropertyName("likesToWoof")] - public required bool LikesToWoof { get; } -} diff --git a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/UnionClient.cs b/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/UnionClient.cs deleted file mode 100644 index c15404ad06b..00000000000 --- a/seed/csharp-sdk/exhaustive/src/SeedExhaustive/Types/Union/UnionClient.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SeedExhaustive.Core; - -#nullable enable - -namespace SeedExhaustive.Types; - -public class UnionClient -{ - private RawClient _client; - - public UnionClient(RawClient client) - { - _client = client; - } -} diff --git a/seed/csharp-sdk/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs index b0c49d38916..6d9b555b690 100644 --- a/seed/csharp-sdk/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/extends/src/SeedExtends.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/extends/src/SeedExtends.Test/SeedExtends.Test.csproj b/seed/csharp-sdk/extends/src/SeedExtends.Test/SeedExtends.Test.csproj index 205ec201666..b460424eab6 100644 --- a/seed/csharp-sdk/extends/src/SeedExtends.Test/SeedExtends.Test.csproj +++ b/seed/csharp-sdk/extends/src/SeedExtends.Test/SeedExtends.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/extends/src/SeedExtends.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/extends/src/SeedExtends.Test/Unit/MockServer/BaseMockServerTest.cs index 196a480e02f..4e8e2b940a9 100644 --- a/seed/csharp-sdk/extends/src/SeedExtends.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/extends/src/SeedExtends.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/extends/src/SeedExtends.sln b/seed/csharp-sdk/extends/src/SeedExtends.sln new file mode 100644 index 00000000000..3c2cff7ba2a --- /dev/null +++ b/seed/csharp-sdk/extends/src/SeedExtends.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtends", "SeedExtends\SeedExtends.csproj", "{3CD221B7-7324-47A6-BF4E-11CA297C5DA0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtends.Test", "SeedExtends.Test\SeedExtends.Test.csproj", "{1FB58C9E-30DA-42E5-AC07-E09B2ABCC57C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3CD221B7-7324-47A6-BF4E-11CA297C5DA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CD221B7-7324-47A6-BF4E-11CA297C5DA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CD221B7-7324-47A6-BF4E-11CA297C5DA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CD221B7-7324-47A6-BF4E-11CA297C5DA0}.Release|Any CPU.Build.0 = Release|Any CPU + {1FB58C9E-30DA-42E5-AC07-E09B2ABCC57C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FB58C9E-30DA-42E5-AC07-E09B2ABCC57C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FB58C9E-30DA-42E5-AC07-E09B2ABCC57C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FB58C9E-30DA-42E5-AC07-E09B2ABCC57C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/extends/src/SeedExtends/SeedExtends.csproj b/seed/csharp-sdk/extends/src/SeedExtends/SeedExtends.csproj index 7d332e1d634..51cd1db405a 100644 --- a/seed/csharp-sdk/extends/src/SeedExtends/SeedExtends.csproj +++ b/seed/csharp-sdk/extends/src/SeedExtends/SeedExtends.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/extends/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs index b0d546572c6..7c571946c86 100644 --- a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj index 1339409021f..4b6eae5a36b 100644 --- a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj +++ b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/SeedExtraProperties.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Unit/MockServer/BaseMockServerTest.cs index f2781dc9f58..ed9ff2d8d16 100644 --- a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.sln b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.sln new file mode 100644 index 00000000000..55734c4faa9 --- /dev/null +++ b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtraProperties", "SeedExtraProperties\SeedExtraProperties.csproj", "{3764FAA9-5354-46EB-8AF3-BE7AB6BE2A5D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedExtraProperties.Test", "SeedExtraProperties.Test\SeedExtraProperties.Test.csproj", "{B80588D0-9DB9-42FA-A0C5-0959A863F749}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3764FAA9-5354-46EB-8AF3-BE7AB6BE2A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3764FAA9-5354-46EB-8AF3-BE7AB6BE2A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3764FAA9-5354-46EB-8AF3-BE7AB6BE2A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3764FAA9-5354-46EB-8AF3-BE7AB6BE2A5D}.Release|Any CPU.Build.0 = Release|Any CPU + {B80588D0-9DB9-42FA-A0C5-0959A863F749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B80588D0-9DB9-42FA-A0C5-0959A863F749}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B80588D0-9DB9-42FA-A0C5-0959A863F749}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B80588D0-9DB9-42FA-A0C5-0959A863F749}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj index a45da639e5e..b085b4751cd 100644 --- a/seed/csharp-sdk/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj +++ b/seed/csharp-sdk/extra-properties/src/SeedExtraProperties/SeedExtraProperties.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/extra-properties/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs index c0a4997b9de..43ce3eef991 100644 --- a/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj b/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj index 4ce7f332a68..92f414fcfb7 100644 --- a/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj +++ b/seed/csharp-sdk/file-download/src/SeedFileDownload.Test/SeedFileDownload.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/file-download/src/SeedFileDownload.sln b/seed/csharp-sdk/file-download/src/SeedFileDownload.sln new file mode 100644 index 00000000000..30d83ad70fe --- /dev/null +++ b/seed/csharp-sdk/file-download/src/SeedFileDownload.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileDownload", "SeedFileDownload\SeedFileDownload.csproj", "{21138A61-F968-4882-B2F7-7DE4FB2C76D6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileDownload.Test", "SeedFileDownload.Test\SeedFileDownload.Test.csproj", "{EF478AD0-D149-448B-A1C3-0F2ECEDF2D60}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {21138A61-F968-4882-B2F7-7DE4FB2C76D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21138A61-F968-4882-B2F7-7DE4FB2C76D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21138A61-F968-4882-B2F7-7DE4FB2C76D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21138A61-F968-4882-B2F7-7DE4FB2C76D6}.Release|Any CPU.Build.0 = Release|Any CPU + {EF478AD0-D149-448B-A1C3-0F2ECEDF2D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF478AD0-D149-448B-A1C3-0F2ECEDF2D60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF478AD0-D149-448B-A1C3-0F2ECEDF2D60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF478AD0-D149-448B-A1C3-0F2ECEDF2D60}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/file-download/src/SeedFileDownload/SeedFileDownload.csproj b/seed/csharp-sdk/file-download/src/SeedFileDownload/SeedFileDownload.csproj index 18ebe40da16..5e7a5f0b9b3 100644 --- a/seed/csharp-sdk/file-download/src/SeedFileDownload/SeedFileDownload.csproj +++ b/seed/csharp-sdk/file-download/src/SeedFileDownload/SeedFileDownload.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/file-download/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs index 0ead8f79135..a97647b8b1b 100644 --- a/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj b/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj index a11db87a960..e17786a850b 100644 --- a/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj +++ b/seed/csharp-sdk/file-upload/src/SeedFileUpload.Test/SeedFileUpload.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/file-upload/src/SeedFileUpload.sln b/seed/csharp-sdk/file-upload/src/SeedFileUpload.sln new file mode 100644 index 00000000000..21e37fe81e4 --- /dev/null +++ b/seed/csharp-sdk/file-upload/src/SeedFileUpload.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileUpload", "SeedFileUpload\SeedFileUpload.csproj", "{70B530A2-76D5-41C5-A411-FE2F1E3F2057}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedFileUpload.Test", "SeedFileUpload.Test\SeedFileUpload.Test.csproj", "{72743831-35C1-4775-9A80-0668AB1E20E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {70B530A2-76D5-41C5-A411-FE2F1E3F2057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70B530A2-76D5-41C5-A411-FE2F1E3F2057}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70B530A2-76D5-41C5-A411-FE2F1E3F2057}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70B530A2-76D5-41C5-A411-FE2F1E3F2057}.Release|Any CPU.Build.0 = Release|Any CPU + {72743831-35C1-4775-9A80-0668AB1E20E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72743831-35C1-4775-9A80-0668AB1E20E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72743831-35C1-4775-9A80-0668AB1E20E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72743831-35C1-4775-9A80-0668AB1E20E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/file-upload/src/SeedFileUpload/SeedFileUpload.csproj b/seed/csharp-sdk/file-upload/src/SeedFileUpload/SeedFileUpload.csproj index ee9fbfc593c..c1d87b48256 100644 --- a/seed/csharp-sdk/file-upload/src/SeedFileUpload/SeedFileUpload.csproj +++ b/seed/csharp-sdk/file-upload/src/SeedFileUpload/SeedFileUpload.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/file-upload/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/folders/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/folders/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/folders/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/folders/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/folders/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/folders/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/folders/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs index d60f783110a..564aee6a060 100644 --- a/seed/csharp-sdk/folders/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/folders/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/folders/src/SeedApi.sln b/seed/csharp-sdk/folders/src/SeedApi.sln new file mode 100644 index 00000000000..06433c06a50 --- /dev/null +++ b/seed/csharp-sdk/folders/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{5890DAD8-F59C-4F33-9905-14E98184752F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{7D7E4342-7B94-4284-948F-A77E6C10B14C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5890DAD8-F59C-4F33-9905-14E98184752F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5890DAD8-F59C-4F33-9905-14E98184752F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5890DAD8-F59C-4F33-9905-14E98184752F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5890DAD8-F59C-4F33-9905-14E98184752F}.Release|Any CPU.Build.0 = Release|Any CPU + {7D7E4342-7B94-4284-948F-A77E6C10B14C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D7E4342-7B94-4284-948F-A77E6C10B14C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D7E4342-7B94-4284-948F-A77E6C10B14C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D7E4342-7B94-4284-948F-A77E6C10B14C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/folders/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/folders/src/SeedApi/SeedApi.csproj index bba6a3d60b7..5c67ac4ddd0 100644 --- a/seed/csharp-sdk/folders/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/folders/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/folders/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.gitignore b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml deleted file mode 100644 index 972ed6d7b73..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/generators.yml +++ /dev/null @@ -1,6 +0,0 @@ -api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml deleted file mode 100644 index 062b98c2ccb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/overrides.yml +++ /dev/null @@ -1,56 +0,0 @@ - -paths: - /data/fetch: - get: - x-fern-request-name: FetchRequest - /data/list: - get: - x-fern-request-name: ListRequest -components: - schemas: - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value - DeleteRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - DescribeRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryColumn: - properties: - filter: - $ref: '#/components/schemas/Metadata' - ScoredColumn: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - UpdateRequest: - properties: - setMetadata: - $ref: '#/components/schemas/Metadata' - Column: - properties: - metadata: - $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md deleted file mode 100644 index a605ad810d0..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/SeedApi)](https://nuget.org/packages/SeedApi) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedApi -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedApi; - -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedApi; - -try { - var response = await client.Dataservice.UploadAsync(...); -} catch (SeedApiApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md deleted file mode 100644 index 830bacdc726..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/reference.md +++ /dev/null @@ -1,293 +0,0 @@ -# Reference -## DataService -
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UploadRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DeleteAsync(DeleteRequest { ... }) -> DeleteResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DeleteAsync(new DeleteRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DeleteRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DescribeAsync(DescribeRequest { ... }) -> DescribeResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DescribeAsync(new DescribeRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DescribeRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.FetchAsync(FetchRequest { ... }) -> FetchResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.FetchAsync(new FetchRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `FetchRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.ListAsync(ListRequest { ... }) -> ListResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.ListAsync(new ListRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `ListRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.QueryAsync(QueryRequest { ... }) -> QueryResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `QueryRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.UpdateAsync(UpdateRequest { ... }) -> UpdateResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UpdateRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet-templates.json b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json deleted file mode 100644 index 546b49b57ee..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/snippet.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/data", - "method": "POST", - "identifier_override": "endpoint_dataservice.upload" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/delete", - "method": "POST", - "identifier_override": "endpoint_dataservice.delete" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/describe", - "method": "POST", - "identifier_override": "endpoint_dataservice.describe" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/fetch", - "method": "GET", - "identifier_override": "endpoint_dataservice.fetch" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/list", - "method": "GET", - "identifier_override": "endpoint_dataservice.list" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/query", - "method": "POST", - "identifier_override": "endpoint_dataservice.query" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/update", - "method": "POST", - "identifier_override": "endpoint_dataservice.update" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/RawClientTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/RawClientTests.cs deleted file mode 100644 index df141253267..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index fd7b07f82e5..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Extensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Extensions.cs deleted file mode 100644 index 2e70f2719a2..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedApi.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HeaderValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HeaderValue.cs deleted file mode 100644 index 30df1c51646..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedApi.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Headers.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Headers.cs deleted file mode 100644 index 24bf3179299..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedApi.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 130464dace1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/IRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/IRequestOptions.cs deleted file mode 100644 index e365cd162f0..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/IRequestOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -internal interface IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs deleted file mode 100644 index 5c12019c489..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Net.Client; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The options used for gRPC client endpoints. - /// - public GrpcChannelOptions? GrpcOptions { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); - - /// - /// Clones this and returns a new instance - /// - internal ClientOptions Clone() - { - return new ClientOptions - { - BaseUrl = BaseUrl, - HttpClient = HttpClient, - MaxRetries = MaxRetries, - Timeout = Timeout, - Headers = new Headers(new Dictionary(Headers)), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/GrpcRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/GrpcRequestOptions.cs deleted file mode 100644 index 48c37927ea1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/GrpcRequestOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Core; -using SeedApi.Core; - -namespace SeedApi; - -#nullable enable - -public partial class GrpcRequestOptions -{ - /// - /// The maximum number of retry attempts. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// Options for write operations. - /// - public WriteOptions? WriteOptions { get; init; } - - /// - /// Client-side call credentials. Provide authorization with per-call granularity. - /// - public CallCredentials? CallCredentials { get; init; } - - /// - /// Headers to be sent with this particular request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/RequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/RequestOptions.cs deleted file mode 100644 index 4d560f8337a..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class RequestOptions : IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - Headers IRequestOptions.Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiApiException.cs deleted file mode 100644 index 8c81259a788..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedApi; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedApiApiException(string message, int statusCode, object body) - : SeedApiException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiException.cs deleted file mode 100644 index 14d9b8d9ddd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/SeedApiException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedApi; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedApiException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 8cff8b09a01..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - private readonly Lazy _grpc = new(() => new RawGrpcClient(clientOptions)); - - /// - /// The gRPC client used to make requests. - /// - public RawGrpcClient Grpc => _grpc.Value; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public IRequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse( - request.ContentType - ); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawGrpcClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawGrpcClient.cs deleted file mode 100644 index 657be1d946d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Core/RawGrpcClient.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using Grpc.Core; -using Grpc.Net.Client; - -namespace SeedApi.Core; - -/// -/// Utility class for making gRPC requests to the API. -/// -internal class RawGrpcClient -{ - /// - /// The gRPC channel used to make requests. - /// - public readonly GrpcChannel Channel; - - private readonly ClientOptions _clientOptions; - - public RawGrpcClient(ClientOptions clientOptions) - { - _clientOptions = clientOptions; - - var grpcOptions = PrepareGrpcChannelOptions(); - Channel = - grpcOptions != null - ? GrpcChannel.ForAddress(_clientOptions.BaseUrl, grpcOptions) - : GrpcChannel.ForAddress(_clientOptions.BaseUrl); - } - - /// - /// Prepares the gRPC metadata associated with the given request. - /// The provided request headers take precedence over the headers - /// associated with this client (which are sent on _every_ request). - /// - public CallOptions CreateCallOptions( - GrpcRequestOptions options, - CancellationToken cancellationToken = default - ) - { - var metadata = new global::Grpc.Core.Metadata(); - SetHeaders(metadata, _clientOptions.Headers); - SetHeaders(metadata, options.Headers); - - var timeout = options.Timeout ?? _clientOptions.Timeout; - var deadline = DateTime.UtcNow.Add(timeout); - return new CallOptions( - metadata, - deadline, - cancellationToken, - options.WriteOptions, - null, - options.CallCredentials - ); - } - - private void SetHeaders(global::Grpc.Core.Metadata metadata, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - metadata.Add(header.Key, value); - } - } - } - - private GrpcChannelOptions? PrepareGrpcChannelOptions() - { - var grpcChannelOptions = _clientOptions.GrpcOptions; - if (grpcChannelOptions == null) - { - return null; - } - grpcChannelOptions.HttpClient ??= _clientOptions.HttpClient; - grpcChannelOptions.MaxRetryAttempts ??= _clientOptions.MaxRetries; - return grpcChannelOptions; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs deleted file mode 100644 index 8da06ffed93..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/DataserviceClient.cs +++ /dev/null @@ -1,288 +0,0 @@ -using System.Threading; -using Data.V1.Grpc; -using Grpc.Core; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class DataserviceClient -{ - private RawClient _client; - - private RawGrpcClient _grpc; - - private DataService.DataServiceClient _dataService; - - internal DataserviceClient(RawClient client) - { - _client = client; - _grpc = _client.Grpc; - _dataService = new DataService.DataServiceClient(_grpc.Channel); - } - - /// - /// - /// await client.Dataservice.UploadAsync( - /// new UploadRequest - /// { - /// Columns = new List<Column>() - /// { - /// new Column - /// { - /// Id = "id", - /// Values = new List<float>() { 1.1f }, - /// }, - /// }, - /// } - /// ); - /// - /// - public async Task UploadAsync( - UploadRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UploadAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UploadResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DeleteAsync(new DeleteRequest()); - /// - /// - public async Task DeleteAsync( - DeleteRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DeleteAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DeleteResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DescribeAsync(new DescribeRequest()); - /// - /// - public async Task DescribeAsync( - DescribeRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DescribeAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DescribeResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.FetchAsync(new FetchRequest()); - /// - /// - public async Task FetchAsync( - FetchRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.FetchAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return FetchResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.ListAsync(new ListRequest()); - /// - /// - public async Task ListAsync( - ListRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.ListAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return ListResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); - /// - /// - public async Task QueryAsync( - QueryRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.QueryAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return QueryResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); - /// - /// - public async Task UpdateAsync( - UpdateRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UpdateAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UpdateResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DeleteRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DeleteRequest.cs deleted file mode 100644 index 10d785c72b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DeleteRequest.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteRequest -{ - [JsonPropertyName("ids")] - public IEnumerable? Ids { get; set; } - - [JsonPropertyName("deleteAll")] - public bool? DeleteAll { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteRequest ToProto() - { - var result = new Proto.DeleteRequest(); - if (Ids != null && Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (DeleteAll != null) - { - result.DeleteAll = DeleteAll ?? false; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DescribeRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DescribeRequest.cs deleted file mode 100644 index a9de06c69f4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/DescribeRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeRequest -{ - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeRequest ToProto() - { - var result = new Proto.DescribeRequest(); - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/FetchRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/FetchRequest.cs deleted file mode 100644 index 70ea06edfc4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/FetchRequest.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchRequest -{ - public IEnumerable Ids { get; set; } = new List(); - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchRequest type into its Protobuf-equivalent representation. - /// - internal Proto.FetchRequest ToProto() - { - var result = new Proto.FetchRequest(); - if (Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/ListRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/ListRequest.cs deleted file mode 100644 index afc15a6b93d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/ListRequest.cs +++ /dev/null @@ -1,47 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListRequest -{ - public string? Prefix { get; set; } - - public uint? Limit { get; set; } - - public string? PaginationToken { get; set; } - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListRequest type into its Protobuf-equivalent representation. - /// - internal Proto.ListRequest ToProto() - { - var result = new Proto.ListRequest(); - if (Prefix != null) - { - result.Prefix = Prefix ?? ""; - } - if (Limit != null) - { - result.Limit = Limit ?? 0; - } - if (PaginationToken != null) - { - result.PaginationToken = PaginationToken ?? ""; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/QueryRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/QueryRequest.cs deleted file mode 100644 index a47fc99c7a4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/QueryRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryRequest -{ - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("topK")] - public required uint TopK { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("includeValues")] - public bool? IncludeValues { get; set; } - - [JsonPropertyName("includeMetadata")] - public bool? IncludeMetadata { get; set; } - - [JsonPropertyName("queries")] - public IEnumerable? Queries { get; set; } - - [JsonPropertyName("column")] - public IEnumerable? Column { get; set; } - - [JsonPropertyName("id")] - public string? Id { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryRequest type into its Protobuf-equivalent representation. - /// - internal Proto.QueryRequest ToProto() - { - var result = new Proto.QueryRequest(); - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - result.TopK = TopK; - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IncludeValues != null) - { - result.IncludeValues = IncludeValues ?? false; - } - if (IncludeMetadata != null) - { - result.IncludeMetadata = IncludeMetadata ?? false; - } - if (Queries != null && Queries.Any()) - { - result.Queries.AddRange(Queries.Select(elem => elem.ToProto())); - } - if (Column != null && Column.Any()) - { - result.Column.AddRange(Column); - } - if (Id != null) - { - result.Id = Id ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UpdateRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UpdateRequest.cs deleted file mode 100644 index 4f4977cddc3..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UpdateRequest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateRequest -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public IEnumerable? Values { get; set; } - - [JsonPropertyName("setMetadata")] - public Metadata? SetMetadata { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateRequest ToProto() - { - var result = new Proto.UpdateRequest(); - result.Id = Id; - if (Values != null && Values.Any()) - { - result.Values.AddRange(Values); - } - if (SetMetadata != null) - { - result.SetMetadata = SetMetadata.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UploadRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UploadRequest.cs deleted file mode 100644 index 8421016d0df..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Dataservice/Requests/UploadRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadRequest -{ - [JsonPropertyName("columns")] - public IEnumerable Columns { get; set; } = new List(); - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UploadRequest ToProto() - { - var result = new Proto.UploadRequest(); - if (Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 9b70c3847bf..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,74 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/grpc-proto-exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - - diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index 017ab8726ca..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedApi" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferngrpc-proto-exhaustive/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - Dataservice = new DataserviceClient(_client); - } - - public DataserviceClient Dataservice { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Column.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Column.cs deleted file mode 100644 index 602200b6dfb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Column.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Column -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Column type into its Protobuf-equivalent representation. - /// - internal Proto.Column ToProto() - { - var result = new Proto.Column(); - result.Id = Id; - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new Column type from its Protobuf-equivalent representation. - /// - internal static Column FromProto(Proto.Column value) - { - return new Column - { - Id = value.Id, - Values = value.Values?.ToList() ?? new List(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DeleteResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DeleteResponse.cs deleted file mode 100644 index def64fbd896..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DeleteResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteResponse ToProto() - { - return new Proto.DeleteResponse(); - } - - /// - /// Returns a new DeleteResponse type from its Protobuf-equivalent representation. - /// - internal static DeleteResponse FromProto(Proto.DeleteResponse value) - { - return new DeleteResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DescribeResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DescribeResponse.cs deleted file mode 100644 index fbd45c674b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/DescribeResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeResponse -{ - [JsonPropertyName("namespaces")] - public Dictionary? Namespaces { get; set; } - - [JsonPropertyName("dimension")] - public uint? Dimension { get; set; } - - [JsonPropertyName("fullness")] - public float? Fullness { get; set; } - - [JsonPropertyName("totalCount")] - public uint? TotalCount { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeResponse ToProto() - { - var result = new Proto.DescribeResponse(); - if (Namespaces != null && Namespaces.Any()) - { - foreach (var kvp in Namespaces) - { - result.Namespaces.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Dimension != null) - { - result.Dimension = Dimension ?? 0; - } - if (Fullness != null) - { - result.Fullness = Fullness ?? 0.0f; - } - if (TotalCount != null) - { - result.TotalCount = TotalCount ?? 0; - } - return result; - } - - /// - /// Returns a new DescribeResponse type from its Protobuf-equivalent representation. - /// - internal static DescribeResponse FromProto(Proto.DescribeResponse value) - { - return new DescribeResponse - { - Namespaces = value.Namespaces?.ToDictionary( - kvp => kvp.Key, - kvp => NamespaceSummary.FromProto(kvp.Value) - ), - Dimension = value.Dimension, - Fullness = value.Fullness, - TotalCount = value.TotalCount, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/FetchResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/FetchResponse.cs deleted file mode 100644 index ae595dfdc41..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/FetchResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchResponse -{ - [JsonPropertyName("columns")] - public Dictionary? Columns { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchResponse type into its Protobuf-equivalent representation. - /// - internal Proto.FetchResponse ToProto() - { - var result = new Proto.FetchResponse(); - if (Columns != null && Columns.Any()) - { - foreach (var kvp in Columns) - { - result.Columns.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new FetchResponse type from its Protobuf-equivalent representation. - /// - internal static FetchResponse FromProto(Proto.FetchResponse value) - { - return new FetchResponse - { - Columns = value.Columns?.ToDictionary( - kvp => kvp.Key, - kvp => Column.FromProto(kvp.Value) - ), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/IndexedData.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/IndexedData.cs deleted file mode 100644 index 242c4d0b135..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/IndexedData.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record IndexedData -{ - [JsonPropertyName("indices")] - public IEnumerable Indices { get; set; } = new List(); - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the IndexedData type into its Protobuf-equivalent representation. - /// - internal Proto.IndexedData ToProto() - { - var result = new Proto.IndexedData(); - if (Indices.Any()) - { - result.Indices.AddRange(Indices); - } - if (Values.Any()) - { - result.Values.AddRange(Values); - } - return result; - } - - /// - /// Returns a new IndexedData type from its Protobuf-equivalent representation. - /// - internal static IndexedData FromProto(Proto.IndexedData value) - { - return new IndexedData - { - Indices = value.Indices?.ToList() ?? new List(), - Values = value.Values?.ToList() ?? new List(), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListElement.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListElement.cs deleted file mode 100644 index 2044bd62e56..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListElement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListElement -{ - [JsonPropertyName("id")] - public string? Id { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListElement type into its Protobuf-equivalent representation. - /// - internal Proto.ListElement ToProto() - { - var result = new Proto.ListElement(); - if (Id != null) - { - result.Id = Id ?? ""; - } - return result; - } - - /// - /// Returns a new ListElement type from its Protobuf-equivalent representation. - /// - internal static ListElement FromProto(Proto.ListElement value) - { - return new ListElement { Id = value.Id }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListResponse.cs deleted file mode 100644 index 9d691519a85..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ListResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListResponse -{ - [JsonPropertyName("columns")] - public IEnumerable? Columns { get; set; } - - [JsonPropertyName("pagination")] - public Pagination? Pagination { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListResponse type into its Protobuf-equivalent representation. - /// - internal Proto.ListResponse ToProto() - { - var result = new Proto.ListResponse(); - if (Columns != null && Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Pagination != null) - { - result.Pagination = Pagination.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new ListResponse type from its Protobuf-equivalent representation. - /// - internal static ListResponse FromProto(Proto.ListResponse value) - { - return new ListResponse - { - Columns = value.Columns?.Select(ListElement.FromProto), - Pagination = value.Pagination != null ? Pagination.FromProto(value.Pagination) : null, - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Metadata.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/MetadataValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/NamespaceSummary.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/NamespaceSummary.cs deleted file mode 100644 index da0573827da..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/NamespaceSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record NamespaceSummary -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the NamespaceSummary type into its Protobuf-equivalent representation. - /// - internal Proto.NamespaceSummary ToProto() - { - var result = new Proto.NamespaceSummary(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new NamespaceSummary type from its Protobuf-equivalent representation. - /// - internal static NamespaceSummary FromProto(Proto.NamespaceSummary value) - { - return new NamespaceSummary { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Pagination.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Pagination.cs deleted file mode 100644 index 87a67db48af..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Pagination.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Pagination -{ - [JsonPropertyName("next")] - public string? Next { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Pagination type into its Protobuf-equivalent representation. - /// - internal Proto.Pagination ToProto() - { - var result = new Proto.Pagination(); - if (Next != null) - { - result.Next = Next ?? ""; - } - return result; - } - - /// - /// Returns a new Pagination type from its Protobuf-equivalent representation. - /// - internal static Pagination FromProto(Proto.Pagination value) - { - return new Pagination { Next = value.Next }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryColumn.cs deleted file mode 100644 index 94c3d4f14af..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryColumn.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryColumn -{ - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("topK")] - public uint? TopK { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryColumn type into its Protobuf-equivalent representation. - /// - internal Proto.QueryColumn ToProto() - { - var result = new Proto.QueryColumn(); - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (TopK != null) - { - result.TopK = TopK ?? 0; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryColumn type from its Protobuf-equivalent representation. - /// - internal static QueryColumn FromProto(Proto.QueryColumn value) - { - return new QueryColumn - { - Values = value.Values?.ToList() ?? new List(), - TopK = value.TopK, - Namespace = value.Namespace, - Filter = value.Filter != null ? Metadata.FromProto(value.Filter) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResponse.cs deleted file mode 100644 index c4786b94639..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResponse -{ - [JsonPropertyName("results")] - public IEnumerable? Results { get; set; } - - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResponse type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResponse ToProto() - { - var result = new Proto.QueryResponse(); - if (Results != null && Results.Any()) - { - result.Results.AddRange(Results.Select(elem => elem.ToProto())); - } - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryResponse type from its Protobuf-equivalent representation. - /// - internal static QueryResponse FromProto(Proto.QueryResponse value) - { - return new QueryResponse - { - Results = value.Results?.Select(QueryResult.FromProto), - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResult.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResult.cs deleted file mode 100644 index 8c8988af1fd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/QueryResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResult -{ - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResult type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResult ToProto() - { - var result = new Proto.QueryResult(); - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } - - /// - /// Returns a new QueryResult type from its Protobuf-equivalent representation. - /// - internal static QueryResult FromProto(Proto.QueryResult value) - { - return new QueryResult - { - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ScoredColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ScoredColumn.cs deleted file mode 100644 index 5ca5fa6e2f6..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/ScoredColumn.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ScoredColumn -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("score")] - public float? Score { get; set; } - - [JsonPropertyName("values")] - public IEnumerable? Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ScoredColumn type into its Protobuf-equivalent representation. - /// - internal Proto.ScoredColumn ToProto() - { - var result = new Proto.ScoredColumn(); - result.Id = Id; - if (Score != null) - { - result.Score = Score ?? 0.0f; - } - if (Values != null && Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new ScoredColumn type from its Protobuf-equivalent representation. - /// - internal static ScoredColumn FromProto(Proto.ScoredColumn value) - { - return new ScoredColumn - { - Id = value.Id, - Score = value.Score, - Values = value.Values?.ToList(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs deleted file mode 100644 index 0d7e3f61b18..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateResponse ToProto() - { - return new Proto.UpdateResponse(); - } - - /// - /// Returns a new UpdateResponse type from its Protobuf-equivalent representation. - /// - internal static UpdateResponse FromProto(Proto.UpdateResponse value) - { - return new UpdateResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UploadResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UploadResponse.cs deleted file mode 100644 index 23286a04145..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UploadResponse.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadResponse -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UploadResponse ToProto() - { - var result = new Proto.UploadResponse(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new UploadResponse type from its Protobuf-equivalent representation. - /// - internal static UploadResponse FromProto(Proto.UploadResponse value) - { - return new UploadResponse { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Usage.cs b/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Usage.cs deleted file mode 100644 index e5921bf2191..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/Usage.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Usage -{ - [JsonPropertyName("units")] - public uint? Units { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Usage type into its Protobuf-equivalent representation. - /// - internal Proto.Usage ToProto() - { - var result = new Proto.Usage(); - if (Units != null) - { - result.Units = Units ?? 0; - } - return result; - } - - /// - /// Returns a new Usage type from its Protobuf-equivalent representation. - /// - internal static Usage FromProto(Proto.Usage value) - { - return new Usage { Units = value.Units }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.github/workflows/ci.yml b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.gitignore b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/fern.config.json b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml deleted file mode 100644 index 972ed6d7b73..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/generators.yml +++ /dev/null @@ -1,6 +0,0 @@ -api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/overrides.yml b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/overrides.yml deleted file mode 100644 index 062b98c2ccb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/overrides.yml +++ /dev/null @@ -1,56 +0,0 @@ - -paths: - /data/fetch: - get: - x-fern-request-name: FetchRequest - /data/list: - get: - x-fern-request-name: ListRequest -components: - schemas: - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value - DeleteRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - DescribeRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryColumn: - properties: - filter: - $ref: '#/components/schemas/Metadata' - ScoredColumn: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - UpdateRequest: - properties: - setMetadata: - $ref: '#/components/schemas/Metadata' - Column: - properties: - metadata: - $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md deleted file mode 100644 index 605573c3e5f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/Seed.Client)](https://nuget.org/packages/Seed.Client) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install Seed.Client -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedApi; - -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedApi; - -try { - var response = await client.Dataservice.UploadAsync(...); -} catch (SeedApiApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md deleted file mode 100644 index 830bacdc726..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/reference.md +++ /dev/null @@ -1,293 +0,0 @@ -# Reference -## DataService -
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column - { - Id = "id", - Values = new List() { 1.1f }, - }, - }, - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UploadRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DeleteAsync(DeleteRequest { ... }) -> DeleteResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DeleteAsync(new DeleteRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DeleteRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DescribeAsync(DescribeRequest { ... }) -> DescribeResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DescribeAsync(new DescribeRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DescribeRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.FetchAsync(FetchRequest { ... }) -> FetchResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.FetchAsync(new FetchRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `FetchRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.ListAsync(ListRequest { ... }) -> ListResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.ListAsync(new ListRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `ListRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.QueryAsync(QueryRequest { ... }) -> QueryResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `QueryRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.UpdateAsync(UpdateRequest { ... }) -> UpdateResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UpdateRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet-templates.json b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json deleted file mode 100644 index 546b49b57ee..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/snippet.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/data", - "method": "POST", - "identifier_override": "endpoint_dataservice.upload" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column\n {\n Id = \"id\",\n Values = new List() { 1.1f },\n },\n },\n }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/delete", - "method": "POST", - "identifier_override": "endpoint_dataservice.delete" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/describe", - "method": "POST", - "identifier_override": "endpoint_dataservice.describe" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/fetch", - "method": "GET", - "identifier_override": "endpoint_dataservice.fetch" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/list", - "method": "GET", - "identifier_override": "endpoint_dataservice.list" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/query", - "method": "POST", - "identifier_override": "endpoint_dataservice.query" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/update", - "method": "POST", - "identifier_override": "endpoint_dataservice.update" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/RawClientTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/RawClientTests.cs deleted file mode 100644 index df141253267..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index fd7b07f82e5..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Extensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Extensions.cs deleted file mode 100644 index 2e70f2719a2..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedApi.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HeaderValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HeaderValue.cs deleted file mode 100644 index 30df1c51646..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedApi.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Headers.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Headers.cs deleted file mode 100644 index 24bf3179299..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedApi.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 130464dace1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/IRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/IRequestOptions.cs deleted file mode 100644 index e365cd162f0..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/IRequestOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -internal interface IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs deleted file mode 100644 index 5c12019c489..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Net.Client; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The options used for gRPC client endpoints. - /// - public GrpcChannelOptions? GrpcOptions { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); - - /// - /// Clones this and returns a new instance - /// - internal ClientOptions Clone() - { - return new ClientOptions - { - BaseUrl = BaseUrl, - HttpClient = HttpClient, - MaxRetries = MaxRetries, - Timeout = Timeout, - Headers = new Headers(new Dictionary(Headers)), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/GrpcRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/GrpcRequestOptions.cs deleted file mode 100644 index 48c37927ea1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/GrpcRequestOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Core; -using SeedApi.Core; - -namespace SeedApi; - -#nullable enable - -public partial class GrpcRequestOptions -{ - /// - /// The maximum number of retry attempts. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// Options for write operations. - /// - public WriteOptions? WriteOptions { get; init; } - - /// - /// Client-side call credentials. Provide authorization with per-call granularity. - /// - public CallCredentials? CallCredentials { get; init; } - - /// - /// Headers to be sent with this particular request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/RequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/RequestOptions.cs deleted file mode 100644 index 4d560f8337a..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class RequestOptions : IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - Headers IRequestOptions.Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiApiException.cs deleted file mode 100644 index 8c81259a788..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedApi; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedApiApiException(string message, int statusCode, object body) - : SeedApiException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiException.cs deleted file mode 100644 index 14d9b8d9ddd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/SeedApiException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedApi; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedApiException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/Version.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 8cff8b09a01..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - private readonly Lazy _grpc = new(() => new RawGrpcClient(clientOptions)); - - /// - /// The gRPC client used to make requests. - /// - public RawGrpcClient Grpc => _grpc.Value; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public IRequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse( - request.ContentType - ); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawGrpcClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawGrpcClient.cs deleted file mode 100644 index 657be1d946d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Core/RawGrpcClient.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using Grpc.Core; -using Grpc.Net.Client; - -namespace SeedApi.Core; - -/// -/// Utility class for making gRPC requests to the API. -/// -internal class RawGrpcClient -{ - /// - /// The gRPC channel used to make requests. - /// - public readonly GrpcChannel Channel; - - private readonly ClientOptions _clientOptions; - - public RawGrpcClient(ClientOptions clientOptions) - { - _clientOptions = clientOptions; - - var grpcOptions = PrepareGrpcChannelOptions(); - Channel = - grpcOptions != null - ? GrpcChannel.ForAddress(_clientOptions.BaseUrl, grpcOptions) - : GrpcChannel.ForAddress(_clientOptions.BaseUrl); - } - - /// - /// Prepares the gRPC metadata associated with the given request. - /// The provided request headers take precedence over the headers - /// associated with this client (which are sent on _every_ request). - /// - public CallOptions CreateCallOptions( - GrpcRequestOptions options, - CancellationToken cancellationToken = default - ) - { - var metadata = new global::Grpc.Core.Metadata(); - SetHeaders(metadata, _clientOptions.Headers); - SetHeaders(metadata, options.Headers); - - var timeout = options.Timeout ?? _clientOptions.Timeout; - var deadline = DateTime.UtcNow.Add(timeout); - return new CallOptions( - metadata, - deadline, - cancellationToken, - options.WriteOptions, - null, - options.CallCredentials - ); - } - - private void SetHeaders(global::Grpc.Core.Metadata metadata, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - metadata.Add(header.Key, value); - } - } - } - - private GrpcChannelOptions? PrepareGrpcChannelOptions() - { - var grpcChannelOptions = _clientOptions.GrpcOptions; - if (grpcChannelOptions == null) - { - return null; - } - grpcChannelOptions.HttpClient ??= _clientOptions.HttpClient; - grpcChannelOptions.MaxRetryAttempts ??= _clientOptions.MaxRetries; - return grpcChannelOptions; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs deleted file mode 100644 index 8da06ffed93..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/DataserviceClient.cs +++ /dev/null @@ -1,288 +0,0 @@ -using System.Threading; -using Data.V1.Grpc; -using Grpc.Core; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class DataserviceClient -{ - private RawClient _client; - - private RawGrpcClient _grpc; - - private DataService.DataServiceClient _dataService; - - internal DataserviceClient(RawClient client) - { - _client = client; - _grpc = _client.Grpc; - _dataService = new DataService.DataServiceClient(_grpc.Channel); - } - - /// - /// - /// await client.Dataservice.UploadAsync( - /// new UploadRequest - /// { - /// Columns = new List<Column>() - /// { - /// new Column - /// { - /// Id = "id", - /// Values = new List<float>() { 1.1f }, - /// }, - /// }, - /// } - /// ); - /// - /// - public async Task UploadAsync( - UploadRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UploadAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UploadResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DeleteAsync(new DeleteRequest()); - /// - /// - public async Task DeleteAsync( - DeleteRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DeleteAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DeleteResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DescribeAsync(new DescribeRequest()); - /// - /// - public async Task DescribeAsync( - DescribeRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DescribeAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DescribeResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.FetchAsync(new FetchRequest()); - /// - /// - public async Task FetchAsync( - FetchRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.FetchAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return FetchResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.ListAsync(new ListRequest()); - /// - /// - public async Task ListAsync( - ListRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.ListAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return ListResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); - /// - /// - public async Task QueryAsync( - QueryRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.QueryAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return QueryResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); - /// - /// - public async Task UpdateAsync( - UpdateRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UpdateAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UpdateResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DeleteRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DeleteRequest.cs deleted file mode 100644 index 10d785c72b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DeleteRequest.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteRequest -{ - [JsonPropertyName("ids")] - public IEnumerable? Ids { get; set; } - - [JsonPropertyName("deleteAll")] - public bool? DeleteAll { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteRequest ToProto() - { - var result = new Proto.DeleteRequest(); - if (Ids != null && Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (DeleteAll != null) - { - result.DeleteAll = DeleteAll ?? false; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DescribeRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DescribeRequest.cs deleted file mode 100644 index a9de06c69f4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/DescribeRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeRequest -{ - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeRequest ToProto() - { - var result = new Proto.DescribeRequest(); - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/FetchRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/FetchRequest.cs deleted file mode 100644 index 70ea06edfc4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/FetchRequest.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchRequest -{ - public IEnumerable Ids { get; set; } = new List(); - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchRequest type into its Protobuf-equivalent representation. - /// - internal Proto.FetchRequest ToProto() - { - var result = new Proto.FetchRequest(); - if (Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/ListRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/ListRequest.cs deleted file mode 100644 index afc15a6b93d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/ListRequest.cs +++ /dev/null @@ -1,47 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListRequest -{ - public string? Prefix { get; set; } - - public uint? Limit { get; set; } - - public string? PaginationToken { get; set; } - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListRequest type into its Protobuf-equivalent representation. - /// - internal Proto.ListRequest ToProto() - { - var result = new Proto.ListRequest(); - if (Prefix != null) - { - result.Prefix = Prefix ?? ""; - } - if (Limit != null) - { - result.Limit = Limit ?? 0; - } - if (PaginationToken != null) - { - result.PaginationToken = PaginationToken ?? ""; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/QueryRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/QueryRequest.cs deleted file mode 100644 index a47fc99c7a4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/QueryRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryRequest -{ - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("topK")] - public required uint TopK { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("includeValues")] - public bool? IncludeValues { get; set; } - - [JsonPropertyName("includeMetadata")] - public bool? IncludeMetadata { get; set; } - - [JsonPropertyName("queries")] - public IEnumerable? Queries { get; set; } - - [JsonPropertyName("column")] - public IEnumerable? Column { get; set; } - - [JsonPropertyName("id")] - public string? Id { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryRequest type into its Protobuf-equivalent representation. - /// - internal Proto.QueryRequest ToProto() - { - var result = new Proto.QueryRequest(); - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - result.TopK = TopK; - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IncludeValues != null) - { - result.IncludeValues = IncludeValues ?? false; - } - if (IncludeMetadata != null) - { - result.IncludeMetadata = IncludeMetadata ?? false; - } - if (Queries != null && Queries.Any()) - { - result.Queries.AddRange(Queries.Select(elem => elem.ToProto())); - } - if (Column != null && Column.Any()) - { - result.Column.AddRange(Column); - } - if (Id != null) - { - result.Id = Id ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UpdateRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UpdateRequest.cs deleted file mode 100644 index 4f4977cddc3..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UpdateRequest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateRequest -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public IEnumerable? Values { get; set; } - - [JsonPropertyName("setMetadata")] - public Metadata? SetMetadata { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateRequest ToProto() - { - var result = new Proto.UpdateRequest(); - result.Id = Id; - if (Values != null && Values.Any()) - { - result.Values.AddRange(Values); - } - if (SetMetadata != null) - { - result.SetMetadata = SetMetadata.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UploadRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UploadRequest.cs deleted file mode 100644 index 8421016d0df..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Dataservice/Requests/UploadRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadRequest -{ - [JsonPropertyName("columns")] - public IEnumerable Columns { get; set; } = new List(); - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UploadRequest ToProto() - { - var result = new Proto.UploadRequest(); - if (Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 1ed464ff911..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Seed.Client - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/grpc-proto-exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - - diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index 017ab8726ca..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedApi" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferngrpc-proto-exhaustive/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - Dataservice = new DataserviceClient(_client); - } - - public DataserviceClient Dataservice { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Column.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Column.cs deleted file mode 100644 index 602200b6dfb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Column.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Column -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Column type into its Protobuf-equivalent representation. - /// - internal Proto.Column ToProto() - { - var result = new Proto.Column(); - result.Id = Id; - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new Column type from its Protobuf-equivalent representation. - /// - internal static Column FromProto(Proto.Column value) - { - return new Column - { - Id = value.Id, - Values = value.Values?.ToList() ?? new List(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DeleteResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DeleteResponse.cs deleted file mode 100644 index def64fbd896..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DeleteResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteResponse ToProto() - { - return new Proto.DeleteResponse(); - } - - /// - /// Returns a new DeleteResponse type from its Protobuf-equivalent representation. - /// - internal static DeleteResponse FromProto(Proto.DeleteResponse value) - { - return new DeleteResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DescribeResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DescribeResponse.cs deleted file mode 100644 index fbd45c674b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/DescribeResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeResponse -{ - [JsonPropertyName("namespaces")] - public Dictionary? Namespaces { get; set; } - - [JsonPropertyName("dimension")] - public uint? Dimension { get; set; } - - [JsonPropertyName("fullness")] - public float? Fullness { get; set; } - - [JsonPropertyName("totalCount")] - public uint? TotalCount { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeResponse ToProto() - { - var result = new Proto.DescribeResponse(); - if (Namespaces != null && Namespaces.Any()) - { - foreach (var kvp in Namespaces) - { - result.Namespaces.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Dimension != null) - { - result.Dimension = Dimension ?? 0; - } - if (Fullness != null) - { - result.Fullness = Fullness ?? 0.0f; - } - if (TotalCount != null) - { - result.TotalCount = TotalCount ?? 0; - } - return result; - } - - /// - /// Returns a new DescribeResponse type from its Protobuf-equivalent representation. - /// - internal static DescribeResponse FromProto(Proto.DescribeResponse value) - { - return new DescribeResponse - { - Namespaces = value.Namespaces?.ToDictionary( - kvp => kvp.Key, - kvp => NamespaceSummary.FromProto(kvp.Value) - ), - Dimension = value.Dimension, - Fullness = value.Fullness, - TotalCount = value.TotalCount, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/FetchResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/FetchResponse.cs deleted file mode 100644 index ae595dfdc41..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/FetchResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchResponse -{ - [JsonPropertyName("columns")] - public Dictionary? Columns { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchResponse type into its Protobuf-equivalent representation. - /// - internal Proto.FetchResponse ToProto() - { - var result = new Proto.FetchResponse(); - if (Columns != null && Columns.Any()) - { - foreach (var kvp in Columns) - { - result.Columns.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new FetchResponse type from its Protobuf-equivalent representation. - /// - internal static FetchResponse FromProto(Proto.FetchResponse value) - { - return new FetchResponse - { - Columns = value.Columns?.ToDictionary( - kvp => kvp.Key, - kvp => Column.FromProto(kvp.Value) - ), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/IndexedData.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/IndexedData.cs deleted file mode 100644 index 242c4d0b135..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/IndexedData.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record IndexedData -{ - [JsonPropertyName("indices")] - public IEnumerable Indices { get; set; } = new List(); - - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the IndexedData type into its Protobuf-equivalent representation. - /// - internal Proto.IndexedData ToProto() - { - var result = new Proto.IndexedData(); - if (Indices.Any()) - { - result.Indices.AddRange(Indices); - } - if (Values.Any()) - { - result.Values.AddRange(Values); - } - return result; - } - - /// - /// Returns a new IndexedData type from its Protobuf-equivalent representation. - /// - internal static IndexedData FromProto(Proto.IndexedData value) - { - return new IndexedData - { - Indices = value.Indices?.ToList() ?? new List(), - Values = value.Values?.ToList() ?? new List(), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListElement.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListElement.cs deleted file mode 100644 index 2044bd62e56..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListElement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListElement -{ - [JsonPropertyName("id")] - public string? Id { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListElement type into its Protobuf-equivalent representation. - /// - internal Proto.ListElement ToProto() - { - var result = new Proto.ListElement(); - if (Id != null) - { - result.Id = Id ?? ""; - } - return result; - } - - /// - /// Returns a new ListElement type from its Protobuf-equivalent representation. - /// - internal static ListElement FromProto(Proto.ListElement value) - { - return new ListElement { Id = value.Id }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListResponse.cs deleted file mode 100644 index 9d691519a85..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ListResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListResponse -{ - [JsonPropertyName("columns")] - public IEnumerable? Columns { get; set; } - - [JsonPropertyName("pagination")] - public Pagination? Pagination { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListResponse type into its Protobuf-equivalent representation. - /// - internal Proto.ListResponse ToProto() - { - var result = new Proto.ListResponse(); - if (Columns != null && Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Pagination != null) - { - result.Pagination = Pagination.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new ListResponse type from its Protobuf-equivalent representation. - /// - internal static ListResponse FromProto(Proto.ListResponse value) - { - return new ListResponse - { - Columns = value.Columns?.Select(ListElement.FromProto), - Pagination = value.Pagination != null ? Pagination.FromProto(value.Pagination) : null, - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Metadata.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/MetadataValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/NamespaceSummary.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/NamespaceSummary.cs deleted file mode 100644 index da0573827da..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/NamespaceSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record NamespaceSummary -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the NamespaceSummary type into its Protobuf-equivalent representation. - /// - internal Proto.NamespaceSummary ToProto() - { - var result = new Proto.NamespaceSummary(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new NamespaceSummary type from its Protobuf-equivalent representation. - /// - internal static NamespaceSummary FromProto(Proto.NamespaceSummary value) - { - return new NamespaceSummary { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Pagination.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Pagination.cs deleted file mode 100644 index 87a67db48af..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Pagination.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Pagination -{ - [JsonPropertyName("next")] - public string? Next { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Pagination type into its Protobuf-equivalent representation. - /// - internal Proto.Pagination ToProto() - { - var result = new Proto.Pagination(); - if (Next != null) - { - result.Next = Next ?? ""; - } - return result; - } - - /// - /// Returns a new Pagination type from its Protobuf-equivalent representation. - /// - internal static Pagination FromProto(Proto.Pagination value) - { - return new Pagination { Next = value.Next }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryColumn.cs deleted file mode 100644 index 94c3d4f14af..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryColumn.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryColumn -{ - [JsonPropertyName("values")] - public IEnumerable Values { get; set; } = new List(); - - [JsonPropertyName("topK")] - public uint? TopK { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryColumn type into its Protobuf-equivalent representation. - /// - internal Proto.QueryColumn ToProto() - { - var result = new Proto.QueryColumn(); - if (Values.Any()) - { - result.Values.AddRange(Values); - } - if (TopK != null) - { - result.TopK = TopK ?? 0; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryColumn type from its Protobuf-equivalent representation. - /// - internal static QueryColumn FromProto(Proto.QueryColumn value) - { - return new QueryColumn - { - Values = value.Values?.ToList() ?? new List(), - TopK = value.TopK, - Namespace = value.Namespace, - Filter = value.Filter != null ? Metadata.FromProto(value.Filter) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResponse.cs deleted file mode 100644 index c4786b94639..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResponse -{ - [JsonPropertyName("results")] - public IEnumerable? Results { get; set; } - - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResponse type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResponse ToProto() - { - var result = new Proto.QueryResponse(); - if (Results != null && Results.Any()) - { - result.Results.AddRange(Results.Select(elem => elem.ToProto())); - } - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryResponse type from its Protobuf-equivalent representation. - /// - internal static QueryResponse FromProto(Proto.QueryResponse value) - { - return new QueryResponse - { - Results = value.Results?.Select(QueryResult.FromProto), - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResult.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResult.cs deleted file mode 100644 index 8c8988af1fd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/QueryResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResult -{ - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResult type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResult ToProto() - { - var result = new Proto.QueryResult(); - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } - - /// - /// Returns a new QueryResult type from its Protobuf-equivalent representation. - /// - internal static QueryResult FromProto(Proto.QueryResult value) - { - return new QueryResult - { - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ScoredColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ScoredColumn.cs deleted file mode 100644 index 5ca5fa6e2f6..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/ScoredColumn.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ScoredColumn -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("score")] - public float? Score { get; set; } - - [JsonPropertyName("values")] - public IEnumerable? Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ScoredColumn type into its Protobuf-equivalent representation. - /// - internal Proto.ScoredColumn ToProto() - { - var result = new Proto.ScoredColumn(); - result.Id = Id; - if (Score != null) - { - result.Score = Score ?? 0.0f; - } - if (Values != null && Values.Any()) - { - result.Values.AddRange(Values); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new ScoredColumn type from its Protobuf-equivalent representation. - /// - internal static ScoredColumn FromProto(Proto.ScoredColumn value) - { - return new ScoredColumn - { - Id = value.Id, - Score = value.Score, - Values = value.Values?.ToList(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs deleted file mode 100644 index 0d7e3f61b18..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateResponse ToProto() - { - return new Proto.UpdateResponse(); - } - - /// - /// Returns a new UpdateResponse type from its Protobuf-equivalent representation. - /// - internal static UpdateResponse FromProto(Proto.UpdateResponse value) - { - return new UpdateResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UploadResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UploadResponse.cs deleted file mode 100644 index 23286a04145..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/UploadResponse.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadResponse -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UploadResponse ToProto() - { - var result = new Proto.UploadResponse(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new UploadResponse type from its Protobuf-equivalent representation. - /// - internal static UploadResponse FromProto(Proto.UploadResponse value) - { - return new UploadResponse { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Usage.cs b/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Usage.cs deleted file mode 100644 index e5921bf2191..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/package-id/src/SeedApi/Types/Usage.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Usage -{ - [JsonPropertyName("units")] - public uint? Units { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Usage type into its Protobuf-equivalent representation. - /// - internal Proto.Usage ToProto() - { - var result = new Proto.Usage(); - if (Units != null) - { - result.Units = Units ?? 0; - } - return result; - } - - /// - /// Returns a new Usage type from its Protobuf-equivalent representation. - /// - internal static Usage FromProto(Proto.Usage value) - { - return new Usage { Units = value.Units }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.gitignore b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml deleted file mode 100644 index 972ed6d7b73..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/generators.yml +++ /dev/null @@ -1,6 +0,0 @@ -api: - - proto: - root: proto - target: proto/data/v1/data.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml deleted file mode 100644 index 062b98c2ccb..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/overrides.yml +++ /dev/null @@ -1,56 +0,0 @@ - -paths: - /data/fetch: - get: - x-fern-request-name: FetchRequest - /data/list: - get: - x-fern-request-name: ListRequest -components: - schemas: - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value - DeleteRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - DescribeRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryRequest: - properties: - filter: - $ref: '#/components/schemas/Metadata' - QueryColumn: - properties: - filter: - $ref: '#/components/schemas/Metadata' - ScoredColumn: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - UpdateRequest: - properties: - setMetadata: - $ref: '#/components/schemas/Metadata' - Column: - properties: - metadata: - $ref: '#/components/schemas/Metadata' \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md deleted file mode 100644 index d7cbceedb96..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/SeedApi)](https://nuget.org/packages/SeedApi) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedApi -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedApi; - -var client = new SeedApiClient(); -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column { Id = "id", Values = new[] { 1.1f } }, - }, - } -); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedApi; - -try { - var response = await client.Dataservice.UploadAsync(...); -} catch (SeedApiApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.Dataservice.UploadAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto deleted file mode 100644 index dc3b07ece42..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto +++ /dev/null @@ -1,213 +0,0 @@ -syntax = "proto3"; - -package data.v1; - -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Data.V1.Grpc"; -option go_package = "github.com/acme.co/data-go-grpc"; - -message IndexedData { - repeated uint32 indices = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; -} - -message Column { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct metadata = 3; - IndexedData indexed_data = 4; -} - -message ScoredColumn { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - float score = 2; - repeated float values = 3; - google.protobuf.Struct metadata = 4; - IndexedData indexed_data = 5; -} - -message UploadRequest { - repeated Column columns = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message UploadResponse { - uint32 count = 1; -} - -message DeleteRequest { - repeated string ids = 1; - bool delete_all = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; -} - -message DeleteResponse {} - -message FetchRequest { - repeated string ids = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - string namespace = 2; -} - -message FetchResponse { - map columns = 1; - string namespace = 2; - optional Usage usage = 3; -} - -message ListRequest { - optional string prefix = 1; - optional uint32 limit = 2; - optional string pagination_token = 3; - string namespace = 4; -} - -message Pagination { - string next = 1; -} - -message ListElement { - string id = 1; -} - -message ListResponse { - repeated ListElement columns = 1; - optional Pagination pagination = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message QueryColumn { - repeated float values = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - uint32 top_k = 2; - string namespace = 3; - google.protobuf.Struct filter = 4; - IndexedData indexed_data = 5; -} - -message QueryRequest { - string namespace = 1; - uint32 top_k = 2 [ - (google.api.field_behavior) = REQUIRED - ]; - google.protobuf.Struct filter = 3; - bool include_values = 4; - bool include_metadata = 5; - repeated QueryColumn queries = 6 [ - deprecated = true - ]; - repeated float column = 7; - string id = 8; - IndexedData indexed_data = 9; -} - -message QueryResult { - repeated ScoredColumn matches = 1; - string namespace = 2; -} - -message QueryResponse { - repeated QueryResult results = 1 [deprecated=true]; - repeated ScoredColumn matches = 2; - string namespace = 3; - optional Usage usage = 4; -} - -message Usage { - optional uint32 units = 1; -} - -message UpdateRequest { - string id = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - repeated float values = 2; - google.protobuf.Struct set_metadata = 3; - string namespace = 4; - IndexedData indexed_data = 5; -} - -message UpdateResponse {} - -message DescribeRequest { - google.protobuf.Struct filter = 1; -} - -message NamespaceSummary { - uint32 count = 1; -} - -message DescribeResponse { - map namespaces = 1; - uint32 dimension = 2; - float fullness = 3; - uint32 total_count = 4; -} - -service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } - - rpc Fetch(FetchRequest) returns (FetchResponse) { - option (google.api.http) = { - get: "/data/fetch" - }; - } - - rpc List(ListRequest) returns (ListResponse) { - option (google.api.http) = { - get: "/data/list" - }; - } - - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - - rpc Update(UpdateRequest) returns (UpdateResponse) { - option (google.api.http) = { - post: "/data/update" - body: "*" - }; - } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto deleted file mode 100644 index 128799c558d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/field_behavior.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; - - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md deleted file mode 100644 index b5cdd6e8580..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/reference.md +++ /dev/null @@ -1,289 +0,0 @@ -# Reference -## DataService -
client.Dataservice.UploadAsync(UploadRequest { ... }) -> UploadResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UploadAsync( - new UploadRequest - { - Columns = new List() - { - new Column { Id = "id", Values = new[] { 1.1f } }, - }, - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UploadRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DeleteAsync(DeleteRequest { ... }) -> DeleteResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DeleteAsync(new DeleteRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DeleteRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.DescribeAsync(DescribeRequest { ... }) -> DescribeResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.DescribeAsync(new DescribeRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `DescribeRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.FetchAsync(FetchRequest { ... }) -> FetchResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.FetchAsync(new FetchRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `FetchRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.ListAsync(ListRequest { ... }) -> ListResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.ListAsync(new ListRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `ListRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.QueryAsync(QueryRequest { ... }) -> QueryResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `QueryRequest` - -
-
-
-
- - -
-
-
- -
client.Dataservice.UpdateAsync(UpdateRequest { ... }) -> UpdateResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UpdateRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet-templates.json b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json deleted file mode 100644 index 66926a40e09..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/snippet.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/data", - "method": "POST", - "identifier_override": "endpoint_dataservice.upload" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UploadAsync(\n new UploadRequest\n {\n Columns = new List()\n {\n new Column { Id = \"id\", Values = new[] { 1.1f } },\n },\n }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/delete", - "method": "POST", - "identifier_override": "endpoint_dataservice.delete" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DeleteAsync(new DeleteRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/describe", - "method": "POST", - "identifier_override": "endpoint_dataservice.describe" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.DescribeAsync(new DescribeRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/fetch", - "method": "GET", - "identifier_override": "endpoint_dataservice.fetch" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.FetchAsync(new FetchRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/list", - "method": "GET", - "identifier_override": "endpoint_dataservice.list" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.ListAsync(new ListRequest());\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/query", - "method": "POST", - "identifier_override": "endpoint_dataservice.query" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 });\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/data/update", - "method": "POST", - "identifier_override": "endpoint_dataservice.update" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Dataservice.UpdateAsync(new UpdateRequest { Id = \"id\" });\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/RawClientTests.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/RawClientTests.cs deleted file mode 100644 index df141253267..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index fd7b07f82e5..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Extensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Extensions.cs deleted file mode 100644 index 2e70f2719a2..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedApi.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HeaderValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HeaderValue.cs deleted file mode 100644 index 30df1c51646..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedApi.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Headers.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Headers.cs deleted file mode 100644 index 24bf3179299..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedApi.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 130464dace1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/IRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/IRequestOptions.cs deleted file mode 100644 index e365cd162f0..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/IRequestOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -internal interface IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs deleted file mode 100644 index 5c12019c489..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Net.Client; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The options used for gRPC client endpoints. - /// - public GrpcChannelOptions? GrpcOptions { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); - - /// - /// Clones this and returns a new instance - /// - internal ClientOptions Clone() - { - return new ClientOptions - { - BaseUrl = BaseUrl, - HttpClient = HttpClient, - MaxRetries = MaxRetries, - Timeout = Timeout, - Headers = new Headers(new Dictionary(Headers)), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/GrpcRequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/GrpcRequestOptions.cs deleted file mode 100644 index 48c37927ea1..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/GrpcRequestOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Core; -using SeedApi.Core; - -namespace SeedApi; - -#nullable enable - -public partial class GrpcRequestOptions -{ - /// - /// The maximum number of retry attempts. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// Options for write operations. - /// - public WriteOptions? WriteOptions { get; init; } - - /// - /// Client-side call credentials. Provide authorization with per-call granularity. - /// - public CallCredentials? CallCredentials { get; init; } - - /// - /// Headers to be sent with this particular request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/RequestOptions.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/RequestOptions.cs deleted file mode 100644 index 4d560f8337a..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class RequestOptions : IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - Headers IRequestOptions.Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiApiException.cs deleted file mode 100644 index 8c81259a788..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedApi; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedApiApiException(string message, int statusCode, object body) - : SeedApiException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiException.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiException.cs deleted file mode 100644 index 14d9b8d9ddd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/SeedApiException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedApi; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedApiException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 8cff8b09a01..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - private readonly Lazy _grpc = new(() => new RawGrpcClient(clientOptions)); - - /// - /// The gRPC client used to make requests. - /// - public RawGrpcClient Grpc => _grpc.Value; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public IRequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse( - request.ContentType - ); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawGrpcClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawGrpcClient.cs deleted file mode 100644 index 657be1d946d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Core/RawGrpcClient.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using Grpc.Core; -using Grpc.Net.Client; - -namespace SeedApi.Core; - -/// -/// Utility class for making gRPC requests to the API. -/// -internal class RawGrpcClient -{ - /// - /// The gRPC channel used to make requests. - /// - public readonly GrpcChannel Channel; - - private readonly ClientOptions _clientOptions; - - public RawGrpcClient(ClientOptions clientOptions) - { - _clientOptions = clientOptions; - - var grpcOptions = PrepareGrpcChannelOptions(); - Channel = - grpcOptions != null - ? GrpcChannel.ForAddress(_clientOptions.BaseUrl, grpcOptions) - : GrpcChannel.ForAddress(_clientOptions.BaseUrl); - } - - /// - /// Prepares the gRPC metadata associated with the given request. - /// The provided request headers take precedence over the headers - /// associated with this client (which are sent on _every_ request). - /// - public CallOptions CreateCallOptions( - GrpcRequestOptions options, - CancellationToken cancellationToken = default - ) - { - var metadata = new global::Grpc.Core.Metadata(); - SetHeaders(metadata, _clientOptions.Headers); - SetHeaders(metadata, options.Headers); - - var timeout = options.Timeout ?? _clientOptions.Timeout; - var deadline = DateTime.UtcNow.Add(timeout); - return new CallOptions( - metadata, - deadline, - cancellationToken, - options.WriteOptions, - null, - options.CallCredentials - ); - } - - private void SetHeaders(global::Grpc.Core.Metadata metadata, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - metadata.Add(header.Key, value); - } - } - } - - private GrpcChannelOptions? PrepareGrpcChannelOptions() - { - var grpcChannelOptions = _clientOptions.GrpcOptions; - if (grpcChannelOptions == null) - { - return null; - } - grpcChannelOptions.HttpClient ??= _clientOptions.HttpClient; - grpcChannelOptions.MaxRetryAttempts ??= _clientOptions.MaxRetries; - return grpcChannelOptions; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs deleted file mode 100644 index 9c85dcc2d0e..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/DataserviceClient.cs +++ /dev/null @@ -1,284 +0,0 @@ -using System.Threading; -using Data.V1.Grpc; -using Grpc.Core; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class DataserviceClient -{ - private RawClient _client; - - private RawGrpcClient _grpc; - - private DataService.DataServiceClient _dataService; - - internal DataserviceClient(RawClient client) - { - _client = client; - _grpc = _client.Grpc; - _dataService = new DataService.DataServiceClient(_grpc.Channel); - } - - /// - /// - /// await client.Dataservice.UploadAsync( - /// new UploadRequest - /// { - /// Columns = new List<Column>() - /// { - /// new Column { Id = "id", Values = new[] { 1.1f } }, - /// }, - /// } - /// ); - /// - /// - public async Task UploadAsync( - UploadRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UploadAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UploadResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DeleteAsync(new DeleteRequest()); - /// - /// - public async Task DeleteAsync( - DeleteRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DeleteAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DeleteResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.DescribeAsync(new DescribeRequest()); - /// - /// - public async Task DescribeAsync( - DescribeRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.DescribeAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return DescribeResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.FetchAsync(new FetchRequest()); - /// - /// - public async Task FetchAsync( - FetchRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.FetchAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return FetchResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.ListAsync(new ListRequest()); - /// - /// - public async Task ListAsync( - ListRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.ListAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return ListResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.QueryAsync(new QueryRequest { TopK = 1 }); - /// - /// - public async Task QueryAsync( - QueryRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.QueryAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return QueryResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } - - /// - /// - /// await client.Dataservice.UpdateAsync(new UpdateRequest { Id = "id" }); - /// - /// - public async Task UpdateAsync( - UpdateRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _dataService.UpdateAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return UpdateResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DeleteRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DeleteRequest.cs deleted file mode 100644 index 10d785c72b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DeleteRequest.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteRequest -{ - [JsonPropertyName("ids")] - public IEnumerable? Ids { get; set; } - - [JsonPropertyName("deleteAll")] - public bool? DeleteAll { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteRequest ToProto() - { - var result = new Proto.DeleteRequest(); - if (Ids != null && Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (DeleteAll != null) - { - result.DeleteAll = DeleteAll ?? false; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DescribeRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DescribeRequest.cs deleted file mode 100644 index a9de06c69f4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/DescribeRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeRequest -{ - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeRequest type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeRequest ToProto() - { - var result = new Proto.DescribeRequest(); - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/FetchRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/FetchRequest.cs deleted file mode 100644 index 70ea06edfc4..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/FetchRequest.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchRequest -{ - public IEnumerable Ids { get; set; } = new List(); - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchRequest type into its Protobuf-equivalent representation. - /// - internal Proto.FetchRequest ToProto() - { - var result = new Proto.FetchRequest(); - if (Ids.Any()) - { - result.Ids.AddRange(Ids); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/ListRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/ListRequest.cs deleted file mode 100644 index afc15a6b93d..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/ListRequest.cs +++ /dev/null @@ -1,47 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListRequest -{ - public string? Prefix { get; set; } - - public uint? Limit { get; set; } - - public string? PaginationToken { get; set; } - - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListRequest type into its Protobuf-equivalent representation. - /// - internal Proto.ListRequest ToProto() - { - var result = new Proto.ListRequest(); - if (Prefix != null) - { - result.Prefix = Prefix ?? ""; - } - if (Limit != null) - { - result.Limit = Limit ?? 0; - } - if (PaginationToken != null) - { - result.PaginationToken = PaginationToken ?? ""; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/QueryRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/QueryRequest.cs deleted file mode 100644 index dd851ff88ca..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/QueryRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryRequest -{ - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("topK")] - public required uint TopK { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("includeValues")] - public bool? IncludeValues { get; set; } - - [JsonPropertyName("includeMetadata")] - public bool? IncludeMetadata { get; set; } - - [JsonPropertyName("queries")] - public IEnumerable? Queries { get; set; } - - [JsonPropertyName("column")] - public ReadOnlyMemory? Column { get; set; } - - [JsonPropertyName("id")] - public string? Id { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryRequest type into its Protobuf-equivalent representation. - /// - internal Proto.QueryRequest ToProto() - { - var result = new Proto.QueryRequest(); - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - result.TopK = TopK; - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IncludeValues != null) - { - result.IncludeValues = IncludeValues ?? false; - } - if (IncludeMetadata != null) - { - result.IncludeMetadata = IncludeMetadata ?? false; - } - if (Queries != null && Queries.Any()) - { - result.Queries.AddRange(Queries.Select(elem => elem.ToProto())); - } - if (Column != null && !Column.Value.IsEmpty) - { - result.Column.AddRange(Column.Value.ToArray()); - } - if (Id != null) - { - result.Id = Id ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UpdateRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UpdateRequest.cs deleted file mode 100644 index 721e917e788..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UpdateRequest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateRequest -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public ReadOnlyMemory? Values { get; set; } - - [JsonPropertyName("setMetadata")] - public Metadata? SetMetadata { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateRequest ToProto() - { - var result = new Proto.UpdateRequest(); - result.Id = Id; - if (Values != null && !Values.Value.IsEmpty) - { - result.Values.AddRange(Values.Value.ToArray()); - } - if (SetMetadata != null) - { - result.SetMetadata = SetMetadata.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UploadRequest.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UploadRequest.cs deleted file mode 100644 index 8421016d0df..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Dataservice/Requests/UploadRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadRequest -{ - [JsonPropertyName("columns")] - public IEnumerable Columns { get; set; } = new List(); - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadRequest type into its Protobuf-equivalent representation. - /// - internal Proto.UploadRequest ToProto() - { - var result = new Proto.UploadRequest(); - if (Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.Custom.props b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 9b70c3847bf..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,74 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/grpc-proto-exhaustive/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - - diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index 017ab8726ca..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedApi" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferngrpc-proto-exhaustive/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - Dataservice = new DataserviceClient(_client); - } - - public DataserviceClient Dataservice { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Column.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Column.cs deleted file mode 100644 index 8849268e11a..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Column.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Column -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Column type into its Protobuf-equivalent representation. - /// - internal Proto.Column ToProto() - { - var result = new Proto.Column(); - result.Id = Id; - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new Column type from its Protobuf-equivalent representation. - /// - internal static Column FromProto(Proto.Column value) - { - return new Column - { - Id = value.Id, - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DeleteResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DeleteResponse.cs deleted file mode 100644 index def64fbd896..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DeleteResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DeleteResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DeleteResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DeleteResponse ToProto() - { - return new Proto.DeleteResponse(); - } - - /// - /// Returns a new DeleteResponse type from its Protobuf-equivalent representation. - /// - internal static DeleteResponse FromProto(Proto.DeleteResponse value) - { - return new DeleteResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DescribeResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DescribeResponse.cs deleted file mode 100644 index fbd45c674b7..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/DescribeResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record DescribeResponse -{ - [JsonPropertyName("namespaces")] - public Dictionary? Namespaces { get; set; } - - [JsonPropertyName("dimension")] - public uint? Dimension { get; set; } - - [JsonPropertyName("fullness")] - public float? Fullness { get; set; } - - [JsonPropertyName("totalCount")] - public uint? TotalCount { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the DescribeResponse type into its Protobuf-equivalent representation. - /// - internal Proto.DescribeResponse ToProto() - { - var result = new Proto.DescribeResponse(); - if (Namespaces != null && Namespaces.Any()) - { - foreach (var kvp in Namespaces) - { - result.Namespaces.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Dimension != null) - { - result.Dimension = Dimension ?? 0; - } - if (Fullness != null) - { - result.Fullness = Fullness ?? 0.0f; - } - if (TotalCount != null) - { - result.TotalCount = TotalCount ?? 0; - } - return result; - } - - /// - /// Returns a new DescribeResponse type from its Protobuf-equivalent representation. - /// - internal static DescribeResponse FromProto(Proto.DescribeResponse value) - { - return new DescribeResponse - { - Namespaces = value.Namespaces?.ToDictionary( - kvp => kvp.Key, - kvp => NamespaceSummary.FromProto(kvp.Value) - ), - Dimension = value.Dimension, - Fullness = value.Fullness, - TotalCount = value.TotalCount, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/FetchResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/FetchResponse.cs deleted file mode 100644 index ae595dfdc41..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/FetchResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record FetchResponse -{ - [JsonPropertyName("columns")] - public Dictionary? Columns { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the FetchResponse type into its Protobuf-equivalent representation. - /// - internal Proto.FetchResponse ToProto() - { - var result = new Proto.FetchResponse(); - if (Columns != null && Columns.Any()) - { - foreach (var kvp in Columns) - { - result.Columns.Add(kvp.Key, kvp.Value.ToProto()); - } - ; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new FetchResponse type from its Protobuf-equivalent representation. - /// - internal static FetchResponse FromProto(Proto.FetchResponse value) - { - return new FetchResponse - { - Columns = value.Columns?.ToDictionary( - kvp => kvp.Key, - kvp => Column.FromProto(kvp.Value) - ), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/IndexedData.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/IndexedData.cs deleted file mode 100644 index 5f7df404340..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/IndexedData.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record IndexedData -{ - [JsonPropertyName("indices")] - public IEnumerable Indices { get; set; } = new List(); - - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the IndexedData type into its Protobuf-equivalent representation. - /// - internal Proto.IndexedData ToProto() - { - var result = new Proto.IndexedData(); - if (Indices.Any()) - { - result.Indices.AddRange(Indices); - } - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - return result; - } - - /// - /// Returns a new IndexedData type from its Protobuf-equivalent representation. - /// - internal static IndexedData FromProto(Proto.IndexedData value) - { - return new IndexedData - { - Indices = value.Indices?.ToList() ?? new List(), - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListElement.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListElement.cs deleted file mode 100644 index 2044bd62e56..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListElement.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListElement -{ - [JsonPropertyName("id")] - public string? Id { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListElement type into its Protobuf-equivalent representation. - /// - internal Proto.ListElement ToProto() - { - var result = new Proto.ListElement(); - if (Id != null) - { - result.Id = Id ?? ""; - } - return result; - } - - /// - /// Returns a new ListElement type from its Protobuf-equivalent representation. - /// - internal static ListElement FromProto(Proto.ListElement value) - { - return new ListElement { Id = value.Id }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListResponse.cs deleted file mode 100644 index 9d691519a85..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ListResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ListResponse -{ - [JsonPropertyName("columns")] - public IEnumerable? Columns { get; set; } - - [JsonPropertyName("pagination")] - public Pagination? Pagination { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ListResponse type into its Protobuf-equivalent representation. - /// - internal Proto.ListResponse ToProto() - { - var result = new Proto.ListResponse(); - if (Columns != null && Columns.Any()) - { - result.Columns.AddRange(Columns.Select(elem => elem.ToProto())); - } - if (Pagination != null) - { - result.Pagination = Pagination.ToProto(); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new ListResponse type from its Protobuf-equivalent representation. - /// - internal static ListResponse FromProto(Proto.ListResponse value) - { - return new ListResponse - { - Columns = value.Columns?.Select(ListElement.FromProto), - Pagination = value.Pagination != null ? Pagination.FromProto(value.Pagination) : null, - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Metadata.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/MetadataValue.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/NamespaceSummary.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/NamespaceSummary.cs deleted file mode 100644 index da0573827da..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/NamespaceSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record NamespaceSummary -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the NamespaceSummary type into its Protobuf-equivalent representation. - /// - internal Proto.NamespaceSummary ToProto() - { - var result = new Proto.NamespaceSummary(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new NamespaceSummary type from its Protobuf-equivalent representation. - /// - internal static NamespaceSummary FromProto(Proto.NamespaceSummary value) - { - return new NamespaceSummary { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Pagination.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Pagination.cs deleted file mode 100644 index 87a67db48af..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Pagination.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Pagination -{ - [JsonPropertyName("next")] - public string? Next { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Pagination type into its Protobuf-equivalent representation. - /// - internal Proto.Pagination ToProto() - { - var result = new Proto.Pagination(); - if (Next != null) - { - result.Next = Next ?? ""; - } - return result; - } - - /// - /// Returns a new Pagination type from its Protobuf-equivalent representation. - /// - internal static Pagination FromProto(Proto.Pagination value) - { - return new Pagination { Next = value.Next }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryColumn.cs deleted file mode 100644 index 63b931b813b..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryColumn.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryColumn -{ - [JsonPropertyName("values")] - public ReadOnlyMemory Values { get; set; } - - [JsonPropertyName("topK")] - public uint? TopK { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("filter")] - public Metadata? Filter { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryColumn type into its Protobuf-equivalent representation. - /// - internal Proto.QueryColumn ToProto() - { - var result = new Proto.QueryColumn(); - if (!Values.IsEmpty) - { - result.Values.AddRange(Values.ToArray()); - } - if (TopK != null) - { - result.TopK = TopK ?? 0; - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Filter != null) - { - result.Filter = Filter.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryColumn type from its Protobuf-equivalent representation. - /// - internal static QueryColumn FromProto(Proto.QueryColumn value) - { - return new QueryColumn - { - Values = value.Values?.ToArray() ?? new ReadOnlyMemory(), - TopK = value.TopK, - Namespace = value.Namespace, - Filter = value.Filter != null ? Metadata.FromProto(value.Filter) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResponse.cs deleted file mode 100644 index c4786b94639..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResponse -{ - [JsonPropertyName("results")] - public IEnumerable? Results { get; set; } - - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - [JsonPropertyName("usage")] - public Usage? Usage { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResponse type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResponse ToProto() - { - var result = new Proto.QueryResponse(); - if (Results != null && Results.Any()) - { - result.Results.AddRange(Results.Select(elem => elem.ToProto())); - } - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - if (Usage != null) - { - result.Usage = Usage.ToProto(); - } - return result; - } - - /// - /// Returns a new QueryResponse type from its Protobuf-equivalent representation. - /// - internal static QueryResponse FromProto(Proto.QueryResponse value) - { - return new QueryResponse - { - Results = value.Results?.Select(QueryResult.FromProto), - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - Usage = value.Usage != null ? Usage.FromProto(value.Usage) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResult.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResult.cs deleted file mode 100644 index 8c8988af1fd..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/QueryResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record QueryResult -{ - [JsonPropertyName("matches")] - public IEnumerable? Matches { get; set; } - - [JsonPropertyName("namespace")] - public string? Namespace { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the QueryResult type into its Protobuf-equivalent representation. - /// - internal Proto.QueryResult ToProto() - { - var result = new Proto.QueryResult(); - if (Matches != null && Matches.Any()) - { - result.Matches.AddRange(Matches.Select(elem => elem.ToProto())); - } - if (Namespace != null) - { - result.Namespace = Namespace ?? ""; - } - return result; - } - - /// - /// Returns a new QueryResult type from its Protobuf-equivalent representation. - /// - internal static QueryResult FromProto(Proto.QueryResult value) - { - return new QueryResult - { - Matches = value.Matches?.Select(ScoredColumn.FromProto), - Namespace = value.Namespace, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ScoredColumn.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ScoredColumn.cs deleted file mode 100644 index 543713c18e8..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/ScoredColumn.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record ScoredColumn -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("score")] - public float? Score { get; set; } - - [JsonPropertyName("values")] - public ReadOnlyMemory? Values { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - [JsonPropertyName("indexedData")] - public IndexedData? IndexedData { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the ScoredColumn type into its Protobuf-equivalent representation. - /// - internal Proto.ScoredColumn ToProto() - { - var result = new Proto.ScoredColumn(); - result.Id = Id; - if (Score != null) - { - result.Score = Score ?? 0.0f; - } - if (Values != null && !Values.Value.IsEmpty) - { - result.Values.AddRange(Values.Value.ToArray()); - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - if (IndexedData != null) - { - result.IndexedData = IndexedData.ToProto(); - } - return result; - } - - /// - /// Returns a new ScoredColumn type from its Protobuf-equivalent representation. - /// - internal static ScoredColumn FromProto(Proto.ScoredColumn value) - { - return new ScoredColumn - { - Id = value.Id, - Score = value.Score, - Values = value.Values?.ToArray(), - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - IndexedData = - value.IndexedData != null ? IndexedData.FromProto(value.IndexedData) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs deleted file mode 100644 index 0d7e3f61b18..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UpdateResponse -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UpdateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UpdateResponse ToProto() - { - return new Proto.UpdateResponse(); - } - - /// - /// Returns a new UpdateResponse type from its Protobuf-equivalent representation. - /// - internal static UpdateResponse FromProto(Proto.UpdateResponse value) - { - return new UpdateResponse(); - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UploadResponse.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UploadResponse.cs deleted file mode 100644 index 23286a04145..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UploadResponse.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record UploadResponse -{ - [JsonPropertyName("count")] - public uint? Count { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UploadResponse type into its Protobuf-equivalent representation. - /// - internal Proto.UploadResponse ToProto() - { - var result = new Proto.UploadResponse(); - if (Count != null) - { - result.Count = Count ?? 0; - } - return result; - } - - /// - /// Returns a new UploadResponse type from its Protobuf-equivalent representation. - /// - internal static UploadResponse FromProto(Proto.UploadResponse value) - { - return new UploadResponse { Count = value.Count }; - } -} diff --git a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Usage.cs b/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Usage.cs deleted file mode 100644 index e5921bf2191..00000000000 --- a/seed/csharp-sdk/grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/Usage.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = Data.V1.Grpc; - -#nullable enable - -namespace SeedApi; - -public record Usage -{ - [JsonPropertyName("units")] - public uint? Units { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the Usage type into its Protobuf-equivalent representation. - /// - internal Proto.Usage ToProto() - { - var result = new Proto.Usage(); - if (Units != null) - { - result.Units = Units ?? 0; - } - return result; - } - - /// - /// Returns a new Usage type from its Protobuf-equivalent representation. - /// - internal static Usage FromProto(Proto.Usage value) - { - return new Usage { Units = value.Units }; - } -} diff --git a/seed/csharp-sdk/grpc-proto/.github/workflows/ci.yml b/seed/csharp-sdk/grpc-proto/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/grpc-proto/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/grpc-proto/.gitignore b/seed/csharp-sdk/grpc-proto/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/grpc-proto/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/grpc-proto/.mock/fern.config.json b/seed/csharp-sdk/grpc-proto/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/.mock/generators.yml b/seed/csharp-sdk/grpc-proto/.mock/generators.yml deleted file mode 100644 index d6b509d39ea..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/generators.yml +++ /dev/null @@ -1,6 +0,0 @@ -api: - - proto: - root: proto - target: proto/user/v1/user.proto - overrides: overrides.yml - local-generation: true \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/.mock/overrides.yml b/seed/csharp-sdk/grpc-proto/.mock/overrides.yml deleted file mode 100644 index bb6db99b0e4..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/overrides.yml +++ /dev/null @@ -1,31 +0,0 @@ -components: - schemas: - UserModel: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - - CreateRequest: - properties: - metadata: - $ref: '#/components/schemas/Metadata' - - Metadata: - oneOf: - - type: object - additionalProperties: - $ref: '#/components/schemas/MetadataValue' - - type: object - x-fern-encoding: - proto: - type: google.protobuf.Struct - - MetadataValue: - oneOf: - - type: number - format: double - - type: string - - type: boolean - x-fern-encoding: - proto: - type: google.protobuf.Value diff --git a/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/.mock/proto/user/v1/user.proto b/seed/csharp-sdk/grpc-proto/.mock/proto/user/v1/user.proto deleted file mode 100644 index 28542ac965a..00000000000 --- a/seed/csharp-sdk/grpc-proto/.mock/proto/user/v1/user.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package user.v1; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "User.V1"; -option go_package = "user/v1"; - -message UserModel { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateRequest { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateResponse { - UserModel user = 1; -} - -service UserService { - rpc Create(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/users" - body: "*" - }; - } -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/README.md b/seed/csharp-sdk/grpc-proto/README.md deleted file mode 100644 index fd73574bd96..00000000000 --- a/seed/csharp-sdk/grpc-proto/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/SeedApi)](https://nuget.org/packages/SeedApi) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedApi -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedApi; - -var client = new SeedApiClient(); -await client.Userservice.CreateAsync(new CreateRequest()); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedApi; - -try { - var response = await client.Userservice.CreateAsync(...); -} catch (SeedApiApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.Userservice.CreateAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.Userservice.CreateAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/proto/google/api/annotations.proto b/seed/csharp-sdk/grpc-proto/proto/google/api/annotations.proto deleted file mode 100644 index 8ff42098404..00000000000 --- a/seed/csharp-sdk/grpc-proto/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/proto/google/api/http.proto b/seed/csharp-sdk/grpc-proto/proto/google/api/http.proto deleted file mode 100644 index c8392381eb9..00000000000 --- a/seed/csharp-sdk/grpc-proto/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/proto/user/v1/user.proto b/seed/csharp-sdk/grpc-proto/proto/user/v1/user.proto deleted file mode 100644 index 28542ac965a..00000000000 --- a/seed/csharp-sdk/grpc-proto/proto/user/v1/user.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package user.v1; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "User.V1"; -option go_package = "user/v1"; - -message UserModel { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateRequest { - string username = 1; - string email = 2; - uint32 age = 3; - float weight = 4; - google.protobuf.Struct metadata = 5; -} - -message CreateResponse { - UserModel user = 1; -} - -service UserService { - rpc Create(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/users" - body: "*" - }; - } -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/reference.md b/seed/csharp-sdk/grpc-proto/reference.md deleted file mode 100644 index 1614ed804be..00000000000 --- a/seed/csharp-sdk/grpc-proto/reference.md +++ /dev/null @@ -1,41 +0,0 @@ -# Reference -## UserService -
client.Userservice.CreateAsync(CreateRequest { ... }) -> CreateResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.Userservice.CreateAsync(new CreateRequest()); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `CreateRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/grpc-proto/snippet-templates.json b/seed/csharp-sdk/grpc-proto/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/grpc-proto/snippet.json b/seed/csharp-sdk/grpc-proto/snippet.json deleted file mode 100644 index bdaa9e73c20..00000000000 --- a/seed/csharp-sdk/grpc-proto/snippet.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/users", - "method": "POST", - "identifier_override": "endpoint_userservice.create" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.Userservice.CreateAsync(new CreateRequest());\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 532d182486b..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedApi.Core; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/RawClientTests.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/RawClientTests.cs deleted file mode 100644 index df141253267..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.Custom.props b/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index fd7b07f82e5..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/EnumSerializer.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/EnumSerializer.cs deleted file mode 100644 index ac5c0792fbe..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Extensions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Extensions.cs deleted file mode 100644 index 2e70f2719a2..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedApi.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HeaderValue.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HeaderValue.cs deleted file mode 100644 index 30df1c51646..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedApi.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Headers.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Headers.cs deleted file mode 100644 index 24bf3179299..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedApi.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 130464dace1..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/IRequestOptions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/IRequestOptions.cs deleted file mode 100644 index e365cd162f0..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/IRequestOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedApi.Core; - -internal interface IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/ClientOptions.cs deleted file mode 100644 index 5c12019c489..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Net.Client; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The options used for gRPC client endpoints. - /// - public GrpcChannelOptions? GrpcOptions { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); - - /// - /// Clones this and returns a new instance - /// - internal ClientOptions Clone() - { - return new ClientOptions - { - BaseUrl = BaseUrl, - HttpClient = HttpClient, - MaxRetries = MaxRetries, - Timeout = Timeout, - Headers = new Headers(new Dictionary(Headers)), - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/GrpcRequestOptions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/GrpcRequestOptions.cs deleted file mode 100644 index 48c37927ea1..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/GrpcRequestOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Net.Http; -using Grpc.Core; -using SeedApi.Core; - -namespace SeedApi; - -#nullable enable - -public partial class GrpcRequestOptions -{ - /// - /// The maximum number of retry attempts. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// Options for write operations. - /// - public WriteOptions? WriteOptions { get; init; } - - /// - /// Client-side call credentials. Provide authorization with per-call granularity. - /// - public CallCredentials? CallCredentials { get; init; } - - /// - /// Headers to be sent with this particular request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/RequestOptions.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/RequestOptions.cs deleted file mode 100644 index 4d560f8337a..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class RequestOptions : IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - Headers IRequestOptions.Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiApiException.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiApiException.cs deleted file mode 100644 index 8c81259a788..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedApi; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedApiApiException(string message, int statusCode, object body) - : SeedApiException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiException.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiException.cs deleted file mode 100644 index 14d9b8d9ddd..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/SeedApiException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedApi; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedApiException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/Version.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index 8cff8b09a01..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - private readonly Lazy _grpc = new(() => new RawGrpcClient(clientOptions)); - - /// - /// The gRPC client used to make requests. - /// - public RawGrpcClient Grpc => _grpc.Value; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public IRequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse( - request.ContentType - ); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawGrpcClient.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawGrpcClient.cs deleted file mode 100644 index 657be1d946d..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Core/RawGrpcClient.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using Grpc.Core; -using Grpc.Net.Client; - -namespace SeedApi.Core; - -/// -/// Utility class for making gRPC requests to the API. -/// -internal class RawGrpcClient -{ - /// - /// The gRPC channel used to make requests. - /// - public readonly GrpcChannel Channel; - - private readonly ClientOptions _clientOptions; - - public RawGrpcClient(ClientOptions clientOptions) - { - _clientOptions = clientOptions; - - var grpcOptions = PrepareGrpcChannelOptions(); - Channel = - grpcOptions != null - ? GrpcChannel.ForAddress(_clientOptions.BaseUrl, grpcOptions) - : GrpcChannel.ForAddress(_clientOptions.BaseUrl); - } - - /// - /// Prepares the gRPC metadata associated with the given request. - /// The provided request headers take precedence over the headers - /// associated with this client (which are sent on _every_ request). - /// - public CallOptions CreateCallOptions( - GrpcRequestOptions options, - CancellationToken cancellationToken = default - ) - { - var metadata = new global::Grpc.Core.Metadata(); - SetHeaders(metadata, _clientOptions.Headers); - SetHeaders(metadata, options.Headers); - - var timeout = options.Timeout ?? _clientOptions.Timeout; - var deadline = DateTime.UtcNow.Add(timeout); - return new CallOptions( - metadata, - deadline, - cancellationToken, - options.WriteOptions, - null, - options.CallCredentials - ); - } - - private void SetHeaders(global::Grpc.Core.Metadata metadata, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - metadata.Add(header.Key, value); - } - } - } - - private GrpcChannelOptions? PrepareGrpcChannelOptions() - { - var grpcChannelOptions = _clientOptions.GrpcOptions; - if (grpcChannelOptions == null) - { - return null; - } - grpcChannelOptions.HttpClient ??= _clientOptions.HttpClient; - grpcChannelOptions.MaxRetryAttempts ??= _clientOptions.MaxRetries; - return grpcChannelOptions; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.Custom.props b/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 4cd5aff38e8..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/grpc-proto/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - - diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index 195fd05b6e3..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedApi" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferngrpc-proto/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - Userservice = new UserserviceClient(_client); - } - - public UserserviceClient Userservice { get; init; } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/CreateResponse.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/CreateResponse.cs deleted file mode 100644 index 608e09ded5f..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/CreateResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = User.V1; - -#nullable enable - -namespace SeedApi; - -public record CreateResponse -{ - [JsonPropertyName("user")] - public UserModel? User { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the CreateResponse type into its Protobuf-equivalent representation. - /// - internal Proto.CreateResponse ToProto() - { - var result = new Proto.CreateResponse(); - if (User != null) - { - result.User = User.ToProto(); - } - return result; - } - - /// - /// Returns a new CreateResponse type from its Protobuf-equivalent representation. - /// - internal static CreateResponse FromProto(Proto.CreateResponse value) - { - return new CreateResponse - { - User = value.User != null ? UserModel.FromProto(value.User) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/Metadata.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/MetadataValue.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/UserModel.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/UserModel.cs deleted file mode 100644 index 986ace0fbd1..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Types/UserModel.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = User.V1; - -#nullable enable - -namespace SeedApi; - -public record UserModel -{ - [JsonPropertyName("username")] - public string? Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the UserModel type into its Protobuf-equivalent representation. - /// - internal Proto.UserModel ToProto() - { - var result = new Proto.UserModel(); - if (Username != null) - { - result.Username = Username ?? ""; - } - if (Email != null) - { - result.Email = Email ?? ""; - } - if (Age != null) - { - result.Age = Age ?? 0; - } - if (Weight != null) - { - result.Weight = Weight ?? 0.0f; - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - return result; - } - - /// - /// Returns a new UserModel type from its Protobuf-equivalent representation. - /// - internal static UserModel FromProto(Proto.UserModel value) - { - return new UserModel - { - Username = value.Username, - Email = value.Email, - Age = value.Age, - Weight = value.Weight, - Metadata = value.Metadata != null ? Metadata.FromProto(value.Metadata) : null, - }; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/Requests/CreateRequest.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/Requests/CreateRequest.cs deleted file mode 100644 index f441a389685..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/Requests/CreateRequest.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; -using Proto = User.V1; - -#nullable enable - -namespace SeedApi; - -public record CreateRequest -{ - [JsonPropertyName("username")] - public string? Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - /// - /// Maps the CreateRequest type into its Protobuf-equivalent representation. - /// - internal Proto.CreateRequest ToProto() - { - var result = new Proto.CreateRequest(); - if (Username != null) - { - result.Username = Username ?? ""; - } - if (Email != null) - { - result.Email = Email ?? ""; - } - if (Age != null) - { - result.Age = Age ?? 0; - } - if (Weight != null) - { - result.Weight = Weight ?? 0.0f; - } - if (Metadata != null) - { - result.Metadata = Metadata.ToProto(); - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/UserserviceClient.cs b/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/UserserviceClient.cs deleted file mode 100644 index b742ef024a2..00000000000 --- a/seed/csharp-sdk/grpc-proto/src/SeedApi/Userservice/UserserviceClient.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Threading; -using Grpc.Core; -using SeedApi.Core; -using User.V1; - -#nullable enable - -namespace SeedApi; - -public partial class UserserviceClient -{ - private RawClient _client; - - private RawGrpcClient _grpc; - - private UserService.UserServiceClient _userService; - - internal UserserviceClient(RawClient client) - { - _client = client; - _grpc = _client.Grpc; - _userService = new UserService.UserServiceClient(_grpc.Channel); - } - - /// - /// - /// await client.Userservice.CreateAsync(new CreateRequest()); - /// - /// - public async Task CreateAsync( - CreateRequest request, - GrpcRequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - try - { - var callOptions = _grpc.CreateCallOptions( - options ?? new GrpcRequestOptions(), - cancellationToken - ); - var call = _userService.CreateAsync(request.ToProto(), callOptions); - var response = await call.ConfigureAwait(false); - return CreateResponse.FromProto(response); - } - catch (RpcException rpc) - { - var statusCode = (int)rpc.StatusCode; - throw new SeedApiApiException( - $"Error with gRPC status code {statusCode}", - statusCode, - rpc.Message - ); - } - catch (Exception e) - { - throw new SeedApiException("Error", e); - } - } -} diff --git a/seed/csharp-sdk/grpc/.github/workflows/ci.yml b/seed/csharp-sdk/grpc/.github/workflows/ci.yml deleted file mode 100644 index bc4fa1a98cb..00000000000 --- a/seed/csharp-sdk/grpc/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedApi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/grpc/.gitignore b/seed/csharp-sdk/grpc/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-sdk/grpc/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/grpc/.mock/definition/api.yml b/seed/csharp-sdk/grpc/.mock/definition/api.yml deleted file mode 100644 index 15a9f823724..00000000000 --- a/seed/csharp-sdk/grpc/.mock/definition/api.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: api - -error-discrimination: - strategy: status-code \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/.mock/definition/user.yml b/seed/csharp-sdk/grpc/.mock/definition/user.yml deleted file mode 100644 index 80223300afc..00000000000 --- a/seed/csharp-sdk/grpc/.mock/definition/user.yml +++ /dev/null @@ -1,61 +0,0 @@ -types: - Metadata: - type: map> - encoding: - proto: - type: google.protobuf.Struct - - MetadataValue: - discriminated: false - union: - - double - - string - - boolean - - list - encoding: - proto: - type: google.protobuf.Value - - User: - properties: - id: string - username: string - email: optional - age: optional - weight: optional - metadata: optional - - CreateUserResponse: - properties: - user: User - -service: - auth: false - base-path: / - transport: - grpc: - service-name: UserService - endpoints: - createUser: - method: POST - path: /users - request: - name: CreateUserRequest - body: - properties: - username: string - email: optional - age: optional - weight: optional - response: CreateUserResponse - - getUser: - method: GET - path: /users - request: - name: GetUserRequest - query-parameters: - username: optional - age: optional - weight: optional - response: User diff --git a/seed/csharp-sdk/grpc/.mock/fern.config.json b/seed/csharp-sdk/grpc/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/grpc/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/.mock/generators.yml b/seed/csharp-sdk/grpc/.mock/generators.yml deleted file mode 100644 index 9e26dfeeb6e..00000000000 --- a/seed/csharp-sdk/grpc/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/README.md b/seed/csharp-sdk/grpc/README.md deleted file mode 100644 index c3096374de9..00000000000 --- a/seed/csharp-sdk/grpc/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) -[![nuget shield](https://img.shields.io/nuget/v/SeedApi)](https://nuget.org/packages/SeedApi) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedApi -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedApi; - -var client = new SeedApiClient(); -await client.User.CreateUserAsync( - new CreateUserRequest - { - Username = "string", - Email = "string", - Age = 1, - Weight = 1.1f, - } -); -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```csharp -using SeedApi; - -try { - var response = await client.User.CreateUserAsync(...); -} catch (SeedApiApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.User.CreateUserAsync( - ..., - new RequestOptions { - MaxRetries: 0 // Override MaxRetries at the request level - } -); -``` - -### Timeouts - -The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. - -```csharp -var response = await client.User.CreateUserAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/reference.md b/seed/csharp-sdk/grpc/reference.md deleted file mode 100644 index e5b271bba5c..00000000000 --- a/seed/csharp-sdk/grpc/reference.md +++ /dev/null @@ -1,96 +0,0 @@ -# Reference -## User -
client.User.CreateUserAsync(CreateUserRequest { ... }) -> CreateUserResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.User.CreateUserAsync( - new CreateUserRequest - { - Username = "string", - Email = "string", - Age = 1, - Weight = 1.1f, - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `CreateUserRequest` - -
-
-
-
- - -
-
-
- -
client.User.GetUserAsync(GetUserRequest { ... }) -> User -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.User.GetUserAsync( - new GetUserRequest - { - Username = "string", - Age = 1, - Weight = 1.1f, - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `GetUserRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/grpc/snippet-templates.json b/seed/csharp-sdk/grpc/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/grpc/snippet.json b/seed/csharp-sdk/grpc/snippet.json deleted file mode 100644 index a85e2c36462..00000000000 --- a/seed/csharp-sdk/grpc/snippet.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/users", - "method": "POST", - "identifier_override": "endpoint_user.createUser" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.User.CreateUserAsync(\n new CreateUserRequest\n {\n Username = \"string\",\n Email = \"string\",\n Age = 1,\n Weight = 1.1f,\n }\n);\n" - } - }, - { - "example_identifier": null, - "id": { - "path": "/users", - "method": "GET", - "identifier_override": "endpoint_user.getUser" - }, - "snippet": { - "type": "typescript", - "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.User.GetUserAsync(\n new GetUserRequest\n {\n Username = \"string\",\n Age = 1,\n Weight = 1.1f,\n }\n);\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/Core/RawClientTests.cs b/seed/csharp-sdk/grpc/src/SeedApi.Test/Core/RawClientTests.cs deleted file mode 100644 index df141253267..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedApi.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedApi.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/grpc/src/SeedApi.Test/SeedApi.Test.csproj deleted file mode 100644 index c5be29f92d9..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/SeedApi.Test.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/TestClient.cs b/seed/csharp-sdk/grpc/src/SeedApi.Test/TestClient.cs deleted file mode 100644 index f1550b51fff..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedApi.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs deleted file mode 100644 index d60f783110a..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ /dev/null @@ -1,39 +0,0 @@ -using NUnit.Framework; -using SeedApi; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -#nullable enable - -namespace SeedApi.Test.Unit.MockServer; - -[SetUpFixture] -public class BaseMockServerTest -{ - protected static WireMockServer Server { get; set; } = null!; - - protected static SeedApiClient Client { get; set; } = null!; - - protected static RequestOptions RequestOptions { get; set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger() } - ); - - // Initialize the Client - Client = new SeedApiClient(); - - RequestOptions = new RequestOptions { BaseUrl = Server.Urls[0] }; - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/CreateUserTest.cs b/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/CreateUserTest.cs deleted file mode 100644 index aa4ac469d39..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/CreateUserTest.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Threading.Tasks; -using FluentAssertions.Json; -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi.Test.Unit.MockServer; - -[TestFixture] -public class CreateUserTest : BaseMockServerTest -{ - [Test] - public async Task MockServerTest() - { - const string requestJson = """ - { - "username": "string", - "email": "string", - "age": 1, - "weight": 1.1 - } - """; - - const string mockResponse = """ - { - "user": { - "id": "string", - "username": "string", - "email": "string", - "age": 1, - "weight": 1.1, - "metadata": {} - } - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/users") - .UsingPost() - .WithBodyAsJson(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = await Client.User.CreateUserAsync( - new CreateUserRequest - { - Username = "string", - Email = "string", - Age = 1, - Weight = 1.1f, - }, - RequestOptions - ); - JToken - .Parse(mockResponse) - .Should() - .BeEquivalentTo(JToken.Parse(JsonUtils.Serialize(response))); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/GetUserTest.cs b/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/GetUserTest.cs deleted file mode 100644 index 57afe5e4281..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi.Test/Unit/MockServer/GetUserTest.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Threading.Tasks; -using FluentAssertions.Json; -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using SeedApi; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi.Test.Unit.MockServer; - -[TestFixture] -public class GetUserTest : BaseMockServerTest -{ - [Test] - public async Task MockServerTest() - { - const string mockResponse = """ - { - "id": "string", - "username": "string", - "email": "string", - "age": 1, - "weight": 1.1, - "metadata": {} - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/users") - .WithParam("username", "string") - .WithParam("age", "1") - .WithParam("weight", "1.1") - .UsingGet() - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = await Client.User.GetUserAsync( - new GetUserRequest - { - Username = "string", - Age = 1, - Weight = 1.1f, - }, - RequestOptions - ); - JToken - .Parse(mockResponse) - .Should() - .BeEquivalentTo(JToken.Parse(JsonUtils.Serialize(response))); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/CollectionItemSerializer.cs deleted file mode 100644 index af2c9adf7a7..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Constants.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Constants.cs deleted file mode 100644 index ccf4e963cc8..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedApi.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/DateTimeSerializer.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/DateTimeSerializer.cs deleted file mode 100644 index a39de9c28d7..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Extensions.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Extensions.cs deleted file mode 100644 index 2e70f2719a2..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedApi.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/HeaderValue.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/HeaderValue.cs deleted file mode 100644 index 30df1c51646..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedApi.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Headers.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Headers.cs deleted file mode 100644 index 24bf3179299..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedApi.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/HttpMethodExtensions.cs deleted file mode 100644 index 130464dace1..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedApi.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/JsonConfiguration.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/JsonConfiguration.cs deleted file mode 100644 index 13a05f5111f..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/OneOfSerializer.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/OneOfSerializer.cs deleted file mode 100644 index 24ee9268e48..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedApi.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/ClientOptions.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/ClientOptions.cs deleted file mode 100644 index 2ac1fe17bb7..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/RequestOptions.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/RequestOptions.cs deleted file mode 100644 index 6e0923d6f60..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class RequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiApiException.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiApiException.cs deleted file mode 100644 index 8c81259a788..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedApi; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedApiApiException(string message, int statusCode, object body) - : SeedApiException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiException.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiException.cs deleted file mode 100644 index 14d9b8d9ddd..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/SeedApiException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedApi; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedApiException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/Version.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/Version.cs deleted file mode 100644 index f430a1bf84c..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedApi; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/RawClient.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/RawClient.cs deleted file mode 100644 index f916f776d5f..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/RawClient.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System.Net.Http; -using System.Text; -using System.Threading; - -namespace SeedApi.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public RequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/Core/StringEnumSerializer.cs b/seed/csharp-sdk/grpc/src/SeedApi/Core/StringEnumSerializer.cs deleted file mode 100644 index 5e064791aeb..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedApi.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/grpc/src/SeedApi/SeedApi.csproj deleted file mode 100644 index 0ddf92937e5..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/SeedApi.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/grpc/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - <_Parameter1>SeedApi.Test - - - - diff --git a/seed/csharp-sdk/grpc/src/SeedApi/SeedApiClient.cs b/seed/csharp-sdk/grpc/src/SeedApi/SeedApiClient.cs deleted file mode 100644 index 4abdf81bfe5..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/SeedApiClient.cs +++ /dev/null @@ -1,35 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class SeedApiClient -{ - private RawClient _client; - - public SeedApiClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedApi" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferngrpc/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - User = new UserClient(_client); - } - - public UserClient User { get; init; } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/CreateUserRequest.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/CreateUserRequest.cs deleted file mode 100644 index a654b4a0bf5..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/CreateUserRequest.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record CreateUserRequest -{ - [JsonPropertyName("username")] - public required string Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/GetUserRequest.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/GetUserRequest.cs deleted file mode 100644 index b0cbbb7ad7a..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Requests/GetUserRequest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record GetUserRequest -{ - public string? Username { get; set; } - - public uint? Age { get; set; } - - public float? Weight { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/CreateUserResponse.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Types/CreateUserResponse.cs deleted file mode 100644 index 26fb31dde58..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/CreateUserResponse.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record CreateUserResponse -{ - [JsonPropertyName("user")] - public required User User { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/Metadata.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Types/Metadata.cs deleted file mode 100644 index 2e16aa50b3f..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/Metadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class Metadata : Dictionary -{ - public Metadata() { } - - public Metadata(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Struct ToProto() - { - var result = new Proto.Struct(); - foreach (var kvp in this) - { - result.Fields[kvp.Key] = kvp.Value?.ToProto(); - } - return result; - } - - internal static Metadata FromProto(Proto.Struct value) - { - var result = new Metadata(); - foreach (var kvp in value.Fields) - { - result[kvp.Key] = kvp.Value != null ? MetadataValue.FromProto(kvp.Value) : null; - } - return result; - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/MetadataValue.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Types/MetadataValue.cs deleted file mode 100644 index 2308676e891..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/MetadataValue.cs +++ /dev/null @@ -1,91 +0,0 @@ -using OneOf; -using SeedApi.Core; -using Proto = Google.Protobuf.WellKnownTypes; - -#nullable enable - -namespace SeedApi; - -public sealed class MetadataValue( - OneOf, Metadata> value -) : OneOfBase, Metadata>(value) -{ - public override string ToString() - { - return JsonUtils.Serialize(this); - } - - internal Proto.Value ToProto() - { - return Match( - Proto.Value.ForString, - Proto.Value.ForNumber, - Proto.Value.ForBool, - list => new Proto.Value - { - ListValue = new Proto.ListValue - { - Values = { list.Select(item => item?.ToProto()) }, - }, - }, - nested => new Proto.Value { StructValue = nested.ToProto() } - ); - } - - internal static MetadataValue? FromProto(Proto.Value value) - { - return value.KindCase switch - { - Proto.Value.KindOneofCase.StringValue => value.StringValue, - Proto.Value.KindOneofCase.NumberValue => value.NumberValue, - Proto.Value.KindOneofCase.BoolValue => value.BoolValue, - Proto.Value.KindOneofCase.ListValue => value - .ListValue.Values.Select(FromProto) - .ToList(), - Proto.Value.KindOneofCase.StructValue => Metadata.FromProto(value.StructValue), - _ => null, - }; - } - - public static implicit operator MetadataValue(string value) => new(value); - - public static implicit operator MetadataValue(bool value) => new(value); - - public static implicit operator MetadataValue(double value) => new(value); - - public static implicit operator MetadataValue(Metadata value) => new(value); - - public static implicit operator MetadataValue(MetadataValue?[] value) => new(value); - - public static implicit operator MetadataValue(List value) => new(value); - - public static implicit operator MetadataValue(string[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(double?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(bool[] value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(bool?[] value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => new MetadataValue(v)).ToList()); - - public static implicit operator MetadataValue(List value) => - new(value.Select(v => v != null ? new MetadataValue(v.Value) : null).ToList()); -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/User.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/Types/User.cs deleted file mode 100644 index 1f029dc332a..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/Types/User.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json.Serialization; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public record User -{ - [JsonPropertyName("id")] - public required string Id { get; set; } - - [JsonPropertyName("username")] - public required string Username { get; set; } - - [JsonPropertyName("email")] - public string? Email { get; set; } - - [JsonPropertyName("age")] - public uint? Age { get; set; } - - [JsonPropertyName("weight")] - public float? Weight { get; set; } - - [JsonPropertyName("metadata")] - public Metadata? Metadata { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/grpc/src/SeedApi/User/UserClient.cs b/seed/csharp-sdk/grpc/src/SeedApi/User/UserClient.cs deleted file mode 100644 index f4f4787f7c8..00000000000 --- a/seed/csharp-sdk/grpc/src/SeedApi/User/UserClient.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System.Net.Http; -using System.Text.Json; -using System.Threading; -using SeedApi.Core; - -#nullable enable - -namespace SeedApi; - -public partial class UserClient -{ - private RawClient _client; - - internal UserClient(RawClient client) - { - _client = client; - } - - /// - /// - /// await client.User.CreateUserAsync( - /// new CreateUserRequest - /// { - /// Username = "string", - /// Email = "string", - /// Age = 1, - /// Weight = 1.1f, - /// } - /// ); - /// - /// - public async Task CreateUserAsync( - CreateUserRequest request, - RequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/users", - Body = request, - Options = options, - }, - cancellationToken - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedApiException("Failed to deserialize response", e); - } - } - - throw new SeedApiApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - responseBody - ); - } - - /// - /// - /// await client.User.GetUserAsync( - /// new GetUserRequest - /// { - /// Username = "string", - /// Age = 1, - /// Weight = 1.1f, - /// } - /// ); - /// - /// - public async Task GetUserAsync( - GetUserRequest request, - RequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - var _query = new Dictionary(); - if (request.Username != null) - { - _query["username"] = request.Username; - } - if (request.Age != null) - { - _query["age"] = request.Age.ToString(); - } - if (request.Weight != null) - { - _query["weight"] = request.Weight.ToString(); - } - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Get, - Path = "/users", - Query = _query, - Options = options, - }, - cancellationToken - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedApiException("Failed to deserialize response", e); - } - } - - throw new SeedApiApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - responseBody - ); - } -} diff --git a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs index 28633fe4009..05021088ba4 100644 --- a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj index 7551abfc848..3178b30c679 100644 --- a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj +++ b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/SeedIdempotencyHeaders.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Unit/MockServer/BaseMockServerTest.cs index 4c944f907ef..f9a8ccaa86d 100644 --- a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.Test/Unit/MockServer/BaseMockServerTest.cs @@ -38,5 +38,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.sln b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.sln new file mode 100644 index 00000000000..4b204c92dfb --- /dev/null +++ b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedIdempotencyHeaders", "SeedIdempotencyHeaders\SeedIdempotencyHeaders.csproj", "{047FF487-C514-441D-99BD-BEBE086D6D94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedIdempotencyHeaders.Test", "SeedIdempotencyHeaders.Test\SeedIdempotencyHeaders.Test.csproj", "{7B35C604-BD65-4CBD-B529-E71A428BAF0E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {047FF487-C514-441D-99BD-BEBE086D6D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {047FF487-C514-441D-99BD-BEBE086D6D94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {047FF487-C514-441D-99BD-BEBE086D6D94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {047FF487-C514-441D-99BD-BEBE086D6D94}.Release|Any CPU.Build.0 = Release|Any CPU + {7B35C604-BD65-4CBD-B529-E71A428BAF0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B35C604-BD65-4CBD-B529-E71A428BAF0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B35C604-BD65-4CBD-B529-E71A428BAF0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B35C604-BD65-4CBD-B529-E71A428BAF0E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj index 97673c7b847..976b0e40119 100644 --- a/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj +++ b/seed/csharp-sdk/idempotency-headers/src/SeedIdempotencyHeaders/SeedIdempotencyHeaders.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/idempotency-headers/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs index 6c0cf9a6f86..a332eb4c2f4 100644 --- a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.sln b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.sln new file mode 100644 index 00000000000..6d974d76661 --- /dev/null +++ b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{B0968666-D02D-4A03-9A47-4D3CAA222F7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{294B5C7F-1375-47A3-AA72-104F56768B02}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0968666-D02D-4A03-9A47-4D3CAA222F7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0968666-D02D-4A03-9A47-4D3CAA222F7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0968666-D02D-4A03-9A47-4D3CAA222F7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0968666-D02D-4A03-9A47-4D3CAA222F7F}.Release|Any CPU.Build.0 = Release|Any CPU + {294B5C7F-1375-47A3-AA72-104F56768B02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {294B5C7F-1375-47A3-AA72-104F56768B02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {294B5C7F-1375-47A3-AA72-104F56768B02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {294B5C7F-1375-47A3-AA72-104F56768B02}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi/SeedApi.csproj index 224033f2519..90554a2cd68 100644 --- a/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/imdb/exception-class-names/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/imdb/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs index 6c0cf9a6f86..a332eb4c2f4 100644 --- a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.sln b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.sln new file mode 100644 index 00000000000..cf7c09b9236 --- /dev/null +++ b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{B4EE03B1-3F6A-429B-B88B-86E220BC944C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{28CB0FC3-96A3-49AC-BD60-466D2A1D22D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B4EE03B1-3F6A-429B-B88B-86E220BC944C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4EE03B1-3F6A-429B-B88B-86E220BC944C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4EE03B1-3F6A-429B-B88B-86E220BC944C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4EE03B1-3F6A-429B-B88B-86E220BC944C}.Release|Any CPU.Build.0 = Release|Any CPU + {28CB0FC3-96A3-49AC-BD60-466D2A1D22D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28CB0FC3-96A3-49AC-BD60-466D2A1D22D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28CB0FC3-96A3-49AC-BD60-466D2A1D22D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28CB0FC3-96A3-49AC-BD60-466D2A1D22D5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi/SeedApi.csproj index 4761285c71c..31a2ab693cc 100644 --- a/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/imdb/extra-dependencies/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/imdb/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs index 6c0cf9a6f86..a332eb4c2f4 100644 --- a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.sln b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.sln new file mode 100644 index 00000000000..b38cb70c7e6 --- /dev/null +++ b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{C6F90064-1CAD-4ACA-8592-8376C4CC2041}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{BB23C9C0-51A1-4739-8E4B-4633F89D9B40}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6F90064-1CAD-4ACA-8592-8376C4CC2041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6F90064-1CAD-4ACA-8592-8376C4CC2041}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6F90064-1CAD-4ACA-8592-8376C4CC2041}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6F90064-1CAD-4ACA-8592-8376C4CC2041}.Release|Any CPU.Build.0 = Release|Any CPU + {BB23C9C0-51A1-4739-8E4B-4633F89D9B40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB23C9C0-51A1-4739-8E4B-4633F89D9B40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB23C9C0-51A1-4739-8E4B-4633F89D9B40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB23C9C0-51A1-4739-8E4B-4633F89D9B40}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi/SeedApi.csproj index 224033f2519..90554a2cd68 100644 --- a/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/imdb/no-custom-config/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/imdb/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs index fe53e0c1a87..95eb4f28c3e 100644 --- a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/SeedLicense.Test.csproj b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/SeedLicense.Test.csproj index 57e8eb5c544..48c2149242c 100644 --- a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/SeedLicense.Test.csproj +++ b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/SeedLicense.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs index 2e60e69ba69..348ab3eb0c0 100644 --- a/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/license/custom-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/license/custom-license/src/SeedLicense.sln b/seed/csharp-sdk/license/custom-license/src/SeedLicense.sln new file mode 100644 index 00000000000..e63ff2adabb --- /dev/null +++ b/seed/csharp-sdk/license/custom-license/src/SeedLicense.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense", "SeedLicense\SeedLicense.csproj", "{A4038D5A-941E-4DCD-9295-EAFD7F55DD7D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense.Test", "SeedLicense.Test\SeedLicense.Test.csproj", "{009D531A-4208-4108-B284-D745E8CC046B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A4038D5A-941E-4DCD-9295-EAFD7F55DD7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4038D5A-941E-4DCD-9295-EAFD7F55DD7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4038D5A-941E-4DCD-9295-EAFD7F55DD7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4038D5A-941E-4DCD-9295-EAFD7F55DD7D}.Release|Any CPU.Build.0 = Release|Any CPU + {009D531A-4208-4108-B284-D745E8CC046B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {009D531A-4208-4108-B284-D745E8CC046B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {009D531A-4208-4108-B284-D745E8CC046B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {009D531A-4208-4108-B284-D745E8CC046B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/license/custom-license/src/SeedLicense/SeedLicense.csproj b/seed/csharp-sdk/license/custom-license/src/SeedLicense/SeedLicense.csproj index 4616bc86443..7e636c9679a 100644 --- a/seed/csharp-sdk/license/custom-license/src/SeedLicense/SeedLicense.csproj +++ b/seed/csharp-sdk/license/custom-license/src/SeedLicense/SeedLicense.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/license/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs index fe53e0c1a87..95eb4f28c3e 100644 --- a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/SeedLicense.Test.csproj b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/SeedLicense.Test.csproj index 57e8eb5c544..48c2149242c 100644 --- a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/SeedLicense.Test.csproj +++ b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/SeedLicense.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs index 2e60e69ba69..348ab3eb0c0 100644 --- a/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/license/mit-license/src/SeedLicense.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/license/mit-license/src/SeedLicense.sln b/seed/csharp-sdk/license/mit-license/src/SeedLicense.sln new file mode 100644 index 00000000000..4449da981b4 --- /dev/null +++ b/seed/csharp-sdk/license/mit-license/src/SeedLicense.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense", "SeedLicense\SeedLicense.csproj", "{81C61555-2101-449D-B8DA-EECA2676AAF5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLicense.Test", "SeedLicense.Test\SeedLicense.Test.csproj", "{40E7B616-5BCC-4A08-AE40-15700CF4F8A0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81C61555-2101-449D-B8DA-EECA2676AAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81C61555-2101-449D-B8DA-EECA2676AAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81C61555-2101-449D-B8DA-EECA2676AAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81C61555-2101-449D-B8DA-EECA2676AAF5}.Release|Any CPU.Build.0 = Release|Any CPU + {40E7B616-5BCC-4A08-AE40-15700CF4F8A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40E7B616-5BCC-4A08-AE40-15700CF4F8A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40E7B616-5BCC-4A08-AE40-15700CF4F8A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40E7B616-5BCC-4A08-AE40-15700CF4F8A0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/license/mit-license/src/SeedLicense/SeedLicense.csproj b/seed/csharp-sdk/license/mit-license/src/SeedLicense/SeedLicense.csproj index 4616bc86443..7e636c9679a 100644 --- a/seed/csharp-sdk/license/mit-license/src/SeedLicense/SeedLicense.csproj +++ b/seed/csharp-sdk/license/mit-license/src/SeedLicense/SeedLicense.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/license/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs index b21cca4f34a..591b1211e15 100644 --- a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj b/seed/csharp-sdk/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj index 49432778357..9acd0732fca 100644 --- a/seed/csharp-sdk/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj +++ b/seed/csharp-sdk/literal/src/SeedLiteral.Test/SeedLiteral.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/BaseMockServerTest.cs index d7e26bdb328..12429730b85 100644 --- a/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/literal/src/SeedLiteral.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/literal/src/SeedLiteral.sln b/seed/csharp-sdk/literal/src/SeedLiteral.sln new file mode 100644 index 00000000000..c1d52aca7c6 --- /dev/null +++ b/seed/csharp-sdk/literal/src/SeedLiteral.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLiteral", "SeedLiteral\SeedLiteral.csproj", "{2528A7A9-5700-46E9-86B1-24D74B3C7A5B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedLiteral.Test", "SeedLiteral.Test\SeedLiteral.Test.csproj", "{42258FF3-0B72-460D-AF73-FEA00A542337}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2528A7A9-5700-46E9-86B1-24D74B3C7A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2528A7A9-5700-46E9-86B1-24D74B3C7A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2528A7A9-5700-46E9-86B1-24D74B3C7A5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2528A7A9-5700-46E9-86B1-24D74B3C7A5B}.Release|Any CPU.Build.0 = Release|Any CPU + {42258FF3-0B72-460D-AF73-FEA00A542337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42258FF3-0B72-460D-AF73-FEA00A542337}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42258FF3-0B72-460D-AF73-FEA00A542337}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42258FF3-0B72-460D-AF73-FEA00A542337}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/literal/src/SeedLiteral/SeedLiteral.csproj b/seed/csharp-sdk/literal/src/SeedLiteral/SeedLiteral.csproj index 141d55cc2c8..e6c802c1c76 100644 --- a/seed/csharp-sdk/literal/src/SeedLiteral/SeedLiteral.csproj +++ b/seed/csharp-sdk/literal/src/SeedLiteral/SeedLiteral.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/literal/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs index 934dd30b644..387a195f32b 100644 --- a/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj index d7864572ab5..0cd79747a61 100644 --- a/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj +++ b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.Test/SeedMixedCase.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/mixed-case/src/SeedMixedCase.sln b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.sln new file mode 100644 index 00000000000..933ce8e8246 --- /dev/null +++ b/seed/csharp-sdk/mixed-case/src/SeedMixedCase.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedCase", "SeedMixedCase\SeedMixedCase.csproj", "{811897E6-2A5D-425B-A16C-3EF7F48817DF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedCase.Test", "SeedMixedCase.Test\SeedMixedCase.Test.csproj", "{9D239C32-22B3-45EC-A120-2B37F9484516}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {811897E6-2A5D-425B-A16C-3EF7F48817DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {811897E6-2A5D-425B-A16C-3EF7F48817DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {811897E6-2A5D-425B-A16C-3EF7F48817DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {811897E6-2A5D-425B-A16C-3EF7F48817DF}.Release|Any CPU.Build.0 = Release|Any CPU + {9D239C32-22B3-45EC-A120-2B37F9484516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D239C32-22B3-45EC-A120-2B37F9484516}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D239C32-22B3-45EC-A120-2B37F9484516}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D239C32-22B3-45EC-A120-2B37F9484516}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj b/seed/csharp-sdk/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj index c3e5ee90fa9..84372cf8dba 100644 --- a/seed/csharp-sdk/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj +++ b/seed/csharp-sdk/mixed-case/src/SeedMixedCase/SeedMixedCase.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/mixed-case/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs index 7dc7cb70d4e..e866b8cf17c 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj index 1c0353bdf23..e2d88fb3556 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/SeedMixedFileDirectory.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/BaseMockServerTest.cs index 6ac994265f8..b53508997cc 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.sln b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.sln new file mode 100644 index 00000000000..974750c9625 --- /dev/null +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedFileDirectory", "SeedMixedFileDirectory\SeedMixedFileDirectory.csproj", "{CB9F91AA-272F-4B3C-9C60-B73D9E1A84FD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMixedFileDirectory.Test", "SeedMixedFileDirectory.Test\SeedMixedFileDirectory.Test.csproj", "{CF45FBD5-6398-4327-A98E-A8FD9C32B84E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB9F91AA-272F-4B3C-9C60-B73D9E1A84FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB9F91AA-272F-4B3C-9C60-B73D9E1A84FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB9F91AA-272F-4B3C-9C60-B73D9E1A84FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB9F91AA-272F-4B3C-9C60-B73D9E1A84FD}.Release|Any CPU.Build.0 = Release|Any CPU + {CF45FBD5-6398-4327-A98E-A8FD9C32B84E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF45FBD5-6398-4327-A98E-A8FD9C32B84E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF45FBD5-6398-4327-A98E-A8FD9C32B84E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF45FBD5-6398-4327-A98E-A8FD9C32B84E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj index a6156b7ee41..698257f0885 100644 --- a/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj +++ b/seed/csharp-sdk/mixed-file-directory/src/SeedMixedFileDirectory/SeedMixedFileDirectory.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/mixed-file-directory/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs index f3fcb923e6f..2bd23e45c15 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj index b32870f7d52..3c47b405159 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/SeedMultiLineDocs.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/BaseMockServerTest.cs index 43183933f78..ba19ac81d8f 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.sln b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.sln new file mode 100644 index 00000000000..891a1fd6c2d --- /dev/null +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiLineDocs", "SeedMultiLineDocs\SeedMultiLineDocs.csproj", "{5C9BB187-186D-452D-A108-E59B3D29EC08}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiLineDocs.Test", "SeedMultiLineDocs.Test\SeedMultiLineDocs.Test.csproj", "{FE79A030-4C02-4537-AE97-B12B7BE87D95}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5C9BB187-186D-452D-A108-E59B3D29EC08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C9BB187-186D-452D-A108-E59B3D29EC08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C9BB187-186D-452D-A108-E59B3D29EC08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C9BB187-186D-452D-A108-E59B3D29EC08}.Release|Any CPU.Build.0 = Release|Any CPU + {FE79A030-4C02-4537-AE97-B12B7BE87D95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE79A030-4C02-4537-AE97-B12B7BE87D95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE79A030-4C02-4537-AE97-B12B7BE87D95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE79A030-4C02-4537-AE97-B12B7BE87D95}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj index 00a94e71b45..8a0ae16ffa3 100644 --- a/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj +++ b/seed/csharp-sdk/multi-line-docs/src/SeedMultiLineDocs/SeedMultiLineDocs.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-line-docs/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs index c83427a4f3c..77b2aa5e0f7 100644 --- a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj index e1b1a76e305..f2a46ae0ca2 100644 --- a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj +++ b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.Test/SeedMultiUrlEnvironmentNoDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln new file mode 100644 index 00000000000..fd772ebebb6 --- /dev/null +++ b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironmentNoDefault", "SeedMultiUrlEnvironmentNoDefault\SeedMultiUrlEnvironmentNoDefault.csproj", "{7BB9106C-CE57-43E2-8CE4-7CDAC151EBA3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironmentNoDefault.Test", "SeedMultiUrlEnvironmentNoDefault.Test\SeedMultiUrlEnvironmentNoDefault.Test.csproj", "{4A86084D-0C4D-4893-A438-21FF98C19A06}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7BB9106C-CE57-43E2-8CE4-7CDAC151EBA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BB9106C-CE57-43E2-8CE4-7CDAC151EBA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BB9106C-CE57-43E2-8CE4-7CDAC151EBA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BB9106C-CE57-43E2-8CE4-7CDAC151EBA3}.Release|Any CPU.Build.0 = Release|Any CPU + {4A86084D-0C4D-4893-A438-21FF98C19A06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A86084D-0C4D-4893-A438-21FF98C19A06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A86084D-0C4D-4893-A438-21FF98C19A06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A86084D-0C4D-4893-A438-21FF98C19A06}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj index 51eaaff5ec5..5d252eaba4d 100644 --- a/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj +++ b/seed/csharp-sdk/multi-url-environment-no-default/src/SeedMultiUrlEnvironmentNoDefault/SeedMultiUrlEnvironmentNoDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-url-environment-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/multi-url-environment/.github/workflows/ci.yml b/seed/csharp-sdk/multi-url-environment/.github/workflows/ci.yml deleted file mode 100644 index a7ac9d4ae02..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedMultiUrlEnvironment/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/multi-url-environment/.gitignore b/seed/csharp-sdk/multi-url-environment/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/multi-url-environment/.mock/definition/api.yml b/seed/csharp-sdk/multi-url-environment/.mock/definition/api.yml deleted file mode 100644 index f362d991927..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.mock/definition/api.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: multi-url-environment -auth: bearer -environments: - Production: - urls: - ec2: https://ec2.aws.com - s3: https://s3.aws.com - Staging: - urls: - ec2: https://staging.ec2.aws.com - s3: https://staging.s3.aws.com -default-environment: Production -error-discrimination: - strategy: status-code diff --git a/seed/csharp-sdk/multi-url-environment/.mock/definition/ec2.yml b/seed/csharp-sdk/multi-url-environment/.mock/definition/ec2.yml deleted file mode 100644 index a3acc4216ff..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.mock/definition/ec2.yml +++ /dev/null @@ -1,16 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -service: - auth: true - url: ec2 - base-path: /ec2 - endpoints: - bootInstance: - auth: true - path: /boot - method: POST - request: - name: BootInstanceRequest - body: - properties: - size: string diff --git a/seed/csharp-sdk/multi-url-environment/.mock/definition/s3.yml b/seed/csharp-sdk/multi-url-environment/.mock/definition/s3.yml deleted file mode 100644 index ca741b783f5..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.mock/definition/s3.yml +++ /dev/null @@ -1,17 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json - -service: - auth: true - url: s3 - base-path: /s3 - endpoints: - getPresignedUrl: - auth: true - path: /presigned-url - method: POST - request: - name: GetPresignedUrlRequest - body: - properties: - s3Key: string - response: string diff --git a/seed/csharp-sdk/multi-url-environment/.mock/fern.config.json b/seed/csharp-sdk/multi-url-environment/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/multi-url-environment/.mock/generators.yml b/seed/csharp-sdk/multi-url-environment/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/multi-url-environment/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs index 97b730a1d15..776e5e0e276 100644 --- a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj index 5e0f767ca4e..7ae35da5d41 100644 --- a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj +++ b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs index a0cf984508c..755b03129f2 100644 --- a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.sln b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.sln new file mode 100644 index 00000000000..28503a90850 --- /dev/null +++ b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironment", "SeedMultiUrlEnvironment\SeedMultiUrlEnvironment.csproj", "{0633BFE2-1AEC-4896-AF73-25A52313636A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedMultiUrlEnvironment.Test", "SeedMultiUrlEnvironment.Test\SeedMultiUrlEnvironment.Test.csproj", "{591DFDE5-C090-4DD1-A0AC-1702DAAC2F4D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0633BFE2-1AEC-4896-AF73-25A52313636A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0633BFE2-1AEC-4896-AF73-25A52313636A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0633BFE2-1AEC-4896-AF73-25A52313636A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0633BFE2-1AEC-4896-AF73-25A52313636A}.Release|Any CPU.Build.0 = Release|Any CPU + {591DFDE5-C090-4DD1-A0AC-1702DAAC2F4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {591DFDE5-C090-4DD1-A0AC-1702DAAC2F4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {591DFDE5-C090-4DD1-A0AC-1702DAAC2F4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {591DFDE5-C090-4DD1-A0AC-1702DAAC2F4D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj index 5a82626c6f2..ad2c91ed33b 100644 --- a/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj +++ b/seed/csharp-sdk/multi-url-environment/no-pascal-case-environments/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/multi-url-environment/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj deleted file mode 100644 index f6e030fc4c1..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/SeedMultiUrlEnvironment.Test.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> main - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/TestClient.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/TestClient.cs deleted file mode 100644 index 39eb470be21..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Utils/JsonDiffChecker.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Utils/JsonDiffChecker.cs deleted file mode 100644 index 0e02e8a79e2..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Utils/JsonDiffChecker.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Newtonsoft.Json.Linq; -using NUnit.Framework; - -namespace SeedMultiUrlEnvironment.Test.Utils; - -public static class JsonDiffChecker -{ - public static void AssertJsonEquals(string jsonString1, string jsonString2) - { - var token1 = JToken.Parse(jsonString1); - var token2 = JToken.Parse(jsonString2); - var differences = GetJsonDifferences(token1, token2); - - Assert.That( - differences, - Is.Empty, - $"The JSON strings are not equal: {string.Join(", ", differences)}" - ); - } - - private static List GetJsonDifferences(JToken token1, JToken token2, string path = "") - { - var differences = new List(); - - if (token1.Type != token2.Type) - { - differences.Add($"{path} has different types: {token1.Type} vs {token2.Type}"); - return differences; - } - - if (token1 is JObject obj1 && token2 is JObject obj2) - { - foreach (var property in obj1.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj2.TryGetValue(property.Name, out JToken token2Value)) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(property.Value, token2Value, newPath)); - } - } - - foreach (var property in obj2.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj1.TryGetValue(property.Name, out _)) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - } - } - else if (token1 is JArray array1 && token2 is JArray array2) - { - for (var i = 0; i < Math.Max(array1.Count, array2.Count); i++) - { - var newPath = $"{path}[{i}]"; - if (i >= array1.Count) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - else if (i >= array2.Count) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(array1[i], array2[i], newPath)); - } - } - } - else if (!JToken.DeepEquals(token1, token2)) - { - differences.Add($"{path} has different values: {token1} vs {token2}"); - } - - return differences; - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BaseWireTest.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BaseWireTest.cs deleted file mode 100644 index 4929ac93fef..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BaseWireTest.cs +++ /dev/null @@ -1,39 +0,0 @@ -using NUnit.Framework; -using SeedMultiUrlEnvironment; -using SeedMultiUrlEnvironment.Core; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Test.Wire; - -[SetUpFixture] -public class BaseWireTest -{ - protected static WireMockServer Server { get; set; } = null!; - - protected static SeedMultiUrlEnvironmentClient Client { get; set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger() } - ); - - // Initialize the Client - Client = new SeedMultiUrlEnvironmentClient( - "TOKEN", - new ClientOptions { BaseUrl = Server.Urls[0] } - ); - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BootInstanceTest.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BootInstanceTest.cs deleted file mode 100644 index c455296cf37..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/BootInstanceTest.cs +++ /dev/null @@ -1,39 +0,0 @@ -using NUnit.Framework; -using SeedMultiUrlEnvironment; -using SeedMultiUrlEnvironment.Test.Wire; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Test; - -[TestFixture] -public class BootInstanceTest : BaseWireTest -{ - [Test] - public void WireTest() - { - const string requestJson = """ - { - "size": "string" - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/ec2/boot") - .UsingPost() - .WithBody(requestJson) - ) - .RespondWith(WireMock.ResponseBuilders.Response.Create().WithStatusCode(200)); - - Assert.DoesNotThrow( - () => - Client - .Ec2.BootInstanceAsync(new BootInstanceRequest { Size = "string" }) - .GetAwaiter() - .GetResult() - ); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/GetPresignedUrlTest.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/GetPresignedUrlTest.cs deleted file mode 100644 index fe20b5c2da5..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment.Test/Wire/GetPresignedUrlTest.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using SeedMultiUrlEnvironment; -using SeedMultiUrlEnvironment.Core; -using SeedMultiUrlEnvironment.Test.Utils; -using SeedMultiUrlEnvironment.Test.Wire; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Test; - -[TestFixture] -public class GetPresignedUrlTest : BaseWireTest -{ - [Test] - public void WireTest() - { - const string requestJson = """ - { - "s3Key": "string" - } - """; - - const string mockResponse = """ - "string" - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/s3/presigned-url") - .UsingPost() - .WithBody(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = Client - .S3.GetPresignedUrlAsync(new GetPresignedUrlRequest { S3Key = "string" }) - .Result; - JsonDiffChecker.AssertJsonEquals(mockResponse, JsonUtils.Serialize(response)); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/ClientOptions.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/ClientOptions.cs deleted file mode 100644 index bd6ff530866..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/ClientOptions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Core; - -public partial class ClientOptions -{ - /// - /// The Environment for the API. - /// - public SeedMultiUrlEnvironmentEnvironment Environment { get; init; } = - SeedMultiUrlEnvironmentEnvironment.PRODUCTION; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/CollectionItemSerializer.cs deleted file mode 100644 index d93c631e545..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedMultiUrlEnvironment.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/Constants.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/Constants.cs deleted file mode 100644 index 6278480d582..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedMultiUrlEnvironment.Core; - -public static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/DateTimeSerializer.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/DateTimeSerializer.cs deleted file mode 100644 index 7732653f811..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedMultiUrlEnvironment.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/HttpMethodExtensions.cs deleted file mode 100644 index 1edc24dc1f5..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedMultiUrlEnvironment.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/JsonConfiguration.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/JsonConfiguration.cs deleted file mode 100644 index d161a4a0f54..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedMultiUrlEnvironment.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/OneOfSerializer.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/OneOfSerializer.cs deleted file mode 100644 index 3a16adeecac..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedMultiUrlEnvironment.Core; - -internal class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RawClient.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RawClient.cs deleted file mode 100644 index 0aafdda56f6..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RawClient.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System.Net.Http; -using System.Text; - -namespace SeedMultiUrlEnvironment.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - public async Task MakeRequestAsync(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var response = await httpClient.SendAsync(httpRequest); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public RequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RequestOptions.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RequestOptions.cs deleted file mode 100644 index 6032a9de108..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/RequestOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Core; - -public partial class RequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentApiException.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentApiException.cs deleted file mode 100644 index b9d0d039922..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentApiException.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace SeedMultiUrlEnvironment.Core; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedMultiUrlEnvironmentApiException(string message, int statusCode, object body) - : SeedMultiUrlEnvironmentException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// -<<<<<<< HEAD - public object Body => body; - - public override string ToString() - { - return $"SeedMultiUrlEnvironmentApiException {{ message: {Message}, statusCode: {StatusCode}, body: {Body} }}"; - } -======= - public object Body { get; } = body; ->>>>>>> main -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentEnvironment.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentEnvironment.cs deleted file mode 100644 index aaa41c5103b..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentEnvironment.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SeedMultiUrlEnvironment.Core; - -public class SeedMultiUrlEnvironmentEnvironment -{ - public static SeedMultiUrlEnvironmentEnvironment PRODUCTION = - new SeedMultiUrlEnvironmentEnvironment - { - Ec2 = "https://ec2.aws.com", - S3 = "https://s3.aws.com" - }; - - public static SeedMultiUrlEnvironmentEnvironment STAGING = - new SeedMultiUrlEnvironmentEnvironment - { - Ec2 = "https://staging.ec2.aws.com", - S3 = "https://staging.s3.aws.com" - }; - - /// - /// URL for the ec2 service - /// - public string Ec2 { get; init; } - - /// - /// URL for the s3 service - /// - public string S3 { get; init; } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentException.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentException.cs deleted file mode 100644 index 102389e885d..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/SeedMultiUrlEnvironmentException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedMultiUrlEnvironment.Core; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedMultiUrlEnvironmentException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/StringEnumSerializer.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/StringEnumSerializer.cs deleted file mode 100644 index 24777969dd0..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedMultiUrlEnvironment.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Ec2Client.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Ec2Client.cs deleted file mode 100644 index 38f6131d195..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Ec2Client.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Net.Http; -using System.Threading.Tasks; -using SeedMultiUrlEnvironment.Core; - -#nullable enable - -namespace SeedMultiUrlEnvironment; - -public partial class Ec2Client -{ - private RawClient _client; - - internal Ec2Client(RawClient client) - { - _client = client; - } - - public async Task BootInstanceAsync(BootInstanceRequest request, RequestOptions? options = null) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.Environment.Ec2, - Method = HttpMethod.Post, - Path = "/ec2/boot", - Body = request, - Options = options - } - ); - if (response.StatusCode is >= 200 and < 400) - { - return; - } - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - throw new SeedMultiUrlEnvironmentApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - JsonUtils.Deserialize(responseBody) - ); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Requests/BootInstanceRequest.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Requests/BootInstanceRequest.cs deleted file mode 100644 index aaf95483f71..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/Ec2/Requests/BootInstanceRequest.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedMultiUrlEnvironment; - -public record BootInstanceRequest -{ - [JsonPropertyName("size")] - public required string Size { get; set; } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/Requests/GetPresignedUrlRequest.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/Requests/GetPresignedUrlRequest.cs deleted file mode 100644 index 5eb5c200793..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/Requests/GetPresignedUrlRequest.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Text.Json.Serialization; - -#nullable enable - -namespace SeedMultiUrlEnvironment; - -public record GetPresignedUrlRequest -{ - [JsonPropertyName("s3Key")] - public required string S3Key { get; set; } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/S3Client.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/S3Client.cs deleted file mode 100644 index 30df0beb7d7..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/S3/S3Client.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Net.Http; -using System.Text.Json; -using SeedMultiUrlEnvironment.Core; - -#nullable enable - -namespace SeedMultiUrlEnvironment; - -public partial class S3Client -{ - private RawClient _client; - - internal S3Client(RawClient client) - { - _client = client; - } - - public async Task GetPresignedUrlAsync( - GetPresignedUrlRequest request, - RequestOptions? options = null - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.Environment.S3, - Method = HttpMethod.Post, - Path = "/s3/presigned-url", - Body = request, - Options = options - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedMultiUrlEnvironmentException("Failed to deserialize response", e); - } - } - - throw new SeedMultiUrlEnvironmentApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - JsonUtils.Deserialize(responseBody) - ); - } -} diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj deleted file mode 100644 index 87364a98d87..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironment.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/multi-url-environment/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - diff --git a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironmentClient.cs b/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironmentClient.cs deleted file mode 100644 index 555ecf4d025..00000000000 --- a/seed/csharp-sdk/multi-url-environment/src/SeedMultiUrlEnvironment/SeedMultiUrlEnvironmentClient.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using SeedMultiUrlEnvironment.Core; - -#nullable enable - -namespace SeedMultiUrlEnvironment; - -public partial class SeedMultiUrlEnvironmentClient -{ - private RawClient _client; - - public SeedMultiUrlEnvironmentClient(string? token = null, ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() - { - { "Authorization", $"Bearer {token}" }, - { "X-Fern-Language", "C#" }, - }, - new Dictionary>() { }, - clientOptions ?? new ClientOptions() - ); - Ec2 = new Ec2Client(_client); - S3 = new S3Client(_client); - } - - public Ec2Client Ec2 { get; init; } - - public S3Client S3 { get; init; } -} diff --git a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs index 910ac3d09d2..5639b53bf2e 100644 --- a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj index f062ca0f8c3..9c5b00fd83a 100644 --- a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj +++ b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/SeedNoEnvironment.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs index 316dc860495..5bc6a6ef893 100644 --- a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.sln b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.sln new file mode 100644 index 00000000000..2002e17f737 --- /dev/null +++ b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNoEnvironment", "SeedNoEnvironment\SeedNoEnvironment.csproj", "{90DF37E5-BE57-4169-BE1B-3773CA399B8D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNoEnvironment.Test", "SeedNoEnvironment.Test\SeedNoEnvironment.Test.csproj", "{59A327AB-4F73-495B-8807-D89BD4CB79C2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {90DF37E5-BE57-4169-BE1B-3773CA399B8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90DF37E5-BE57-4169-BE1B-3773CA399B8D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90DF37E5-BE57-4169-BE1B-3773CA399B8D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90DF37E5-BE57-4169-BE1B-3773CA399B8D}.Release|Any CPU.Build.0 = Release|Any CPU + {59A327AB-4F73-495B-8807-D89BD4CB79C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59A327AB-4F73-495B-8807-D89BD4CB79C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59A327AB-4F73-495B-8807-D89BD4CB79C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59A327AB-4F73-495B-8807-D89BD4CB79C2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj index c0f7234b23d..219f885a821 100644 --- a/seed/csharp-sdk/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj +++ b/seed/csharp-sdk/no-environment/src/SeedNoEnvironment/SeedNoEnvironment.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/no-environment/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs index c1d70b38a18..6b0e97c3b29 100644 --- a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj index 303d4fa579f..0b8603958fd 100644 --- a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/SeedOauthClientCredentialsDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Unit/MockServer/BaseMockServerTest.cs index 14e5f0a0f38..0210fce1e60 100644 --- a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln new file mode 100644 index 00000000000..8580e5bb462 --- /dev/null +++ b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsDefault", "SeedOauthClientCredentialsDefault\SeedOauthClientCredentialsDefault.csproj", "{E7733813-1337-4B7D-AD69-E4F8A4A11ED1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsDefault.Test", "SeedOauthClientCredentialsDefault.Test\SeedOauthClientCredentialsDefault.Test.csproj", "{FE29965B-0894-4D26-BE52-AE68B0C6BB82}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E7733813-1337-4B7D-AD69-E4F8A4A11ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7733813-1337-4B7D-AD69-E4F8A4A11ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7733813-1337-4B7D-AD69-E4F8A4A11ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7733813-1337-4B7D-AD69-E4F8A4A11ED1}.Release|Any CPU.Build.0 = Release|Any CPU + {FE29965B-0894-4D26-BE52-AE68B0C6BB82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE29965B-0894-4D26-BE52-AE68B0C6BB82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE29965B-0894-4D26-BE52-AE68B0C6BB82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE29965B-0894-4D26-BE52-AE68B0C6BB82}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj index 5aedc8325d3..29092628378 100644 --- a/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-default/src/SeedOauthClientCredentialsDefault/SeedOauthClientCredentialsDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs index 10745c93e49..fadd40343c1 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj index 337ff7f37fe..8b98b4fafd6 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/SeedOauthClientCredentialsEnvironmentVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs index 63d4d363341..1dcea4142f6 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.Test/Unit/MockServer/BaseMockServerTest.cs @@ -39,5 +39,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln new file mode 100644 index 00000000000..575e9ae7a02 --- /dev/null +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsEnvironmentVariables", "SeedOauthClientCredentialsEnvironmentVariables\SeedOauthClientCredentialsEnvironmentVariables.csproj", "{1934F98D-B866-413E-A5B9-8CC082CA671C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentialsEnvironmentVariables.Test", "SeedOauthClientCredentialsEnvironmentVariables.Test\SeedOauthClientCredentialsEnvironmentVariables.Test.csproj", "{42C51783-53D3-4E0B-8A20-4BCA1331C5A4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1934F98D-B866-413E-A5B9-8CC082CA671C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1934F98D-B866-413E-A5B9-8CC082CA671C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1934F98D-B866-413E-A5B9-8CC082CA671C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1934F98D-B866-413E-A5B9-8CC082CA671C}.Release|Any CPU.Build.0 = Release|Any CPU + {42C51783-53D3-4E0B-8A20-4BCA1331C5A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42C51783-53D3-4E0B-8A20-4BCA1331C5A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42C51783-53D3-4E0B-8A20-4BCA1331C5A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42C51783-53D3-4E0B-8A20-4BCA1331C5A4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj index 4591edfdd17..99933463ed0 100644 --- a/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-environment-variables/src/SeedOauthClientCredentialsEnvironmentVariables/SeedOauthClientCredentialsEnvironmentVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-environment-variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs index c00bdefe55d..6f72130b8d7 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj index d1a720a2e07..fd48c7fec2f 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs index 37fb4d7a1d1..9e6f8a27c75 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln new file mode 100644 index 00000000000..ba809b53c49 --- /dev/null +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials", "SeedOauthClientCredentials\SeedOauthClientCredentials.csproj", "{ADB4AED7-0C2F-4181-96F7-0EF46EA02A3A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials.Test", "SeedOauthClientCredentials.Test\SeedOauthClientCredentials.Test.csproj", "{71B81F67-7B10-4D6A-B0D9-0CC84CF78FBF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADB4AED7-0C2F-4181-96F7-0EF46EA02A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADB4AED7-0C2F-4181-96F7-0EF46EA02A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADB4AED7-0C2F-4181-96F7-0EF46EA02A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADB4AED7-0C2F-4181-96F7-0EF46EA02A3A}.Release|Any CPU.Build.0 = Release|Any CPU + {71B81F67-7B10-4D6A-B0D9-0CC84CF78FBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71B81F67-7B10-4D6A-B0D9-0CC84CF78FBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71B81F67-7B10-4D6A-B0D9-0CC84CF78FBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71B81F67-7B10-4D6A-B0D9-0CC84CF78FBF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj index c554e2d176e..f563a99a064 100644 --- a/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj +++ b/seed/csharp-sdk/oauth-client-credentials-nested-root/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials-nested-root/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs index c00bdefe55d..6f72130b8d7 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj index d1a720a2e07..fd48c7fec2f 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/SeedOauthClientCredentials.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs index 37fb4d7a1d1..9e6f8a27c75 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.sln b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.sln new file mode 100644 index 00000000000..cd4e2153271 --- /dev/null +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials", "SeedOauthClientCredentials\SeedOauthClientCredentials.csproj", "{340159D1-A1B6-4A2C-84B9-9A0762466D89}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedOauthClientCredentials.Test", "SeedOauthClientCredentials.Test\SeedOauthClientCredentials.Test.csproj", "{62932702-6B2E-44C2-808F-53577C5A8DC1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {340159D1-A1B6-4A2C-84B9-9A0762466D89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {340159D1-A1B6-4A2C-84B9-9A0762466D89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {340159D1-A1B6-4A2C-84B9-9A0762466D89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {340159D1-A1B6-4A2C-84B9-9A0762466D89}.Release|Any CPU.Build.0 = Release|Any CPU + {62932702-6B2E-44C2-808F-53577C5A8DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62932702-6B2E-44C2-808F-53577C5A8DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62932702-6B2E-44C2-808F-53577C5A8DC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62932702-6B2E-44C2-808F-53577C5A8DC1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj index b53e47a4b60..e76fccfd20c 100644 --- a/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj +++ b/seed/csharp-sdk/oauth-client-credentials/src/SeedOauthClientCredentials/SeedOauthClientCredentials.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/oauth-client-credentials/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/object/src/SeedObject.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/object/src/SeedObject.Test/Core/EnumSerializerTests.cs index c1c31795ba1..8abc0743d8c 100644 --- a/seed/csharp-sdk/object/src/SeedObject.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/object/src/SeedObject.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/object/src/SeedObject.Test/SeedObject.Test.csproj b/seed/csharp-sdk/object/src/SeedObject.Test/SeedObject.Test.csproj index e3e7176141c..be19774f42e 100644 --- a/seed/csharp-sdk/object/src/SeedObject.Test/SeedObject.Test.csproj +++ b/seed/csharp-sdk/object/src/SeedObject.Test/SeedObject.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/object/src/SeedObject.sln b/seed/csharp-sdk/object/src/SeedObject.sln new file mode 100644 index 00000000000..7956dd4720f --- /dev/null +++ b/seed/csharp-sdk/object/src/SeedObject.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject", "SeedObject\SeedObject.csproj", "{9670A077-7FA0-4F04-8C32-C31BFD702F5E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject.Test", "SeedObject.Test\SeedObject.Test.csproj", "{E8ACC590-064C-4FDB-AA99-5A54DA9DEF05}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9670A077-7FA0-4F04-8C32-C31BFD702F5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9670A077-7FA0-4F04-8C32-C31BFD702F5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9670A077-7FA0-4F04-8C32-C31BFD702F5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9670A077-7FA0-4F04-8C32-C31BFD702F5E}.Release|Any CPU.Build.0 = Release|Any CPU + {E8ACC590-064C-4FDB-AA99-5A54DA9DEF05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8ACC590-064C-4FDB-AA99-5A54DA9DEF05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8ACC590-064C-4FDB-AA99-5A54DA9DEF05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8ACC590-064C-4FDB-AA99-5A54DA9DEF05}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/object/src/SeedObject/SeedObject.csproj b/seed/csharp-sdk/object/src/SeedObject/SeedObject.csproj index 8b4e5f67380..7acf4369921 100644 --- a/seed/csharp-sdk/object/src/SeedObject/SeedObject.csproj +++ b/seed/csharp-sdk/object/src/SeedObject/SeedObject.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/object/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs index d3067ec2908..9f7eee6cff1 100644 --- a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj index 451fdd3df70..db71b5887ed 100644 --- a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj +++ b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.sln b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.sln new file mode 100644 index 00000000000..977ed99082e --- /dev/null +++ b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports", "SeedObjectsWithImports\SeedObjectsWithImports.csproj", "{1E91E151-023C-4D35-A7BE-29651955C8E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports.Test", "SeedObjectsWithImports.Test\SeedObjectsWithImports.Test.csproj", "{7D0827B7-BD3B-4976-B71C-190B434EEC4E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1E91E151-023C-4D35-A7BE-29651955C8E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E91E151-023C-4D35-A7BE-29651955C8E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E91E151-023C-4D35-A7BE-29651955C8E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E91E151-023C-4D35-A7BE-29651955C8E5}.Release|Any CPU.Build.0 = Release|Any CPU + {7D0827B7-BD3B-4976-B71C-190B434EEC4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D0827B7-BD3B-4976-B71C-190B434EEC4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D0827B7-BD3B-4976-B71C-190B434EEC4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D0827B7-BD3B-4976-B71C-190B434EEC4E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj index 02e37113366..2bf274f3cda 100644 --- a/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj +++ b/seed/csharp-sdk/objects-with-imports/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/objects-with-imports/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/optional/.github/workflows/ci.yml b/seed/csharp-sdk/optional/.github/workflows/ci.yml deleted file mode 100644 index 9ea29786a3d..00000000000 --- a/seed/csharp-sdk/optional/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedObjectsWithImports/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/optional/.gitignore b/seed/csharp-sdk/optional/.gitignore deleted file mode 100644 index 5e57f18055d..00000000000 --- a/seed/csharp-sdk/optional/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from `dotnet new gitignore` - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/optional/.mock/definition/api.yml b/seed/csharp-sdk/optional/.mock/definition/api.yml deleted file mode 100644 index de1eb78549d..00000000000 --- a/seed/csharp-sdk/optional/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: objects-with-imports diff --git a/seed/csharp-sdk/optional/.mock/definition/optional.yml b/seed/csharp-sdk/optional/.mock/definition/optional.yml deleted file mode 100644 index 111f55357bb..00000000000 --- a/seed/csharp-sdk/optional/.mock/definition/optional.yml +++ /dev/null @@ -1,11 +0,0 @@ -service: - auth: false - base-path: "" - endpoints: - sendOptionalBody: - method: POST - path: /send-optional-body - request: optional> - response: - type: string - docs: Id of the created resource diff --git a/seed/csharp-sdk/optional/.mock/fern.config.json b/seed/csharp-sdk/optional/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/csharp-sdk/optional/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/csharp-sdk/optional/.mock/generators.yml b/seed/csharp-sdk/optional/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/csharp-sdk/optional/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs index d3067ec2908..9f7eee6cff1 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj index 451fdd3df70..db71b5887ed 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/BaseMockServerTest.cs index 1c2a4f2309a..9e0c8fdec81 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.sln b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.sln new file mode 100644 index 00000000000..70fb4514943 --- /dev/null +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports", "SeedObjectsWithImports\SeedObjectsWithImports.csproj", "{CB52C25F-1B40-4D1C-AAC3-04D3000E0779}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObjectsWithImports.Test", "SeedObjectsWithImports.Test\SeedObjectsWithImports.Test.csproj", "{A50EE91B-5B2A-4B5B-8AF4-43AE633A1FA6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB52C25F-1B40-4D1C-AAC3-04D3000E0779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB52C25F-1B40-4D1C-AAC3-04D3000E0779}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB52C25F-1B40-4D1C-AAC3-04D3000E0779}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB52C25F-1B40-4D1C-AAC3-04D3000E0779}.Release|Any CPU.Build.0 = Release|Any CPU + {A50EE91B-5B2A-4B5B-8AF4-43AE633A1FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A50EE91B-5B2A-4B5B-8AF4-43AE633A1FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A50EE91B-5B2A-4B5B-8AF4-43AE633A1FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A50EE91B-5B2A-4B5B-8AF4-43AE633A1FA6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj index d47a80b4c0f..891f296d8c4 100644 --- a/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj +++ b/seed/csharp-sdk/optional/no-simplify-object-dictionaries/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/optional/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj b/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj deleted file mode 100644 index 8b1589d57b6..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/SeedObjectsWithImports.Test.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> main - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/TestClient.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/TestClient.cs deleted file mode 100644 index eefba6c1723..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedObjectsWithImports.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Utils/JsonDiffChecker.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Utils/JsonDiffChecker.cs deleted file mode 100644 index f1e8f4721af..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Utils/JsonDiffChecker.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Newtonsoft.Json.Linq; -using NUnit.Framework; - -namespace SeedObjectsWithImports.Test.Utils; - -public static class JsonDiffChecker -{ - public static void AssertJsonEquals(string jsonString1, string jsonString2) - { - var token1 = JToken.Parse(jsonString1); - var token2 = JToken.Parse(jsonString2); - var differences = GetJsonDifferences(token1, token2); - - Assert.That( - differences, - Is.Empty, - $"The JSON strings are not equal: {string.Join(", ", differences)}" - ); - } - - private static List GetJsonDifferences(JToken token1, JToken token2, string path = "") - { - var differences = new List(); - - if (token1.Type != token2.Type) - { - differences.Add($"{path} has different types: {token1.Type} vs {token2.Type}"); - return differences; - } - - if (token1 is JObject obj1 && token2 is JObject obj2) - { - foreach (var property in obj1.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj2.TryGetValue(property.Name, out JToken token2Value)) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(property.Value, token2Value, newPath)); - } - } - - foreach (var property in obj2.Properties()) - { - var newPath = string.IsNullOrEmpty(path) - ? property.Name - : $"{path}.{property.Name}"; - if (!obj1.TryGetValue(property.Name, out _)) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - } - } - else if (token1 is JArray array1 && token2 is JArray array2) - { - for (var i = 0; i < Math.Max(array1.Count, array2.Count); i++) - { - var newPath = $"{path}[{i}]"; - if (i >= array1.Count) - { - differences.Add($"{newPath} is missing in the first JSON"); - } - else if (i >= array2.Count) - { - differences.Add($"{newPath} is missing in the second JSON"); - } - else - { - differences.AddRange(GetJsonDifferences(array1[i], array2[i], newPath)); - } - } - } - else if (!JToken.DeepEquals(token1, token2)) - { - differences.Add($"{path} has different values: {token1} vs {token2}"); - } - - return differences; - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/BaseWireTest.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/BaseWireTest.cs deleted file mode 100644 index 6396a846b1e..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/BaseWireTest.cs +++ /dev/null @@ -1,36 +0,0 @@ -using NUnit.Framework; -using SeedObjectsWithImports; -using SeedObjectsWithImports.Core; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -#nullable enable - -namespace SeedObjectsWithImports.Test.Wire; - -[SetUpFixture] -public class BaseWireTest -{ - protected static WireMockServer Server { get; set; } = null!; - - protected static SeedObjectsWithImportsClient Client { get; set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger() } - ); - - // Initialize the Client - Client = new SeedObjectsWithImportsClient(new ClientOptions { BaseUrl = Server.Urls[0] }); - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/SendOptionalBodyTest.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/SendOptionalBodyTest.cs deleted file mode 100644 index 99bacce5ac7..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports.Test/Wire/SendOptionalBodyTest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using NUnit.Framework; -using SeedObjectsWithImports.Core; -using SeedObjectsWithImports.Test.Utils; -using SeedObjectsWithImports.Test.Wire; - -#nullable enable - -namespace SeedObjectsWithImports.Test; - -[TestFixture] -public class SendOptionalBodyTest : BaseWireTest -{ - [Test] - public void WireTest() - { - const string requestJson = """ - { - "string": { - "key": "value" - } - } - """; - - const string mockResponse = """ - "string" - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/send-optional-body") - .UsingPost() - .WithBody(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = Client - .Optional.SendOptionalBodyAsync( - new Dictionary() - { - { - "string", - new Dictionary() { { "key", "value" }, } - }, - } - ) - .Result; - JsonDiffChecker.AssertJsonEquals(mockResponse, JsonUtils.Serialize(response)); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/CollectionItemSerializer.cs deleted file mode 100644 index 7bc533b3d27..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObjectsWithImports.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Constants.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Constants.cs deleted file mode 100644 index e54c23d8ed2..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedObjectsWithImports.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/DateTimeSerializer.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/DateTimeSerializer.cs deleted file mode 100644 index 7a7f7f11be2..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObjectsWithImports.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/HttpMethodExtensions.cs deleted file mode 100644 index 546aa94b1ce..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedObjectsWithImports.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/JsonConfiguration.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/JsonConfiguration.cs deleted file mode 100644 index 45ce3b62a38..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/JsonConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObjectsWithImports.Core; - -internal static class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - JsonSerializerOptions = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull - }; - } -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/OneOfSerializer.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/OneOfSerializer.cs deleted file mode 100644 index fd52255d85a..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/OneOfSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedObjectsWithImports.Core; - -internal class OneOfSerializer : JsonConverter - where TOneOf : IOneOf -{ - public override TOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in s_types) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() - { - var casts = typeof(TOneOf) - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeof(TOneOf); - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/ClientOptions.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/ClientOptions.cs deleted file mode 100644 index 7e71faa7bfd..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedObjectsWithImports; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/RequestOptions.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/RequestOptions.cs deleted file mode 100644 index fc9db4a4a38..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedObjectsWithImports; - -public partial class RequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsApiException.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsApiException.cs deleted file mode 100644 index 15a4c15d328..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedObjectsWithImports; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedObjectsWithImportsApiException(string message, int statusCode, object body) - : SeedObjectsWithImportsException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode { get; } = statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body { get; } = body; -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsException.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsException.cs deleted file mode 100644 index 5b28f4e2aa2..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/Public/SeedObjectsWithImportsException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedObjectsWithImports; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedObjectsWithImportsException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/RawClient.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/RawClient.cs deleted file mode 100644 index 72ef7721bb6..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/RawClient.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System.Net.Http; -using System.Text; - -namespace SeedObjectsWithImports.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient( - Dictionary headers, - Dictionary> headerSuppliers, - ClientOptions clientOptions -) -{ - /// - /// The http client used to make requests. - /// - public readonly ClientOptions Options = clientOptions; - - /// - /// Global headers to be sent with every request. - /// - private readonly Dictionary _headers = headers; - - public async Task MakeRequestAsync(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - // Add global headers to the request - foreach (var header in _headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add global headers to the request from supplier - foreach (var header in headerSuppliers) - { - httpRequest.Headers.Add(header.Key, header.Value.Invoke()); - } - // Add request headers to the request - foreach (var header in request.Headers) - { - httpRequest.Headers.Add(header.Key, header.Value); - } - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var response = await httpClient.SendAsync(httpRequest); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Dictionary Headers { get; init; } = new(); - - public RequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url.Substring(0, url.Length - 1); - return url; - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/StringEnumSerializer.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/StringEnumSerializer.cs deleted file mode 100644 index c07f1255430..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Core/StringEnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObjectsWithImports.Core; - -internal class StringEnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public StringEnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Optional/OptionalClient.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Optional/OptionalClient.cs deleted file mode 100644 index 3367a019f73..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/Optional/OptionalClient.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Net.Http; -using System.Text.Json; -using SeedObjectsWithImports.Core; - -#nullable enable - -namespace SeedObjectsWithImports; - -public partial class OptionalClient -{ - private RawClient _client; - - internal OptionalClient(RawClient client) - { - _client = client; - } - - public async Task SendOptionalBodyAsync(object? request, RequestOptions? options = null) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "send-optional-body", - Body = request, - Options = options - } - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedObjectsWithImportsException("Failed to deserialize response", e); - } - } - - throw new SeedObjectsWithImportsApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - JsonUtils.Deserialize(responseBody) - ); - } -} diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj deleted file mode 100644 index 86f229ccb9b..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImports.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - false - 12 - enable - 0.0.1 - README.md - https://github.com/optional/fern - - - - true - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - diff --git a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImportsClient.cs b/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImportsClient.cs deleted file mode 100644 index b6750ccc2b0..00000000000 --- a/seed/csharp-sdk/optional/src/SeedObjectsWithImports/SeedObjectsWithImportsClient.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using SeedObjectsWithImports.Core; - -#nullable enable - -namespace SeedObjectsWithImports; - -public partial class SeedObjectsWithImportsClient -{ - private RawClient _client; - - public SeedObjectsWithImportsClient(ClientOptions? clientOptions = null) - { - _client = new RawClient( - new Dictionary() { { "X-Fern-Language", "C#" }, }, - new Dictionary>() { }, - clientOptions ?? new ClientOptions() - ); - Optional = new OptionalClient(_client); - } - - public OptionalClient Optional { get; init; } -} diff --git a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs index 9ba79d17324..46aba9a0a50 100644 --- a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj index f3b0434d07c..81c7d862247 100644 --- a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj +++ b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/SeedPackageYml.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Unit/MockServer/BaseMockServerTest.cs index 1ff6a4c5f73..2d8cba5eeb2 100644 --- a/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/package-yml/src/SeedPackageYml.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/package-yml/src/SeedPackageYml.sln b/seed/csharp-sdk/package-yml/src/SeedPackageYml.sln new file mode 100644 index 00000000000..2f3dceb6359 --- /dev/null +++ b/seed/csharp-sdk/package-yml/src/SeedPackageYml.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPackageYml", "SeedPackageYml\SeedPackageYml.csproj", "{839C6E18-F23E-47F2-8BB5-637ACBDDDC7A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPackageYml.Test", "SeedPackageYml.Test\SeedPackageYml.Test.csproj", "{56897B81-A2F2-41FD-9474-129AF4D372DC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {839C6E18-F23E-47F2-8BB5-637ACBDDDC7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {839C6E18-F23E-47F2-8BB5-637ACBDDDC7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {839C6E18-F23E-47F2-8BB5-637ACBDDDC7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {839C6E18-F23E-47F2-8BB5-637ACBDDDC7A}.Release|Any CPU.Build.0 = Release|Any CPU + {56897B81-A2F2-41FD-9474-129AF4D372DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56897B81-A2F2-41FD-9474-129AF4D372DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56897B81-A2F2-41FD-9474-129AF4D372DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56897B81-A2F2-41FD-9474-129AF4D372DC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/package-yml/src/SeedPackageYml/SeedPackageYml.csproj b/seed/csharp-sdk/package-yml/src/SeedPackageYml/SeedPackageYml.csproj index 973121988bd..03aa56ded86 100644 --- a/seed/csharp-sdk/package-yml/src/SeedPackageYml/SeedPackageYml.csproj +++ b/seed/csharp-sdk/package-yml/src/SeedPackageYml/SeedPackageYml.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/package-yml/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs index 127558e58f1..fc7094754e6 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj b/seed/csharp-sdk/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj index 97679294a55..aac18528c02 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/SeedPagination.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/BaseMockServerTest.cs index 22b9881b964..a0355d77146 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/pagination/src/SeedPagination.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/pagination/src/SeedPagination.sln b/seed/csharp-sdk/pagination/src/SeedPagination.sln new file mode 100644 index 00000000000..42af0ceff91 --- /dev/null +++ b/seed/csharp-sdk/pagination/src/SeedPagination.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPagination", "SeedPagination\SeedPagination.csproj", "{922616D3-400D-4924-AAA6-3069B4E39310}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPagination.Test", "SeedPagination.Test\SeedPagination.Test.csproj", "{8C3AF3F4-B1D5-4224-A3B2-AB5F38175A0F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {922616D3-400D-4924-AAA6-3069B4E39310}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {922616D3-400D-4924-AAA6-3069B4E39310}.Debug|Any CPU.Build.0 = Debug|Any CPU + {922616D3-400D-4924-AAA6-3069B4E39310}.Release|Any CPU.ActiveCfg = Release|Any CPU + {922616D3-400D-4924-AAA6-3069B4E39310}.Release|Any CPU.Build.0 = Release|Any CPU + {8C3AF3F4-B1D5-4224-A3B2-AB5F38175A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C3AF3F4-B1D5-4224-A3B2-AB5F38175A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C3AF3F4-B1D5-4224-A3B2-AB5F38175A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C3AF3F4-B1D5-4224-A3B2-AB5F38175A0F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/pagination/src/SeedPagination/SeedPagination.csproj b/seed/csharp-sdk/pagination/src/SeedPagination/SeedPagination.csproj index ad764365cd6..5bc342bb1d1 100644 --- a/seed/csharp-sdk/pagination/src/SeedPagination/SeedPagination.csproj +++ b/seed/csharp-sdk/pagination/src/SeedPagination/SeedPagination.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/pagination/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs index 548110aa63e..afe1d6dfb4f 100644 --- a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj index 26100094aee..5f3889c6202 100644 --- a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj +++ b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/SeedPathParameters.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Unit/MockServer/BaseMockServerTest.cs index 097c5cf7e28..b801c2b1c76 100644 --- a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/path-parameters/src/SeedPathParameters.sln b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.sln new file mode 100644 index 00000000000..d42c0580ad1 --- /dev/null +++ b/seed/csharp-sdk/path-parameters/src/SeedPathParameters.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPathParameters", "SeedPathParameters\SeedPathParameters.csproj", "{01A83CDB-CA61-44F2-AAA4-FFB96F398628}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPathParameters.Test", "SeedPathParameters.Test\SeedPathParameters.Test.csproj", "{E98F6C92-4210-4B4E-91E3-FA9A713D7525}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {01A83CDB-CA61-44F2-AAA4-FFB96F398628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01A83CDB-CA61-44F2-AAA4-FFB96F398628}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01A83CDB-CA61-44F2-AAA4-FFB96F398628}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01A83CDB-CA61-44F2-AAA4-FFB96F398628}.Release|Any CPU.Build.0 = Release|Any CPU + {E98F6C92-4210-4B4E-91E3-FA9A713D7525}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E98F6C92-4210-4B4E-91E3-FA9A713D7525}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E98F6C92-4210-4B4E-91E3-FA9A713D7525}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E98F6C92-4210-4B4E-91E3-FA9A713D7525}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj b/seed/csharp-sdk/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj index ec82eb5bc3f..50da7ef91ee 100644 --- a/seed/csharp-sdk/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj +++ b/seed/csharp-sdk/path-parameters/src/SeedPathParameters/SeedPathParameters.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/path-parameters/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs index 8978fc9675f..cd1c4c71035 100644 --- a/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj b/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj index 0b8d3c5cf48..3b02ac9f932 100644 --- a/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj +++ b/seed/csharp-sdk/plain-text/src/SeedPlainText.Test/SeedPlainText.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/plain-text/src/SeedPlainText.sln b/seed/csharp-sdk/plain-text/src/SeedPlainText.sln new file mode 100644 index 00000000000..b47983b6d3c --- /dev/null +++ b/seed/csharp-sdk/plain-text/src/SeedPlainText.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPlainText", "SeedPlainText\SeedPlainText.csproj", "{D5B89C4A-F7E1-4E90-8E7E-4B41A4C11684}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedPlainText.Test", "SeedPlainText.Test\SeedPlainText.Test.csproj", "{29DF7550-A33E-4787-823D-CA909B4E9C9B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D5B89C4A-F7E1-4E90-8E7E-4B41A4C11684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5B89C4A-F7E1-4E90-8E7E-4B41A4C11684}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5B89C4A-F7E1-4E90-8E7E-4B41A4C11684}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5B89C4A-F7E1-4E90-8E7E-4B41A4C11684}.Release|Any CPU.Build.0 = Release|Any CPU + {29DF7550-A33E-4787-823D-CA909B4E9C9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29DF7550-A33E-4787-823D-CA909B4E9C9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29DF7550-A33E-4787-823D-CA909B4E9C9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29DF7550-A33E-4787-823D-CA909B4E9C9B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/plain-text/src/SeedPlainText/SeedPlainText.csproj b/seed/csharp-sdk/plain-text/src/SeedPlainText/SeedPlainText.csproj index fe0f17c9ea2..616b4052ecf 100644 --- a/seed/csharp-sdk/plain-text/src/SeedPlainText/SeedPlainText.csproj +++ b/seed/csharp-sdk/plain-text/src/SeedPlainText/SeedPlainText.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/plain-text/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs index 77c1afe5c53..7520bcd04c2 100644 --- a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj index bc0d7861586..3b50df96fec 100644 --- a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj +++ b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.Test/SeedQueryParameters.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.sln b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.sln new file mode 100644 index 00000000000..dfe525d1951 --- /dev/null +++ b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedQueryParameters", "SeedQueryParameters\SeedQueryParameters.csproj", "{7C47F0B0-9198-44FC-82E4-BBCDCCE74516}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedQueryParameters.Test", "SeedQueryParameters.Test\SeedQueryParameters.Test.csproj", "{89CD45FC-93E3-45F6-88A8-8DD5AD67EAD9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7C47F0B0-9198-44FC-82E4-BBCDCCE74516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C47F0B0-9198-44FC-82E4-BBCDCCE74516}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C47F0B0-9198-44FC-82E4-BBCDCCE74516}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C47F0B0-9198-44FC-82E4-BBCDCCE74516}.Release|Any CPU.Build.0 = Release|Any CPU + {89CD45FC-93E3-45F6-88A8-8DD5AD67EAD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89CD45FC-93E3-45F6-88A8-8DD5AD67EAD9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89CD45FC-93E3-45F6-88A8-8DD5AD67EAD9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89CD45FC-93E3-45F6-88A8-8DD5AD67EAD9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj index 858f418ed05..f95c34fa6b8 100644 --- a/seed/csharp-sdk/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj +++ b/seed/csharp-sdk/query-parameters/src/SeedQueryParameters/SeedQueryParameters.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/query-parameters/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs index 6e509f475bc..ea17672d755 100644 --- a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj index c9ba6a18b2d..74f9aaff825 100644 --- a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj +++ b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/SeedNurseryApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Unit/MockServer/BaseMockServerTest.cs index a93d6554ee9..ea4d2345626 100644 --- a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.sln b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.sln new file mode 100644 index 00000000000..69c34328b0b --- /dev/null +++ b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNurseryApi", "SeedNurseryApi\SeedNurseryApi.csproj", "{E2B6E134-A587-469B-9897-AE3AF9EB7FCE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedNurseryApi.Test", "SeedNurseryApi.Test\SeedNurseryApi.Test.csproj", "{AED13D94-0D07-4C1F-B3E1-78D22A8F9351}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E2B6E134-A587-469B-9897-AE3AF9EB7FCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2B6E134-A587-469B-9897-AE3AF9EB7FCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2B6E134-A587-469B-9897-AE3AF9EB7FCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2B6E134-A587-469B-9897-AE3AF9EB7FCE}.Release|Any CPU.Build.0 = Release|Any CPU + {AED13D94-0D07-4C1F-B3E1-78D22A8F9351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AED13D94-0D07-4C1F-B3E1-78D22A8F9351}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AED13D94-0D07-4C1F-B3E1-78D22A8F9351}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AED13D94-0D07-4C1F-B3E1-78D22A8F9351}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj index 3f5aeb0ceed..72613f485d7 100644 --- a/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj +++ b/seed/csharp-sdk/reserved-keywords/src/SeedNurseryApi/SeedNurseryApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/reserved-keywords/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs index fbcad20a7ff..a5ced53c6f0 100644 --- a/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj b/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj index 863e54efc6b..1d97c50a616 100644 --- a/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj +++ b/seed/csharp-sdk/response-property/src/SeedResponseProperty.Test/SeedResponseProperty.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/response-property/src/SeedResponseProperty.sln b/seed/csharp-sdk/response-property/src/SeedResponseProperty.sln new file mode 100644 index 00000000000..96c3dcb36c8 --- /dev/null +++ b/seed/csharp-sdk/response-property/src/SeedResponseProperty.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedResponseProperty", "SeedResponseProperty\SeedResponseProperty.csproj", "{AE007795-95D7-4527-9F78-087630183961}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedResponseProperty.Test", "SeedResponseProperty.Test\SeedResponseProperty.Test.csproj", "{3DA8922E-74AA-4513-A5CC-1EF76E27E936}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE007795-95D7-4527-9F78-087630183961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE007795-95D7-4527-9F78-087630183961}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE007795-95D7-4527-9F78-087630183961}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE007795-95D7-4527-9F78-087630183961}.Release|Any CPU.Build.0 = Release|Any CPU + {3DA8922E-74AA-4513-A5CC-1EF76E27E936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DA8922E-74AA-4513-A5CC-1EF76E27E936}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DA8922E-74AA-4513-A5CC-1EF76E27E936}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DA8922E-74AA-4513-A5CC-1EF76E27E936}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj b/seed/csharp-sdk/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj index 356f10e6e6e..34a267c69db 100644 --- a/seed/csharp-sdk/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj +++ b/seed/csharp-sdk/response-property/src/SeedResponseProperty/SeedResponseProperty.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/response-property/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs index 217f3977126..9473023217f 100644 --- a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj index d380eed7ff3..7f8fa6bf18f 100644 --- a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj +++ b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.sln b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.sln new file mode 100644 index 00000000000..5200f183a82 --- /dev/null +++ b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents", "SeedServerSentEvents\SeedServerSentEvents.csproj", "{2275C2FA-62EF-4B55-9811-C42F2CA3DBCA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents.Test", "SeedServerSentEvents.Test\SeedServerSentEvents.Test.csproj", "{1D3FA895-F971-4EBC-8555-8E14E75423D7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2275C2FA-62EF-4B55-9811-C42F2CA3DBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2275C2FA-62EF-4B55-9811-C42F2CA3DBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2275C2FA-62EF-4B55-9811-C42F2CA3DBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2275C2FA-62EF-4B55-9811-C42F2CA3DBCA}.Release|Any CPU.Build.0 = Release|Any CPU + {1D3FA895-F971-4EBC-8555-8E14E75423D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D3FA895-F971-4EBC-8555-8E14E75423D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D3FA895-F971-4EBC-8555-8E14E75423D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D3FA895-F971-4EBC-8555-8E14E75423D7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj index 07a1af2299f..6030a708eea 100644 --- a/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj +++ b/seed/csharp-sdk/server-sent-event-examples/src/SeedServerSentEvents/SeedServerSentEvents.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/server-sent-event-examples/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs index 217f3977126..9473023217f 100644 --- a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj index d380eed7ff3..7f8fa6bf18f 100644 --- a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj +++ b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.Test/SeedServerSentEvents.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.sln b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.sln new file mode 100644 index 00000000000..4d4901dc1f7 --- /dev/null +++ b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents", "SeedServerSentEvents\SeedServerSentEvents.csproj", "{F02591BA-D01D-4510-81FC-6960684836F6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedServerSentEvents.Test", "SeedServerSentEvents.Test\SeedServerSentEvents.Test.csproj", "{ECAAF675-B445-411A-A303-7A4480C2AE6B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F02591BA-D01D-4510-81FC-6960684836F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F02591BA-D01D-4510-81FC-6960684836F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F02591BA-D01D-4510-81FC-6960684836F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F02591BA-D01D-4510-81FC-6960684836F6}.Release|Any CPU.Build.0 = Release|Any CPU + {ECAAF675-B445-411A-A303-7A4480C2AE6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECAAF675-B445-411A-A303-7A4480C2AE6B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECAAF675-B445-411A-A303-7A4480C2AE6B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECAAF675-B445-411A-A303-7A4480C2AE6B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj index f8d304a7f68..1af94d3b41a 100644 --- a/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj +++ b/seed/csharp-sdk/server-sent-events/src/SeedServerSentEvents/SeedServerSentEvents.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/server-sent-events/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs index 532d182486b..089745538a5 100644 --- a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj index fd7b07f82e5..8e6f53c1970 100644 --- a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj +++ b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/SeedApi.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs index d60f783110a..564aee6a060 100644 --- a/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/simple-fhir/src/SeedApi.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/simple-fhir/src/SeedApi.sln b/seed/csharp-sdk/simple-fhir/src/SeedApi.sln new file mode 100644 index 00000000000..71d74464c9d --- /dev/null +++ b/seed/csharp-sdk/simple-fhir/src/SeedApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi", "SeedApi\SeedApi.csproj", "{D2260BCA-69B6-4D54-8F6E-77839E066F15}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedApi.Test", "SeedApi.Test\SeedApi.Test.csproj", "{5FF6A4B7-DC3E-4495-B943-40FB2206017D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D2260BCA-69B6-4D54-8F6E-77839E066F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2260BCA-69B6-4D54-8F6E-77839E066F15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2260BCA-69B6-4D54-8F6E-77839E066F15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2260BCA-69B6-4D54-8F6E-77839E066F15}.Release|Any CPU.Build.0 = Release|Any CPU + {5FF6A4B7-DC3E-4495-B943-40FB2206017D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FF6A4B7-DC3E-4495-B943-40FB2206017D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FF6A4B7-DC3E-4495-B943-40FB2206017D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FF6A4B7-DC3E-4495-B943-40FB2206017D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/simple-fhir/src/SeedApi/SeedApi.csproj b/seed/csharp-sdk/simple-fhir/src/SeedApi/SeedApi.csproj index 8566da2aab9..2d931645b7b 100644 --- a/seed/csharp-sdk/simple-fhir/src/SeedApi/SeedApi.csproj +++ b/seed/csharp-sdk/simple-fhir/src/SeedApi/SeedApi.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/simple-fhir/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs index f41bdaaea18..07df691d3bb 100644 --- a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj index 2b081280a03..1a2dd4152f7 100644 --- a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj +++ b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/SeedSingleUrlEnvironmentDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Unit/MockServer/BaseMockServerTest.cs index 1cdf615ecfa..3eb56e9543d 100644 --- a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln new file mode 100644 index 00000000000..5ca08ec75e8 --- /dev/null +++ b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentDefault", "SeedSingleUrlEnvironmentDefault\SeedSingleUrlEnvironmentDefault.csproj", "{844B9910-7282-4B85-B0A8-818D8DD7DA35}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentDefault.Test", "SeedSingleUrlEnvironmentDefault.Test\SeedSingleUrlEnvironmentDefault.Test.csproj", "{AA757F5A-8C56-445C-A3A1-E7447C01812C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {844B9910-7282-4B85-B0A8-818D8DD7DA35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {844B9910-7282-4B85-B0A8-818D8DD7DA35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {844B9910-7282-4B85-B0A8-818D8DD7DA35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {844B9910-7282-4B85-B0A8-818D8DD7DA35}.Release|Any CPU.Build.0 = Release|Any CPU + {AA757F5A-8C56-445C-A3A1-E7447C01812C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA757F5A-8C56-445C-A3A1-E7447C01812C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA757F5A-8C56-445C-A3A1-E7447C01812C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA757F5A-8C56-445C-A3A1-E7447C01812C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj index 50c183e3277..5f32e1dcd35 100644 --- a/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj +++ b/seed/csharp-sdk/single-url-environment-default/src/SeedSingleUrlEnvironmentDefault/SeedSingleUrlEnvironmentDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/single-url-environment-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs index 627eb79f003..b4d073e3119 100644 --- a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj index bb541d7bc3c..970b922df3a 100644 --- a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj +++ b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/SeedSingleUrlEnvironmentNoDefault.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Unit/MockServer/BaseMockServerTest.cs index 10c818a37b7..1222fb88d43 100644 --- a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln new file mode 100644 index 00000000000..784e6d77e10 --- /dev/null +++ b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentNoDefault", "SeedSingleUrlEnvironmentNoDefault\SeedSingleUrlEnvironmentNoDefault.csproj", "{599FA3A0-E611-4B88-B965-34584B12BFB6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedSingleUrlEnvironmentNoDefault.Test", "SeedSingleUrlEnvironmentNoDefault.Test\SeedSingleUrlEnvironmentNoDefault.Test.csproj", "{EB05C139-D8C0-4EA6-83B1-90EE9602DFA4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {599FA3A0-E611-4B88-B965-34584B12BFB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {599FA3A0-E611-4B88-B965-34584B12BFB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {599FA3A0-E611-4B88-B965-34584B12BFB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {599FA3A0-E611-4B88-B965-34584B12BFB6}.Release|Any CPU.Build.0 = Release|Any CPU + {EB05C139-D8C0-4EA6-83B1-90EE9602DFA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB05C139-D8C0-4EA6-83B1-90EE9602DFA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB05C139-D8C0-4EA6-83B1-90EE9602DFA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB05C139-D8C0-4EA6-83B1-90EE9602DFA4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj index fe83c620e20..dfa17a3d401 100644 --- a/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj +++ b/seed/csharp-sdk/single-url-environment-no-default/src/SeedSingleUrlEnvironmentNoDefault/SeedSingleUrlEnvironmentNoDefault.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/single-url-environment-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs index 72453a319a0..b0fefdd9a52 100644 --- a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj index 1a496777c8e..77d9031c2ce 100644 --- a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj +++ b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.Test/SeedStreaming.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.sln b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.sln new file mode 100644 index 00000000000..382c39c4d8d --- /dev/null +++ b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming", "SeedStreaming\SeedStreaming.csproj", "{053746D4-8B1D-45D1-B7E4-E72F0F1FA544}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming.Test", "SeedStreaming.Test\SeedStreaming.Test.csproj", "{F911A492-0AE9-4EDF-8F65-5B4EAACD746D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {053746D4-8B1D-45D1-B7E4-E72F0F1FA544}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {053746D4-8B1D-45D1-B7E4-E72F0F1FA544}.Debug|Any CPU.Build.0 = Debug|Any CPU + {053746D4-8B1D-45D1-B7E4-E72F0F1FA544}.Release|Any CPU.ActiveCfg = Release|Any CPU + {053746D4-8B1D-45D1-B7E4-E72F0F1FA544}.Release|Any CPU.Build.0 = Release|Any CPU + {F911A492-0AE9-4EDF-8F65-5B4EAACD746D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F911A492-0AE9-4EDF-8F65-5B4EAACD746D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F911A492-0AE9-4EDF-8F65-5B4EAACD746D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F911A492-0AE9-4EDF-8F65-5B4EAACD746D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj index 31a406d42be..e0ff2c2f255 100644 --- a/seed/csharp-sdk/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj +++ b/seed/csharp-sdk/streaming-parameter/src/SeedStreaming/SeedStreaming.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/streaming-parameter/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs index 72453a319a0..b0fefdd9a52 100644 --- a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj index 1a496777c8e..77d9031c2ce 100644 --- a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj +++ b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/SeedStreaming.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Unit/MockServer/BaseMockServerTest.cs index 259415405a8..fd98ae52e0d 100644 --- a/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/streaming/src/SeedStreaming.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/streaming/src/SeedStreaming.sln b/seed/csharp-sdk/streaming/src/SeedStreaming.sln new file mode 100644 index 00000000000..d6f22f11a37 --- /dev/null +++ b/seed/csharp-sdk/streaming/src/SeedStreaming.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming", "SeedStreaming\SeedStreaming.csproj", "{9C6379BA-50F2-4585-8160-2B1674E0A1BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedStreaming.Test", "SeedStreaming.Test\SeedStreaming.Test.csproj", "{DEE82217-0872-43BE-B212-478EC322BD51}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C6379BA-50F2-4585-8160-2B1674E0A1BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C6379BA-50F2-4585-8160-2B1674E0A1BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C6379BA-50F2-4585-8160-2B1674E0A1BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C6379BA-50F2-4585-8160-2B1674E0A1BD}.Release|Any CPU.Build.0 = Release|Any CPU + {DEE82217-0872-43BE-B212-478EC322BD51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEE82217-0872-43BE-B212-478EC322BD51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEE82217-0872-43BE-B212-478EC322BD51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEE82217-0872-43BE-B212-478EC322BD51}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/streaming/src/SeedStreaming/SeedStreaming.csproj b/seed/csharp-sdk/streaming/src/SeedStreaming/SeedStreaming.csproj index c77c04d7af8..244cf27f28b 100644 --- a/seed/csharp-sdk/streaming/src/SeedStreaming/SeedStreaming.csproj +++ b/seed/csharp-sdk/streaming/src/SeedStreaming/SeedStreaming.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/streaming/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs index 6a568332953..46d97ee294b 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/SeedTrace.Test.csproj b/seed/csharp-sdk/trace/src/SeedTrace.Test/SeedTrace.Test.csproj index 399d362bf4b..ddcf1a5d704 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/SeedTrace.Test.csproj +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/SeedTrace.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/BaseMockServerTest.cs index 6d466a6ed4e..b816736afab 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/trace/src/SeedTrace.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/trace/src/SeedTrace.sln b/seed/csharp-sdk/trace/src/SeedTrace.sln new file mode 100644 index 00000000000..b7d8adcce65 --- /dev/null +++ b/seed/csharp-sdk/trace/src/SeedTrace.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedTrace", "SeedTrace\SeedTrace.csproj", "{0FAD5CEB-103E-4896-B1C5-F365170B583A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedTrace.Test", "SeedTrace.Test\SeedTrace.Test.csproj", "{A9BF564B-224E-4BEB-8C2C-EC71EEA8E350}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0FAD5CEB-103E-4896-B1C5-F365170B583A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FAD5CEB-103E-4896-B1C5-F365170B583A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FAD5CEB-103E-4896-B1C5-F365170B583A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FAD5CEB-103E-4896-B1C5-F365170B583A}.Release|Any CPU.Build.0 = Release|Any CPU + {A9BF564B-224E-4BEB-8C2C-EC71EEA8E350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9BF564B-224E-4BEB-8C2C-EC71EEA8E350}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9BF564B-224E-4BEB-8C2C-EC71EEA8E350}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9BF564B-224E-4BEB-8C2C-EC71EEA8E350}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/trace/src/SeedTrace/SeedTrace.csproj b/seed/csharp-sdk/trace/src/SeedTrace/SeedTrace.csproj index 548146119e0..951a7994781 100644 --- a/seed/csharp-sdk/trace/src/SeedTrace/SeedTrace.csproj +++ b/seed/csharp-sdk/trace/src/SeedTrace/SeedTrace.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/trace/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs index 5266b03a510..cd47208fb34 100644 --- a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj index e2bb610631d..c08f58082d3 100644 --- a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj +++ b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/SeedUndiscriminatedUnions.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Unit/MockServer/BaseMockServerTest.cs index 41bae8813fe..64f1f7d2e2d 100644 --- a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln new file mode 100644 index 00000000000..5f072ce6d37 --- /dev/null +++ b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUndiscriminatedUnions", "SeedUndiscriminatedUnions\SeedUndiscriminatedUnions.csproj", "{4F5F2545-093A-4830-BB1A-F7381C25B863}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUndiscriminatedUnions.Test", "SeedUndiscriminatedUnions.Test\SeedUndiscriminatedUnions.Test.csproj", "{3D1FD920-F9E5-4D97-A27A-5ED486EE5FA8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F5F2545-093A-4830-BB1A-F7381C25B863}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F5F2545-093A-4830-BB1A-F7381C25B863}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F5F2545-093A-4830-BB1A-F7381C25B863}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F5F2545-093A-4830-BB1A-F7381C25B863}.Release|Any CPU.Build.0 = Release|Any CPU + {3D1FD920-F9E5-4D97-A27A-5ED486EE5FA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D1FD920-F9E5-4D97-A27A-5ED486EE5FA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D1FD920-F9E5-4D97-A27A-5ED486EE5FA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D1FD920-F9E5-4D97-A27A-5ED486EE5FA8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj index 95bea173532..bdfcbba40ff 100644 --- a/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj +++ b/seed/csharp-sdk/undiscriminated-unions/src/SeedUndiscriminatedUnions/SeedUndiscriminatedUnions.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/undiscriminated-unions/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs index 0516ffc357b..d0a072a0128 100644 --- a/seed/csharp-sdk/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/unions/src/SeedUnions.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/unions/src/SeedUnions.Test/SeedUnions.Test.csproj b/seed/csharp-sdk/unions/src/SeedUnions.Test/SeedUnions.Test.csproj index d299c9c615a..1aab7bd3a92 100644 --- a/seed/csharp-sdk/unions/src/SeedUnions.Test/SeedUnions.Test.csproj +++ b/seed/csharp-sdk/unions/src/SeedUnions.Test/SeedUnions.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/unions/src/SeedUnions.sln b/seed/csharp-sdk/unions/src/SeedUnions.sln new file mode 100644 index 00000000000..24dd91c9d82 --- /dev/null +++ b/seed/csharp-sdk/unions/src/SeedUnions.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnions", "SeedUnions\SeedUnions.csproj", "{4FDF06C1-8A72-4142-8B65-0C03128B52EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnions.Test", "SeedUnions.Test\SeedUnions.Test.csproj", "{6F1A5A3B-BE41-4646-90D4-7687157B2306}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4FDF06C1-8A72-4142-8B65-0C03128B52EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4FDF06C1-8A72-4142-8B65-0C03128B52EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4FDF06C1-8A72-4142-8B65-0C03128B52EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4FDF06C1-8A72-4142-8B65-0C03128B52EF}.Release|Any CPU.Build.0 = Release|Any CPU + {6F1A5A3B-BE41-4646-90D4-7687157B2306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F1A5A3B-BE41-4646-90D4-7687157B2306}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F1A5A3B-BE41-4646-90D4-7687157B2306}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F1A5A3B-BE41-4646-90D4-7687157B2306}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/unions/src/SeedUnions/SeedUnions.csproj b/seed/csharp-sdk/unions/src/SeedUnions/SeedUnions.csproj index 3060ef0c6d8..6c7bd690969 100644 --- a/seed/csharp-sdk/unions/src/SeedUnions/SeedUnions.csproj +++ b/seed/csharp-sdk/unions/src/SeedUnions/SeedUnions.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/unions/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs index 9b5b930b507..e2022c27501 100644 --- a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj index 4657f547dbe..a79c4d294b8 100644 --- a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj +++ b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/SeedUnknownAsAny.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Unit/MockServer/BaseMockServerTest.cs index f618d1222ba..6f822078434 100644 --- a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.sln b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.sln new file mode 100644 index 00000000000..51d73bb2dfe --- /dev/null +++ b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnknownAsAny", "SeedUnknownAsAny\SeedUnknownAsAny.csproj", "{7F1C2B2E-5A1C-4D31-9409-D42E3442BF7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedUnknownAsAny.Test", "SeedUnknownAsAny.Test\SeedUnknownAsAny.Test.csproj", "{EAFE08CF-4653-470C-B769-0A2D01E7DEFD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F1C2B2E-5A1C-4D31-9409-D42E3442BF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F1C2B2E-5A1C-4D31-9409-D42E3442BF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F1C2B2E-5A1C-4D31-9409-D42E3442BF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F1C2B2E-5A1C-4D31-9409-D42E3442BF7F}.Release|Any CPU.Build.0 = Release|Any CPU + {EAFE08CF-4653-470C-B769-0A2D01E7DEFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAFE08CF-4653-470C-B769-0A2D01E7DEFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAFE08CF-4653-470C-B769-0A2D01E7DEFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAFE08CF-4653-470C-B769-0A2D01E7DEFD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj index 3bde5636f99..7d078c15588 100644 --- a/seed/csharp-sdk/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj +++ b/seed/csharp-sdk/unknown/src/SeedUnknownAsAny/SeedUnknownAsAny.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/unknown/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs index 59dddfa32ef..3f62fc7204d 100644 --- a/seed/csharp-sdk/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/validation/src/SeedValidation.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/validation/src/SeedValidation.Test/SeedValidation.Test.csproj b/seed/csharp-sdk/validation/src/SeedValidation.Test/SeedValidation.Test.csproj index 902a8f55981..7265c8587af 100644 --- a/seed/csharp-sdk/validation/src/SeedValidation.Test/SeedValidation.Test.csproj +++ b/seed/csharp-sdk/validation/src/SeedValidation.Test/SeedValidation.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/validation/src/SeedValidation.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/validation/src/SeedValidation.Test/Unit/MockServer/BaseMockServerTest.cs index ee300b70c6e..cebd625fdba 100644 --- a/seed/csharp-sdk/validation/src/SeedValidation.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/validation/src/SeedValidation.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/validation/src/SeedValidation.sln b/seed/csharp-sdk/validation/src/SeedValidation.sln new file mode 100644 index 00000000000..eda061252db --- /dev/null +++ b/seed/csharp-sdk/validation/src/SeedValidation.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedValidation", "SeedValidation\SeedValidation.csproj", "{2E25ACC3-BB58-4CD1-8BB2-0E6A0D9BDE2A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedValidation.Test", "SeedValidation.Test\SeedValidation.Test.csproj", "{6E3B5574-CC04-4654-BCA5-73DB29EBC69A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2E25ACC3-BB58-4CD1-8BB2-0E6A0D9BDE2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E25ACC3-BB58-4CD1-8BB2-0E6A0D9BDE2A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E25ACC3-BB58-4CD1-8BB2-0E6A0D9BDE2A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E25ACC3-BB58-4CD1-8BB2-0E6A0D9BDE2A}.Release|Any CPU.Build.0 = Release|Any CPU + {6E3B5574-CC04-4654-BCA5-73DB29EBC69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E3B5574-CC04-4654-BCA5-73DB29EBC69A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E3B5574-CC04-4654-BCA5-73DB29EBC69A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E3B5574-CC04-4654-BCA5-73DB29EBC69A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/validation/src/SeedValidation/SeedValidation.csproj b/seed/csharp-sdk/validation/src/SeedValidation/SeedValidation.csproj index c50cd7d7ab5..b6c0008c8a2 100644 --- a/seed/csharp-sdk/validation/src/SeedValidation/SeedValidation.csproj +++ b/seed/csharp-sdk/validation/src/SeedValidation/SeedValidation.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/validation/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs index 823797580ec..1c16afb4ce2 100644 --- a/seed/csharp-sdk/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/variables/src/SeedVariables.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/variables/src/SeedVariables.Test/SeedVariables.Test.csproj b/seed/csharp-sdk/variables/src/SeedVariables.Test/SeedVariables.Test.csproj index 4e008c367ca..476174f5e6e 100644 --- a/seed/csharp-sdk/variables/src/SeedVariables.Test/SeedVariables.Test.csproj +++ b/seed/csharp-sdk/variables/src/SeedVariables.Test/SeedVariables.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/variables/src/SeedVariables.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/variables/src/SeedVariables.Test/Unit/MockServer/BaseMockServerTest.cs index 9b78924f2f6..df2a9b69b68 100644 --- a/seed/csharp-sdk/variables/src/SeedVariables.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/variables/src/SeedVariables.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/variables/src/SeedVariables.sln b/seed/csharp-sdk/variables/src/SeedVariables.sln new file mode 100644 index 00000000000..1f1cc13b763 --- /dev/null +++ b/seed/csharp-sdk/variables/src/SeedVariables.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVariables", "SeedVariables\SeedVariables.csproj", "{94101465-540F-4874-83EC-5EBF59D6F3F5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVariables.Test", "SeedVariables.Test\SeedVariables.Test.csproj", "{8CA39C83-F1B7-4161-8948-BBB39D189855}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {94101465-540F-4874-83EC-5EBF59D6F3F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94101465-540F-4874-83EC-5EBF59D6F3F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94101465-540F-4874-83EC-5EBF59D6F3F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94101465-540F-4874-83EC-5EBF59D6F3F5}.Release|Any CPU.Build.0 = Release|Any CPU + {8CA39C83-F1B7-4161-8948-BBB39D189855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CA39C83-F1B7-4161-8948-BBB39D189855}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CA39C83-F1B7-4161-8948-BBB39D189855}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CA39C83-F1B7-4161-8948-BBB39D189855}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/variables/src/SeedVariables/SeedVariables.csproj b/seed/csharp-sdk/variables/src/SeedVariables/SeedVariables.csproj index c4d48c57862..8fac957d946 100644 --- a/seed/csharp-sdk/variables/src/SeedVariables/SeedVariables.csproj +++ b/seed/csharp-sdk/variables/src/SeedVariables/SeedVariables.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/variables/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs index ba889dc5891..583da3c0d05 100644 --- a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj index ea1b8396b51..22fcd57b3cb 100644 --- a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj +++ b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/SeedVersion.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs index 35b7ef1e954..fb4a1a8a2dc 100644 --- a/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/version-no-default/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/version-no-default/src/SeedVersion.sln b/seed/csharp-sdk/version-no-default/src/SeedVersion.sln new file mode 100644 index 00000000000..4941e4bb1d1 --- /dev/null +++ b/seed/csharp-sdk/version-no-default/src/SeedVersion.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion", "SeedVersion\SeedVersion.csproj", "{56B8A7E9-E533-4917-B131-7E5B2BFF40D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion.Test", "SeedVersion.Test\SeedVersion.Test.csproj", "{D393FF4C-B58D-4A40-84A9-2E42B365C769}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56B8A7E9-E533-4917-B131-7E5B2BFF40D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56B8A7E9-E533-4917-B131-7E5B2BFF40D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56B8A7E9-E533-4917-B131-7E5B2BFF40D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56B8A7E9-E533-4917-B131-7E5B2BFF40D2}.Release|Any CPU.Build.0 = Release|Any CPU + {D393FF4C-B58D-4A40-84A9-2E42B365C769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D393FF4C-B58D-4A40-84A9-2E42B365C769}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D393FF4C-B58D-4A40-84A9-2E42B365C769}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D393FF4C-B58D-4A40-84A9-2E42B365C769}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/version-no-default/src/SeedVersion/SeedVersion.csproj b/seed/csharp-sdk/version-no-default/src/SeedVersion/SeedVersion.csproj index 19973c99154..16eef82397a 100644 --- a/seed/csharp-sdk/version-no-default/src/SeedVersion/SeedVersion.csproj +++ b/seed/csharp-sdk/version-no-default/src/SeedVersion/SeedVersion.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/version-no-default/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs index ba889dc5891..583da3c0d05 100644 --- a/seed/csharp-sdk/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/version/src/SeedVersion.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/version/src/SeedVersion.Test/SeedVersion.Test.csproj b/seed/csharp-sdk/version/src/SeedVersion.Test/SeedVersion.Test.csproj index ea1b8396b51..22fcd57b3cb 100644 --- a/seed/csharp-sdk/version/src/SeedVersion.Test/SeedVersion.Test.csproj +++ b/seed/csharp-sdk/version/src/SeedVersion.Test/SeedVersion.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/version/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/version/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs index 35b7ef1e954..fb4a1a8a2dc 100644 --- a/seed/csharp-sdk/version/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/version/src/SeedVersion.Test/Unit/MockServer/BaseMockServerTest.cs @@ -35,5 +35,6 @@ public void GlobalSetup() public void GlobalTeardown() { Server.Stop(); + Server.Dispose(); } } diff --git a/seed/csharp-sdk/version/src/SeedVersion.sln b/seed/csharp-sdk/version/src/SeedVersion.sln new file mode 100644 index 00000000000..1b038f192c8 --- /dev/null +++ b/seed/csharp-sdk/version/src/SeedVersion.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion", "SeedVersion\SeedVersion.csproj", "{6838D551-7915-43DE-853E-BA78EF928350}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedVersion.Test", "SeedVersion.Test\SeedVersion.Test.csproj", "{FD9FF355-A009-4A59-8ADF-77A7B462391B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6838D551-7915-43DE-853E-BA78EF928350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6838D551-7915-43DE-853E-BA78EF928350}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6838D551-7915-43DE-853E-BA78EF928350}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6838D551-7915-43DE-853E-BA78EF928350}.Release|Any CPU.Build.0 = Release|Any CPU + {FD9FF355-A009-4A59-8ADF-77A7B462391B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD9FF355-A009-4A59-8ADF-77A7B462391B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD9FF355-A009-4A59-8ADF-77A7B462391B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD9FF355-A009-4A59-8ADF-77A7B462391B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/version/src/SeedVersion/SeedVersion.csproj b/seed/csharp-sdk/version/src/SeedVersion/SeedVersion.csproj index 7279f5a2757..1b47c88610f 100644 --- a/seed/csharp-sdk/version/src/SeedVersion/SeedVersion.csproj +++ b/seed/csharp-sdk/version/src/SeedVersion/SeedVersion.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/version/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + diff --git a/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs index 901b507973e..dcfcd3eed5a 100644 --- a/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs +++ b/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/Core/EnumSerializerTests.cs @@ -36,7 +36,7 @@ public void ShouldSerializeKnownEnumValue2() new DummyObject { EnumProperty = KnownEnumValue2 }, JsonOptions ); - TestContext.WriteLine("Serialized JSON: \n" + json); + TestContext.Out.WriteLine("Serialized JSON: \n" + json); var enumString = json.GetProperty("enum_property").GetString(); Assert.That(enumString, Is.Not.Null); Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); diff --git a/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj b/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj index b51b25a8b42..b1ba647bca0 100644 --- a/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj +++ b/seed/csharp-sdk/websocket/src/SeedWebsocket.Test/SeedWebsocket.Test.csproj @@ -10,12 +10,18 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/seed/csharp-sdk/websocket/src/SeedWebsocket.sln b/seed/csharp-sdk/websocket/src/SeedWebsocket.sln new file mode 100644 index 00000000000..ce132b86c4d --- /dev/null +++ b/seed/csharp-sdk/websocket/src/SeedWebsocket.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedWebsocket", "SeedWebsocket\SeedWebsocket.csproj", "{61FDB802-61C3-42BD-90DA-99ACD34BAC31}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedWebsocket.Test", "SeedWebsocket.Test\SeedWebsocket.Test.csproj", "{11C9A093-B3CD-4397-BB50-177A56B34DAC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {61FDB802-61C3-42BD-90DA-99ACD34BAC31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61FDB802-61C3-42BD-90DA-99ACD34BAC31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61FDB802-61C3-42BD-90DA-99ACD34BAC31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61FDB802-61C3-42BD-90DA-99ACD34BAC31}.Release|Any CPU.Build.0 = Release|Any CPU + {11C9A093-B3CD-4397-BB50-177A56B34DAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11C9A093-B3CD-4397-BB50-177A56B34DAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11C9A093-B3CD-4397-BB50-177A56B34DAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11C9A093-B3CD-4397-BB50-177A56B34DAC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/seed/csharp-sdk/websocket/src/SeedWebsocket/SeedWebsocket.csproj b/seed/csharp-sdk/websocket/src/SeedWebsocket/SeedWebsocket.csproj index a2a6736d8d7..1c75b3e274d 100644 --- a/seed/csharp-sdk/websocket/src/SeedWebsocket/SeedWebsocket.csproj +++ b/seed/csharp-sdk/websocket/src/SeedWebsocket/SeedWebsocket.csproj @@ -4,7 +4,6 @@ net462;net8.0;net7.0;net6.0;netstandard2.0 enable - false 12 enable 0.0.1 @@ -12,31 +11,23 @@ $(Version) README.md https://github.com/websocket/fern - - - true - - - - - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + +